Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daikin AC Becomes Unavailable in Auto Mode using AZAI6WSCDKB #89237

Closed
sup3rm3ga opened this issue Mar 6, 2023 · 10 comments · Fixed by #92796
Closed

Daikin AC Becomes Unavailable in Auto Mode using AZAI6WSCDKB #89237

sup3rm3ga opened this issue Mar 6, 2023 · 10 comments · Fixed by #92796

Comments

@sup3rm3ga
Copy link

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
Copy link

home-assistant bot commented Mar 6, 2023

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
Copy link
Author

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
Copy link
Contributor

Noltari commented Mar 6, 2023

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
Copy link
Contributor

Noltari commented Mar 6, 2023

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

@sup3rm3ga
Copy link
Author

sup3rm3ga commented Mar 6, 2023 via email

@sup3rm3ga
Copy link
Author

sup3rm3ga commented Mar 6, 2023 via email

@sup3rm3ga
Copy link
Author

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

@Noltari Noltari mentioned this issue Mar 6, 2023
19 tasks
@Noltari
Copy link
Contributor

Noltari commented Mar 9, 2023

Thanks for all the info that you provided @sup3rm3ga.
It should be fixed when #89256 is merged.
Please, don't hesitate to reopen this or contact me if it doesn't work :).

@plouf34
Copy link

plouf34 commented Mar 26, 2023

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

@Noltari
Copy link
Contributor

Noltari commented Mar 26, 2023

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.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants