question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors when HA restart and entities not ready

See original GitHub issue

HA 0.117.1 Browser_mod: 1.2.3

When I restart my HA some sensors, or other things are not ready yet. Browser_mod report errors (sounds ok, but maybe not needed)

Maybe a idea to drop those errors alone until HA is full function?

2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3950097192] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 83, in update
    self.sensor = self.sensor or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'sensor'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3950097192] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 92, in update
    self.media_player = self.media_player or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'media_player'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3950097192] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 101, in update
    self.screen = self.screen or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'light'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3950097192] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 83, in update
    self.sensor = self.sensor or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'sensor'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3951521976] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 92, in update
    self.media_player = self.media_player or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'media_player'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3951521976] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 110, in update
    self.fully = self.fully or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'binary_sensor'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3951521976] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 101, in update
    self.screen = self.screen or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'light'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3951521976] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 83, in update
    self.sensor = self.sensor or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'sensor'
2020-11-01 11:30:56 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.3951521976] Error handling message: Unknown error
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
    handler(self.hass, self, schema(msg))
  File "/config/custom_components/browser_mod/connection.py", line 42, in handle_update
    devices[deviceID].update(msg.get("data", None))
  File "/config/custom_components/browser_mod/connection.py", line 83, in update
    self.sensor = self.sensor or create_entity(
  File "/config/custom_components/browser_mod/helpers.py", line 47, in create_entity
    adder = hass.data[DOMAIN][DATA_ADDERS][platform]
KeyError: 'sensor'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:22 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
browetdcommented, Jun 5, 2021

Same issue for me… and I run the last version of HA 2021.6.2… I run HA in debug mode for websocket.api, here is the output (including the line before and after the error)… I replaced some data by XXXX

2021-06-05 17:45:33 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139687440822576] Received {‘type’: ‘browser_mod/update’, ‘deviceID’: ‘XXXX’, ‘data’: {‘browser’: {‘path’: ‘/lovelace/XXXX’, ‘visibility’: ‘visible’, ‘userAgent’: ‘Mozilla/5.0 (Linux; Android 10; Lenovo TB-X606F Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/89.0.4389.72 Safari/537.36’, ‘currentUser’: ‘XXXX’, ‘fullyKiosk’: False, ‘width’: 1507, ‘height’: 943, ‘battery_level’: 51, ‘charging’: True, ‘darkMode’: False, ‘userData’: {‘id’: ‘XXXX’, ‘name’: ‘XXXX’, ‘is_owner’: False, ‘is_admin’: False, ‘credentials’: [{‘auth_provider_type’: ‘homeassistant’, ‘auth_provider_id’: None}], ‘mfa_modules’: [{‘id’: ‘totp’, ‘name’: ‘Authenticator app’, ‘enabled’: False}]}}}, ‘id’: 26}

2021-06-05 17:45:33 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139687440822576] Error handling message: Unknown error Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py”, line 100, in async_handle handler(self.hass, self, schema(msg)) File “/config/custom_components/browser_mod/connection.py”, line 44, in handle_update devices[deviceID].update(msg.get(“data”, None)) File “/config/custom_components/browser_mod/connection.py”, line 90, in update self.sensor = self.sensor or create_entity( File “/config/custom_components/browser_mod/helpers.py”, line 49, in create_entity adder = hass.data[DOMAIN][DATA_ADDERS][platform] KeyError: ‘sensor’

2021-06-05 17:45:33 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139687440822576] Sending {“id”: 26, “type”: “result”, “success”: false, “error”: {“code”: “unknown_error”, “message”: “Unknown error”}}

Read more comments on GitHub >

github_iconTop Results From Across the Web

The operating system returned error 21 (The device is not ...
Every time I reboot windows, for some databases comes out this error. (OS Error 21 - Device not ready). This is due to...
Read more >
2021.7: A new entity, trigger IDs and script debugging - Blog
I've updated, installed Forecast.Solar and get this error: “Retrying setup: Error occurred while communicating with Forecast.Solar API”. Have ...
Read more >
Error: "vSphere HA agent cannot be correctly installed or ...
Restarting management agents on ESXi hosts risks that the agents don't fully restart.
Read more >
Troubleshoot Server Processes - Tableau Help
If a service or process stops responding or goes down, Tableau Server attempts to restart it. This can take 15 to 30 minutes...
Read more >
Alert and Event Monitoring (Prism Central)
A dash (-) is displayed in a field when a value is not available or applicable. Figure. ... ESXi: Value of cpu.ready.summation for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found