Traceback (most recent call last):


 "/usr/lib64/python3.6/site-packages/qutebrowser/browser/webengine/webview.py", line 262, in acceptNavigationRequest

navigation_type=type_map[typ],
KeyError: 6


Traceback (most recent call last):


 "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service

connection.context(msg),


 "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call

await asyncio.shield(self._execute_service(handler, service_call))


 "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service

await handler.func(service_call)


 "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 205, in handle_service

self._platforms.values(), func, call, service_name, required_features


 "/usr/src/homeassistant/homeassistant/helpers/service.py", line 336, in entity_service_call

future.result()
# pop exception if have


 "/usr/src/homeassistant/homeassistant/helpers/service.py", line 369, in _handle_service_platform_call

future.result()
# pop exception if have


 "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 286, in async_update_ha_state

self._async_write_ha_state()


 "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state

state = self.state


 "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 587, in state

return STATE_ON if self.is_on else STATE_OFF


 "/config/custom_components/sonoff/fan.py", line 40, in is_on

self._state = (self.get_device()['params']['switches'][1]['switch'] == 'on')
KeyError: 1```