libdyson-wg / ha-dyson

Home Assistant custom integration for Wi-Fi connected Dyson devices
MIT License
252 stars 28 forks source link

PH01 Humidifier unavailable #108

Closed WendelFelius closed 10 months ago

WendelFelius commented 10 months ago

Dyson: PH01 (Pure Humidify+Cool) HA: 2024.1 ha-dyson: 1.3.6

I was using shenxn/ha-dyson before, but completely deleted it and started using libdyson-wg/ha-dyson yesterday (thanks for the continues support!). The fan now works brilliant, but I can't get the humidifier to work. Says it's unavailable. Anything I can do in order to fix this?

Screenshot 2024-01-04 om 08 44 48@2x Screenshot 2024-01-04 om 08 45 19@2x

gerdschadler commented 10 months ago

Same issue after upgrading to ha 2024.1

EDelsman commented 10 months ago

This is probably due to a change from an int to an enum:

2024-01-04 15:47:56.892 ERROR (MainThread) [homeassistant.components.humidifier] Error adding entities for domain humidifier with platform dyson_local Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities await asyncio.gather(tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1278, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 941, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1062, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1001, in async_calculate_state attr.update(self.state_attributes or {}) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/humidifier/init.py", line 217, in state_attributes if HumidifierEntityFeature.MODES in self.supported_features: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'int' is not iterable 2024-01-04 15:47:56.926 ERROR (MainThread) [homeassistant.components.humidifier] Error while setting up dyson_local platform for humidifier Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform await asyncio.gather(pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1278, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 941, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1062, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1001, in async_calculate_state attr.update(self.state_attributes or {}) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/humidifier/init.py", line 217, in state_attributes if HumidifierEntityFeature.MODES in self.supported_features: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: argument of type 'int' is not iterable

bdraco commented 10 months ago

https://github.com/home-assistant/core/pull/107026 https://github.com/home-assistant/core/milestone/640?closed=1

bdraco commented 10 months ago

https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation/

dotvezz commented 10 months ago

Ahh, I've been working on a more complete update since (until now) the deprecated features were non-breaking for this integration. But I'll get out a mini-release tonight to get humidifiers working again.

mundschenk-at commented 10 months ago

This is mitigated by HA 2024.1.1 which was just released.

dotvezz commented 10 months ago

Nice. That gives me some time to finish the comprehensive cleanup. Thanks for the info @mundschenk-at

LeeHarvey94 commented 10 months ago

This issue is also impacting my Purifier Hot+Cool Formaldehyde (climate and fan entities) since 2024.1 it's been showing as no longer being provided by the dyson_local integration.

codyc1515 commented 10 months ago

This should be resolved now on the latest version.

dotvezz commented 10 months ago

@codyc1515 you're beating me everywhere these days! Everyone having issues, please feel free to follow up if 1.3.7 doesn't resolve your problems.