@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
    'Update data from Smappee API.'
    if self.is_remote_active:
        service_locations = self._smappy.get_service_locations().get('serviceLocations')
        for location in service_locations:
            location_id = location.get('serviceLocationId')
            if (location_id is not None):
                self.sensor_consumption[location_id] = {}
                self.locations[location_id] = location.get('name')
                self.info[location_id] = self._smappy.get_service_location_info(location_id)
                _LOGGER.debug('Remote info %s %s', self.locations, self.info[location_id])
                for sensors in self.info[location_id].get('sensors'):
                    sensor_id = sensors.get('id')
                    self.sensor_consumption[location_id].update({sensor_id: self.get_sensor_consumption(location_id, sensor_id, aggregation=3, delta=1440)})
                _LOGGER.debug('Remote sensors %s %s', self.locations, self.sensor_consumption[location_id])
                self.consumption[location_id] = self.get_consumption(location_id, aggregation=3, delta=1440)
                _LOGGER.debug('Remote consumption %s %s', self.locations, self.consumption[location_id])
    if self.is_local_active:
        self.local_devices = self.get_switches()
        _LOGGER.debug('Local switches %s', self.local_devices)
        self.instantaneous = self.load_instantaneous()
        _LOGGER.debug('Local values %s', self.instantaneous)
Update data from Smappee API.
@Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self):
    
    if self.is_remote_active:
        service_locations = self._smappy.get_service_locations().get('serviceLocations')
        for location in service_locations:
            location_id = location.get('serviceLocationId')
            if (location_id is not None):
                self.sensor_consumption[location_id] = {}
                self.locations[location_id] = location.get('name')
                self.info[location_id] = self._smappy.get_service_location_info(location_id)
                _LOGGER.debug('Remote info %s %s', self.locations, self.info[location_id])
                for sensors in self.info[location_id].get('sensors'):
                    sensor_id = sensors.get('id')
                    self.sensor_consumption[location_id].update({sensor_id: self.get_sensor_consumption(location_id, sensor_id, aggregation=3, delta=1440)})
                _LOGGER.debug('Remote sensors %s %s', self.locations, self.sensor_consumption[location_id])
                self.consumption[location_id] = self.get_consumption(location_id, aggregation=3, delta=1440)
                _LOGGER.debug('Remote consumption %s %s', self.locations, self.consumption[location_id])
    if self.is_local_active:
        self.local_devices = self.get_switches()
        _LOGGER.debug('Local switches %s', self.local_devices)
        self.instantaneous = self.load_instantaneous()
        _LOGGER.debug('Local values %s', self.instantaneous)