'Update method called when should_poll is true.'

def update(self):

    self._store.update()
    data = self._store.get_data(self._data_id)
    if (data is None):
        _LOGGER.debug('Recieved    no    data    for    zone    %s', self.zone_name)
        return
    unit = TEMP_CELSIUS
    if (self.zone_variable == 'temperature'):
        if ('sensorDataPoints' in data):
            sensor_data = data['sensorDataPoints']
            temperature = float(sensor_data['insideTemperature']['celsius'])
            self._state = self.hass.config.units.temperature(temperature, unit)
            self._state_attributes = {'time': sensor_data['insideTemperature']['timestamp'], 'setting': 0}
            if (('temperature' in data['setting']) and (data['setting']['temperature'] is not None)):
                temperature = float(data['setting']['temperature']['celsius'])
                self._state_attributes['setting'] = self.hass.config.units.temperature(temperature, unit)
    elif (self.zone_variable == 'humidity'):
        if ('sensorDataPoints' in data):
            sensor_data = data['sensorDataPoints']
            self._state = float(sensor_data['humidity']['percentage'])
            self._state_attributes = {'time': sensor_data['humidity']['timestamp']}
    elif (self.zone_variable == 'power'):
        if ('setting' in data):
            self._state = data['setting']['power']
    elif (self.zone_variable == 'link'):
        if ('link' in data):
            self._state = data['link']['state']
    elif (self.zone_variable == 'heating'):
        if ('activityDataPoints' in data):
            activity_data = data['activityDataPoints']
            self._state = float(activity_data['heatingPower']['percentage'])
            self._state_attributes = {'time': activity_data['heatingPower']['timestamp']}
    elif (self.zone_variable == 'tado    bridge    status'):
        if ('connectionState' in data):
            self._state = data['connectionState']['value']
    elif (self.zone_variable == 'tado    mode'):
        if ('tadoMode' in data):
            self._state = data['tadoMode']
    elif (self.zone_variable == 'overlay'):
        if (('overlay' in data) and (data['overlay'] is not None)):
            self._state = True
            self._state_attributes = {'termination': data['overlay']['termination']['type']}
        else:
            self._state = False
            self._state_attributes = {}
