Danielhiversen / home_assistant_tibber_data

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

Unknown states #37

Closed jake404 closed 2 years ago

jake404 commented 2 years ago

After adding the integration and initial config, I get this error message in the log. The created sensor states are 'Unknown'.

This error originated from a custom integration.

Logger: tibber.tibber_home
Source: custom_components/tibber_data/sensor.py:76
Integration: Tibber data (documentation, issues)
First occurred: 14:20:45 (16 occurrences)
Last logged: 14:20:45

Could not find currency.
Could not find price_unit.

After that error, there is another error message:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/tibber_data/sensor.py:117
Integration: Tibber data (documentation, issues)
First occurred: 14:21:00 (3 occurrences)
Last logged: 14:21:30

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
    update_callback()
  File "/config/custom_components/tibber_data/sensor.py", line 91, in _handle_coordinator_update
    native_value = self.update_est_current_price_with_subsidy_sensor()
  File "/config/custom_components/tibber_data/sensor.py", line 117, in update_est_current_price_with_subsidy_sensor
    native_value = price - self.coordinator.data["est_subsidy"]
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
jake404 commented 2 years ago

After another restart of Home Assistant, I'm now getting only this error message:

Logger: homeassistant.components.sensor
Source: custom_components/tibber_data/sensor.py:22
Integration: Sensor (documentation, issues)
First occurred: 14:33:47 (1 occurrences)
Last logged: 14:33: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 22, in async_setup_platform
    for home in hass.data["tibber"].get_homes(only_active=True):
KeyError: 'tibber'

States are still 'Unknown'.

Danielhiversen commented 2 years ago

Is the standard Tibber integration working for you? This depends on it.

jake404 commented 2 years ago

It started working today. It might have been because of Tibber's API issues.