Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with home assistant 2022.5 #49

Closed
mamrai1 opened this issue May 4, 2022 · 6 comments
Closed

error with home assistant 2022.5 #49

mamrai1 opened this issue May 4, 2022 · 6 comments

Comments

@mamrai1
Copy link
Contributor

mamrai1 commented May 4, 2022

Hysen stopped working after latest update:

Logger: homeassistant.components.climate
Source: components/climate/init.py:220
Integration: Climate (documentation, issues)
First occurred: 11:48:37 PM (2 occurrences)
Last logged: 11:48:37 PM

Error adding entities for domain climate with platform hysen
Error while setting up hysen platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 810, in add_to_platform_finish
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: 'unavailable' is not a valid HVACMode

@eifinger
Copy link
Contributor

eifinger commented May 4, 2022

Might be this: https://developers.home-assistant.io/blog/2022/05/03/constants-deprecations/

@mcc05
Copy link
Collaborator

mcc05 commented May 4, 2022

I haven't upgraded yet, I'll take a look at the code at weekend unless someone beats me to it.

@akacruel
Copy link

akacruel commented May 5, 2022

The same problem

@mcc05
Copy link
Collaborator

mcc05 commented May 5, 2022

Think I fixed it, running tests on my system, please confirm

@mamrai1
Copy link
Contributor Author

mamrai1 commented May 5, 2022

Yes, i do confirm it works now... But i had this error after restarting home assistant :
Maybe the integration or home assistant wasn't fully up?
Logger: custom_components.hysen.climate
Source: custom_components/hysen/climate.py:800
Integration: hysen (documentation, issues)
First occurred: 4:15:35 PM (1 occurrences)
Last logged: 4:15:35 PM

Failed to send Power command to Broadlink Hysen Climate device:climate.main_thermostat, :'NoneType' object cannot be interpreted as an integer

@mamrai1
Copy link
Contributor Author

mamrai1 commented May 5, 2022

It seems the error was during home assistant core restart... Fix works ok

@mamrai1 mamrai1 closed this as completed May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants