oischinger / ha_vicare

Inofficial Home Assistant custom component for Viessmann ViCare API
61 stars 34 forks source link

KeyError: unknown #21

Closed lukaszolek closed 5 years ago

lukaszolek commented 5 years ago

I've configured vicare using your instructions. I can see the following stack trace in home assistant log. I can see the vicare climate entities, and not the sensor entities.

019-09-04 16:52:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 402, in _async_add_entity await entity.async_update_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 254, in async_update_ha_state self._async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state state = self.state File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 176, in state return self.hvac_mode File "/home/homeassistant/.homeassistant/custom_components/vicare/climate.py", line 166, in hvac_mode return VICARE_TO_HA_HVAC_HEATING[self._current_mode] KeyError: 'unknown' 2019-09-04 16:52:27 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 402, in _async_add_entity await entity.async_update_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 254, in async_update_ha_state self._async_write_ha_state() File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 278, in _async_write_ha_state state = self.state File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/climate/init.py", line 176, in state return self.hvac_mode File "/home/homeassistant/.homeassistant/custom_components/vicare/climate.py", line 302, in hvac_mode return VICARE_TO_HA_HVAC_DHW[self._current_mode] KeyError: 'unknown'

oischinger commented 5 years ago

This bug has been fixed during the code reviews for the official Home Assistant integration (which will hopefully happen for the next release). If you want to try that version I have uploaded the current state to this repository as well now. Please note that the configuration entries have changed (see Readme.md).

Closing the bug. please reopen if it still occurs