home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.96k stars 30.17k forks source link

Daikin AC Becomes Unavailable in Auto Mode using AZAI6WSCDKB #89237

Closed sup3rm3ga closed 1 year ago

sup3rm3ga commented 1 year ago

The problem

I have two AZAI6WSCDKB in local mode. When my units are set to Auto, the climate entity becomes "unavailable" and the following error appears in the log:

Logger: homeassistant
Source: components/airzone/climate.py:163
First occurred: 9:05:26 AM (1 occurrences)
Last logged: 9:05:26 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    tasks = [
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in <listcomp>
    tasks = [
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 73, in <genexpr>
    AirzoneClimate(
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 108, in __init__
    self._async_update_attrs()
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 163, in _async_update_attrs
    self._attr_hvac_action = HVAC_ACTION_LIB_TO_HASS[mode]
KeyError: <OperationMode.AUTO: 7>

What version of Home Assistant Core has the issue?

2023.3.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

AirZone

Link to integration documentation on our website

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

Diagnostics information

config_entry-airzone-4a9e7ad7e98896ea6580a0a457233e45.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant
Source: components/airzone/climate.py:163
First occurred: 9:05:26 AM (1 occurrences)
Last logged: 9:05:26 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    tasks = [
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in <listcomp>
    tasks = [
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 73, in <genexpr>
    AirzoneClimate(
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 108, in __init__
    self._async_update_attrs()
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 163, in _async_update_attrs
    self._attr_hvac_action = HVAC_ACTION_LIB_TO_HASS[mode]
KeyError: <OperationMode.AUTO: 7>


### Additional information

_No response_
home-assistant[bot] commented 1 year ago

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.

(message by CodeOwnersMention)


airzone documentation airzone source (message by IssueLinks)

sup3rm3ga commented 1 year ago

When setting the mode to "Heat / Cool" in the UI, the following error is returned with a GUI notification "failed to call service" (the other modes work fine):

Logger: homeassistant.components.websocket_api.http.connection
Source: components/airzone/climate.py:163
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 9:45:35 AM (2 occurrences)
Last logged: 9:45:59 AM

[140006804639936] <OperationMode.AUTO: 7>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 198, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1808, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1845, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 686, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 726, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 139, in async_set_hvac_mode
    await self._async_update_hvac_params(params)
  File "/usr/src/homeassistant/homeassistant/components/airzone/entity.py", line 156, in _async_update_hvac_params
    self.coordinator.async_set_updated_data(self.coordinator.airzone.data())
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 360, in async_set_updated_data
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 135, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 151, in _handle_coordinator_update
    self._async_update_attrs()
  File "/usr/src/homeassistant/homeassistant/components/airzone/climate.py", line 163, in _async_update_attrs
    self._attr_hvac_action = HVAC_ACTION_LIB_TO_HASS[mode]
KeyError: <OperationMode.AUTO: 7>
Noltari commented 1 year ago

Hi @sup3rm3ga,

So the main problem with Auto / Heat & Cool mode on the Airzone integration is that it has never been tested since my device doesn't support it. In fact, as far as I know, for full compatibility with the Auto mode of Airzone devices, we should use the double temperature setpoints and right now, only single is supported.

I need to look into this, but we could try by adding a new key to HVAC_ACTION_LIB_TO_HASS https://github.com/home-assistant/core/blob/dev/homeassistant/components/airzone/climate.py#L42:

HVAC_ACTION_LIB_TO_HASS: Final[dict[OperationMode, HVACAction]] = {
    ...
    OperationMode.AUTO: HVACAction.IDLE,
}

This will always show the climate as idling, but at least it won't throw an exception.

Probably the proper way of solving this would be implementing a detection at the aioqsw library which would return "COOLING", "HEATING" or "IDLE" depending on the current temperature and the double setpoint...

Noltari commented 1 year ago

BTW @sup3rm3ga, can you provide the diagnostics data from your integration?

sup3rm3ga commented 1 year ago

I think I added it to the original posting. Do you see it?

From: Álvaro Fernández Rojas @.> Date: Monday, March 6, 2023 at 11:40 AM To: home-assistant/core @.> Cc: sup3rm3ga @.>, Mention @.> Subject: Re: [home-assistant/core] Daikin AC Becomes Unavailable in Auto Mode using AZAI6WSCDKB (Issue #89237)

BTW @sup3rm3gahttps://github.com/sup3rm3ga, can you provide the diagnostics data from your integration?

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/89237#issuecomment-1456485520, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA2V3JBTTSHPNDREPNKFHPLW2YHOHANCNFSM6AAAAAAVRG4ULQ. You are receiving this because you were mentioned.Message ID: @.***>

sup3rm3ga commented 1 year ago

I can’t say for sure, but I would like you to know that there is still only one temperature setting on the device when it is in “Auto” mode. It seems like it just tries to reach the given temperature whether that requires Heat or Cool mode. In other words, “Idle” doesn’t seem to be a thing, nor do there appear to be 2 setpoints for Auto mode.

From: Álvaro Fernández Rojas @.> Date: Monday, March 6, 2023 at 11:39 AM To: home-assistant/core @.> Cc: sup3rm3ga @.>, Mention @.> Subject: Re: [home-assistant/core] Daikin AC Becomes Unavailable in Auto Mode using AZAI6WSCDKB (Issue #89237)

Hi @sup3rm3gahttps://github.com/sup3rm3ga,

So the main problem with Auto / Heat & Cool mode on the Airzone integration is that it has never been tested since my device doesn't support it. In fact, as far as I know, for full compatibility with the Auto mode of Airzone devices, we should use the double temperature setpoints and right now, only single is supported.

I need to look into this, but we could try by adding a new key to HVAC_ACTION_LIB_TO_HASS https://github.com/home-assistant/core/blob/dev/homeassistant/components/airzone/climate.py#L42:

HVAC_ACTION_LIB_TO_HASS: Final[dict[OperationMode, HVACAction]] = {

...

OperationMode.AUTO: HVACAction.IDLE,

}

This will always show the climate as idling, but at least it won't throw an exception.

Probably the proper way of solving this would be implementing a detection at the aioqsw library which would return "COOLING", "HEATING" or "IDLE" depending on the current temperature and the double setpoint...

— Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/89237#issuecomment-1456483566, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA2V3JCGTOZRR4XPISY6WP3W2YHLDANCNFSM6AAAAAAVRG4ULQ. You are receiving this because you were mentioned.Message ID: @.***>

sup3rm3ga commented 1 year ago

IMG_4878 IMG_4879 IMG_4880 Here are pictures from the DKN Cloud app to show you what I mean.

Noltari commented 1 year ago

Thanks for all the info that you provided @sup3rm3ga. It should be fixed when https://github.com/home-assistant/core/pull/89256 is merged. Please, don't hesitate to reopen this or contact me if it doesn't work :).

plouf34 commented 1 year ago

Hello Since last night and daylight saving time, the integration doesn’t work anymore

Noltari commented 1 year ago

Hello

Since last night and daylight saving time, the integration doesn’t work anymore

Hi @plouf34, is it the same error as @sup3rm3ga? This should be fixed once the PR that I opened is reviewed and merged... If it's not the same error, please open a new PR with logs and any additional information that you can provide as @sup3rm3ga did.