Danielhiversen / home_assistant_tibber_data

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

local variable 'native_value' referenced before assignment #39

Closed SVH-Powel closed 2 years ago

SVH-Powel commented 2 years ago

I get these errors each 15th second. I am using tibber data version 0.5.0

2022-10-25 06:24:39.012 ERROR (MainThread) [homeassistant] 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 97, in _handle_coordinator_update native_value = self.update_energy_price_sensor() File "/config/custom_components/tibber_data/sensor.py", line 263, in update_energy_price_sensor return native_value UnboundLocalError: local variable 'native_value' referenced before assignment