hristo-atanasov / Tasmota-IRHVAC

Home Assistant platform for controlling IR Air Conditioners via Tasmota IRHVAC command and compatible hardware
187 stars 64 forks source link

ValueError: 'unavailable' is not a valid HVACMode #71

Closed hristo-atanasov closed 2 years ago

hristo-atanasov commented 2 years ago

The error is a new "feature" in Home Assistan from v. 2022.05+

dmamontov commented 2 years ago

@hristo-atanasov Try my PR https://github.com/hristo-atanasov/Tasmota-IRHVAC/pull/72

ahmetem commented 2 years ago

Logger: homeassistant.util.logging Source: util/logging.py:114 First occurred: 12:43:51 (1 occurrences) Last logged: 12:43:51

Exception in availability_message_received when handling msg on 'tele/klima_2935BE/LWT': 'Online' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/mqtt/debug_info.py", line 47, in wrapper msg_callback(msg) File "/usr/src/homeassistant/homeassistant/components/mqtt/mixins.py", line 448, in availability_message_received self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 571, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 539, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 220, in state return HVACMode(self.hvac_mode).value File "/usr/local/lib/python3.9/enum.py", line 384, in call return cls.new(cls, value) File "/usr/local/lib/python3.9/enum.py", line 702, in new raise ve_exc ValueError: 'unknown' is not a valid HVACMode

chicaneau commented 2 years ago

Thanks for the PR @dmamontov I have updated my climate.py and the entities are at least creating now. However I am unable to set a temperature on 2 of my climate entities. I'm not exactly sure what the difference is between mine. However 1 works fine and 2 dont. The 1 that does work wasnt affected by the unavailable bug either though.

image

nao-pon commented 2 years ago

I fixed an issue with a value of ‘unknown’ in #73, but I don't understand why the value is ‘unavailable’.