Traceback (most recent call last):


 "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 292, in _async_add_entity

await entity.async_device_update(warning=False)


 "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 450, in async_device_update

await self.hass.async_add_executor_job(self.update)


 "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

result = self.fn(*self.args, **self.kwargs)


 "/usr/src/homeassistant/homeassistant/components/plugwise/climate.py", line 139, in update

self._active_schema = self._api.get_active_schema_name(self._domain_objects)


 "/usr/local/lib/python3.7/site-packages/haanna/haanna.py", line 125, in get_active_schema_name

schema_active = self.get_active_name(root, rule_id)


 "/usr/local/lib/python3.7/site-packages/haanna/haanna.py", line 419, in get_active_name

key=lambda kv: kv[1])[-1][0]
IndexError: list index out of range

Traceback (most recent call last):


 "/usr/src/app/homeassistant/core.py", line 1006, in _event_to_service_call

await service_handler.func(service_call)


 "/usr/src/app/homeassistant/components/configurator.py", line 224, in async_handle_service_call

call.data.get(ATTR_FIELDS, {}))


 "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__

yield self
# This tells Task to wait for completion.


 "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup

future.result()


 "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result

raise self._exception


 "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run

result = self.fn(*self.args, **self.kwargs)


 "/usr/src/app/homeassistant/components/device_tracker/icloud.py", line 204, in icloud_trusted_device_callback

self._trusted_device = self.api.trusted_devices[self._trusted_device]
IndexError: list index out of range
