def update_devices(self, local_devices, remote_devices, component_name):
        if remote_devices is None:
            return local_devices

        remote_ids = remote_devices.keys()
        local_ids = local_devices.keys()

        added_devices = list(remote_ids - local_ids)
        self._discover(added_devices,
                       component_name)

        removed_devices = list(local_ids - remote_ids)
        remote_devices.update({id: dict(local_devices[id], offline=True)
                               for id in removed_devices})

        return remote_devices
Update local device list and discover new devices.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/tellduslive.py/TelldusLiveData.update_devices