Andre0512 / hon

Home Assistant integration for Haier hOn: support for Haier/Candy/Hoover home appliances like washing machines and air conditioners in 28 languages.
MIT License
1.22k stars 2.5k forks source link

Missing options 8 and 22 for 'phase' (washer dryer) #163

Open cicero200272 opened 3 months ago

cicero200272 commented 3 months ago

Describe the bug Running the component with a washer dryer HWD80-B14979U1. In the log file the following message appears very often:

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 243, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 399, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_update_listeners update_callback() File "/config/custom_components/hon/sensor.py", line 827, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 945, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1066, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.__async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1003, in __async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 618, in state raise ValueError( ValueError: Sensor sensor.waschtrockner_phase provides state value '8', which is not in the list of options provided

The same message regarding state value '22' also appears quite often. Seems that those options are missing in the constants...

To Reproduce n/a

Expected behavior A correct value for 'phase' 8 and 22 is provided.

Screenshots n/a

Environment (please complete the following information):

Additional context

Home Assistant Logs