nbogojevic/homeassistant-midea-air-appliances-lan

Error adding entities for domain humidifier with platform midea_dehumidifier_lan

gianlucasullazzo opened this issue · 1 comments

after upgrade HA to https://www.home-assistant.io/blog/2024/01/03/release-20241/ , my humidifiers went unavailables.
Here what I see from logs:

raceback (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 1277, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/midea_dehumidifier_lan/appliance_coordinator.py", line 181, in async_added_to_hass
    self.on_online(True)
  File "/config/custom_components/midea_dehumidifier_lan/humidifier.py", line 97, in on_online
    super().on_online(update)
  File "/config/custom_components/midea_dehumidifier_lan/appliance_coordinator.py", line 238, in on_online
    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

duplicated of #130