smartHomeHub / SmartIR

Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
MIT License
2.03k stars 1k forks source link

Smart IR nolonger working after update to 2024.1.b0 and b1 #1182

Open rodgrech opened 9 months ago

rodgrech commented 9 months ago

Home Assistant version Core 2024.1.0b1 Supervisor 2023.12.1 Operating System 11.3.rc1 Frontend 20231228.0

SmartIR version 1.17.9 SmartIR configuration

  - platform: smartir
    name: Dining Room Aircon
    unique_id: dining_ac2850
    device_code: 1067
    controller_data: remote.dining_room
    temperature_sensor: sensor.dining_room_temperature
    humidity_sensor: sensor.dining_room_humidity
    power_sensor: sensor.diningacgpo_power

Describe the bug

Since upgrading to 2024.1.b0 and b1, the integration is unable to setup. removing the humidity sensor makes no difference.

Debug log

`Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:507
Integration: Climate ([documentation](https://rc.home-assistant.io/integrations/climate), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+climate%22))
First occurred: 2:59:57 PM (1 occurrences)
Last logged: 2:59:57 PM

Error adding entities for domain climate with platform smartir
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 662, in _async_add_entity
    capabilities=entity.capability_attributes,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 333, in capability_attributes
    if ClimateEntityFeature.TARGET_HUMIDITY in supported_features:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable`
`Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:368
Integration: Climate ([documentation](https://rc.home-assistant.io/integrations/climate), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+climate%22))
First occurred: 2:59:57 PM (1 occurrences)
Last logged: 2:59:57 PM

Error while setting up smartir platform for climate
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 662, in _async_add_entity
    capabilities=entity.capability_attributes,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 333, in capability_attributes
    if ClimateEntityFeature.TARGET_HUMIDITY in supported_features:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable`
BenJamesAndo commented 9 months ago

I had the same issue. It's working in beta 3. It likely started working again in beta 2. But there still is a deprecation notice.

HVAC_MODE_FAN_ONLY was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.FAN_ONLY instead, please report it to the author of the 'smartir' custom integration HVAC_MODE_AUTO was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'smartir' custom integration SUPPORT_TARGET_TEMPERATURE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'smartir' custom integration SUPPORT_FAN_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.FAN_MODE instead, please report it to the author of the 'smartir' custom integration SUPPORT_SWING_MODE was used from smartir, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.SWING_MODE instead, please report it to the author of the 'smartir' custom integration

litinoveweedle commented 6 months ago

Hi, I just pushed PR https://github.com/smartHomeHub/SmartIR/pull/1231 fixing all those warning and errors.

@vassilis-panos Coudl you please review it, merge it and release if suitable? It also seems, that you have many PR pending, mostly related to new added codes. Are you planning to merge those? If you need any help please let me know.

If anyone would like to meanwhile get rid of the errors, you can use my fork from here: https://github.com/litinoveweedle/SmartIR