Danielhiversen / home_assistant_tibber_data

Display Tibber data sensors.
MIT License
42 stars 13 forks source link

All sensors are dead after 0.5.2 upgrade #45

Closed dlysnes closed 2 years ago

dlysnes commented 2 years ago

I tried this a few times now. upgrading from 0.5.1 to 0.5.2, then all sensors are dead. Can't find anything in log. Removed the integration and installed 0.5.1 and it works fine. Tried upgrade again and they are all dead.

I have entered user data, but I also have two Easee chargers (master / slave). I saw sth about adding SOC in 0.5.2, so could that maybe have an issue with multiple chargers?

image

HA info:
Home Assistant 2022.11.0
Supervisor 2022.10.0
Operating System 9.3
Frontend 20221102.1 - latest

Tibber device working fine:

"domain": "tibber",
    "name": "Tibber",
    "documentation": "https://www.home-assistant.io/integrations/tibber",
    "requirements": [
      "pyTibber==0.25.6"

Any other logs I can provide?

osaether commented 2 years ago

Same here

jhrath commented 2 years ago

Same here. I had 0.5.2 and sensors have been dead for many days. I've restarted HA at least 5 times. I downgraded to 0.5.1 now, and the sensors woke up.

Danielhiversen commented 2 years ago

Any errors in the log?

jhrath commented 2 years ago

After running 0.5.1 successfully, I upgraded to the new 0.5.3. I've restarted two times, and still no sensor data. I'm sorry, but I'm not 100% sure what log I should look in, so I assume the "Home Assistant Core" log is "good enough". After a restart, as usual the Tibber integration does not load properly. This is the first log entry for Tibber_data:

Logger: custom_components.tibber_data.data_coordinator
Source: custom_components/tibber_data/data_coordinator.py:150
Integration: Tibber data ([documentation](https://github.com/Danielhiversen/home_assistant_tibber_data), [issues](https://github.com/Danielhiversen/home_assistant_tibber_data/issues))
First occurred: 11:11:46 (1 occurrences)
Last logged: 11:11:46

Error fetching Tibber data
Traceback (most recent call last):
  File "/config/custom_components/tibber_data/data_coordinator.py", line 82, in _async_update_data
    self._update_functions[func] = await func(data, now)
  File "/config/custom_components/tibber_data/data_coordinator.py", line 150, in _get_offline_evs_data_tibber
    data[f"offline_ev_{ev_device['brandAndModel']}_soc"] = ev_device[
KeyError: 'batteryLevel'

And a second, one minute later:

Logger: homeassistant.components.sensor
Source: custom_components/tibber_data/data_coordinator.py:410
Integration: sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 11:11:47 (1 occurrences)
Last logged: 11:11:47

Error while setting up tibber_data 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/tibber_data/sensor.py", line 59, in async_setup_platform
    ) in coordinator.offline_ev_entity_descriptions:
  File "/config/custom_components/tibber_data/data_coordinator.py", line 410, in offline_ev_entity_descriptions
    key=f"offline_ev_{ev_dev['brandAndModel']}_soc",
KeyError: 'brandAndModel'

I then reload the Tibber integration and all Tibber sensors wake up. There are still no data from Tibber_data sensors: image I try the "update information" option on the integration in HACS, but nothing changes. All sensors are utilgjengelig/unavailable. :(

Danielhiversen commented 2 years ago

Thanks. I think this is good enough to fix it. Will try tomorrow.