'Get the latest data and updates the states.'

def update(self):

    self.data.update()
    if (not self.data.humidity):
        _LOGGER.error("Don't    receive    data")
        return
    if (self.type == 'temperature'):
        self._state = self.data.temperature
    if (self.type == 'humidity'):
        self._state = self.data.humidity
    if (self.type == 'pressure'):
        self._state = self.data.pressure
