Danielhiversen / home_assistant_tibber_data

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

Crash when trying to update grid price (not available for BKK) #48

Closed hasol closed 2 years ago

hasol commented 2 years ago

Tibber data crashes when trying to update grid price. Grid company is BKK and grid price is not available in Tibber.

I have configured the integration with username and password to get EV charging data.

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 99, in _handle_coordinator_update native_value = self.update_grid_price_sensor() File "/config/custom_components/tibber_data/sensor.py", line 189, in update_grid_price_sensor if price_info[1]["gridPrice"]: KeyError: 1