core icon indicating copy to clipboard operation
core copied to clipboard

Airzone integration has no climate entities.

Open dashdriverdan opened this issue 1 year ago • 2 comments

The problem

The local Airzone integration shows devices for the webserver, system and each zone. These devices have various binarysensor, select, and sensor entities, but no climate entities.

What version of Home Assistant Core has the issue?

core-2024.10.1

What was the last working version of Home Assistant Core?

N/A

What type of installation are you running?

Home Assistant Container

Integration causing the issue

airzone

Link to integration documentation on our website

https://www.home-assistant.io/integrations/airzone

Diagnostics information

home-assistant_airzone_2024-10-04T21-45-51.890Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-10-04 17:45:53.385 ERROR (MainThread) [homeassistant.components.climate] Error while setting up airzone platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 369, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 628, in async_add_entities
    for entity in new_entities:
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 118, in <genexpr>
    AirzoneClimate(
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 161, in __init__
    HVAC_MODE_LIB_TO_HASS[mode] for mode in self.get_airzone_value(AZD_MODES)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: <OperationMode.UNKNOWN: -1>

Additional information

No response

dashdriverdan avatar Oct 04 '24 22:10 dashdriverdan

Hey there @noltari, mind taking a look at this issue as it has been labeled with an integration (airzone) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of airzone can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign airzone Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


airzone documentation airzone source (message by IssueLinks)

home-assistant[bot] avatar Oct 04 '24 22:10 home-assistant[bot]

Hi @dashdriverdan,

It seems that your Airzone device supports a new OperationMode for Auxiliary Heating (value = 6), which didn't exist when I originally implemented the Local API support. I've added a quick fix with the new mode in the following PR: https://github.com/home-assistant/core/pull/127792 However, I still need to find out if it's possible to implement that new HVAC Mode in Home Asssistant, since the Auxiliary Heating functionality is now deprecated...

Noltari avatar Oct 07 '24 09:10 Noltari

Hi @Noltari . Thank you for your quick work, it seems you nailed down the issue. However, 2024.10.2 hasn't resolved the issue and the same error is present.

I have two homes in my HA server, and as such two Airzone servers, one with Aux Heat, one currently without. The one without has climate entities, the other still does not. I don't know if there is perhaps some other issue, or if the fix somehow wasn't included in the update.

2024-10-12 21:13:48.381 ERROR (MainThread) [homeassistant.components.climate] Error while setting up airzone platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 369, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 628, in async_add_entities for entity in new_entities: File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 118, in <genexpr> AirzoneClimate( File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 161, in __init__ HVAC_MODE_LIB_TO_HASS[mode] for mode in self.get_airzone_value(AZD_MODES) ~~~~~~~~~~~~~~~~~~~~~^^^^^^ KeyError: <OperationMode.UNKNOWN: -1>

dashdriverdan avatar Oct 13 '24 01:10 dashdriverdan

Hi @Noltari . Thank you for your quick work, it seems you nailed down the issue. However, 2024.10.2 hasn't resolved the issue and the same error is present.`

For some reason, even though the PR was added to the 2024.10.2 milestone, it wasn't cherry-picked to that version, since I can't see it in the tag history... https://github.com/home-assistant/core/releases/tag/2024.10.2 https://github.com/home-assistant/core/compare/2024.10.1...2024.10.2

Noltari avatar Oct 13 '24 07:10 Noltari