thomasloven / hass-browser_mod

🔹 A Home Assistant integration to turn your browser into a controllable entity and media player
MIT License
1.24k stars 176 forks source link

Websocket API issue with Browser Mod? #584

Open ThatTallGuy21 opened 1 year ago

ThatTallGuy21 commented 1 year ago

My Home Assistant version: 2023.5.4

I'm seeing the following error in my log when I first start up HA.

Logger: homeassistant.components.websocket_api.http.connection Source: custom_components/browser_mod/browser.py:65 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 10:44:06 AM (1 occurrences) Last logged: 10:44:06 AM

[140010137337088] Error handling message: Unknown error (unknown_error) Admin from 127.0.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response await func(hass, connection, msg) File "/config/custom_components/browser_mod/connection.py", line 143, in handle_update dev = getBrowser(hass, browserID) File "/config/custom_components/browser_mod/browser.py", line 198, in getBrowser browsers[browserID] = BrowserModBrowser(hass, browserID) File "/config/custom_components/browser_mod/browser.py", line 42, in init self.update_entities(hass) File "/config/custom_components/browser_mod/browser.py", line 71, in update_entities _assert_browser_sensor("sensor", "path", "Browser path", icon="mdi:web") File "/config/custom_components/browser_mod/browser.py", line 65, in _assert_browser_sensor adder = hass.data[DOMAIN][DATA_ADDERS][type] KeyError: 'sensor'

FiTekno commented 1 year ago

same here. Downgraded browser mod back to 2.2.1 and works ok again.

mdeweerd commented 1 year ago

On HA 2023.6.1

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/browser_mod/connection.py", line 143, in handle_update
    dev = getBrowser(hass, browserID)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/browser_mod/browser.py", line 198, in getBrowser
    browsers[browserID] = BrowserModBrowser(hass, browserID)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/browser_mod/browser.py", line 42, in __init__
    self.update_entities(hass)
  File "/config/custom_components/browser_mod/browser.py", line 71, in update_entities
    _assert_browser_sensor("sensor", "path", "Browser path", icon="mdi:web")
  File "/config/custom_components/browser_mod/browser.py", line 65, in _assert_browser_sensor
    adder = hass.data[DOMAIN][DATA_ADDERS][type]
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'sensor'
stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Kaptensanders commented 10 months ago

Same here, on 2023.8.3

File "/config/custom_components/browser_mod/browser.py", line 65, in _assert_browser_sensor adder = hass.data[DOMAIN][DATA_ADDERS][type]


KeyError: 'sensor'
stonegray commented 7 months ago

Persists in 2023.10.5

  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/browser_mod/connection.py", line 143, in handle_update
    dev = getBrowser(hass, browserID)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/browser_mod/browser.py", line 198, in getBrowser
    browsers[browserID] = BrowserModBrowser(hass, browserID)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/browser_mod/browser.py", line 42, in __init__
    self.update_entities(hass)
  File "/config/custom_components/browser_mod/browser.py", line 71, in update_entities
    _assert_browser_sensor("sensor", "path", "Browser path", icon="mdi:web")
  File "/config/custom_components/browser_mod/browser.py", line 65, in _assert_browser_sensor
    adder = hass.data[DOMAIN][DATA_ADDERS][type]
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'sensor'
ippo112 commented 6 months ago

same in the 2023.11.3, please some help to resolve. thnaks

cgbaker commented 5 months ago

Persists with 2024.1.5 and Browser Mod 2.3.0