ruuvi-friends / ruuvi-hass.io

Ruuvi tag BLE sensor for Home Assistant.
MIT License
41 stars 11 forks source link

"KeyError: subscriber" after installing on a fresh HA 2022.10.5 #41

Open phaethon opened 1 year ago

phaethon commented 1 year ago

I can add Ruuvi integration, but I don't see anything under Devices tab after adding them from Integration tab (HA asks for MAC address and friendly name). This is the error from log file:

2022-10-31 22:01:55.694 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up ruuvi platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/ruuvi/sensor.py", line 109, in async_setup_entry
    devs_to_add = hass.data[DOMAIN]['subscriber'].update_devs(devs)
KeyError: 'subscriber'

When I add devices to configuration.yaml, I still don't see anything under Devices, but I can see individual sensor measurements.

Versions: Home Assistant 2022.10.5 Supervisor 2022.10.0 Operating System 9.3

Aceman87 commented 1 year ago

I can report that I have the same issue. The line number in the error seems to have changed, otherwise it is the same. I cannot see the added devices.

2023-03-01 21:12:24.815 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up ruuvi platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/ruuvi/sensor.py", line 109, in async_setup_entry devs_to_add = hass.data[DOMAIN]['subscriber'].update_devs(devs) KeyError: 'subscriber'

Versions: Home Assistant 2023.2.5 Supervisor 2023.01.1 Operating System 9.5 Frontend 20230202.0 - latest