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.11k stars 29.79k forks source link

Advantage Air myfan Auto not in sync #62362

Closed Kranzy closed 2 years ago

Kranzy commented 2 years ago

The problem

Using myfan setting in Advantage Air doesn't translate to HA auto mode.

When selecting 'Auto' fan speed in Home Assistant, the myplace tablet changes fan speed to high. Home Assistant will then reflect this change to high.

Setting the fan speed to myfan in the My Place app, the Home Assistant fan speed is empty (Showing 'Fan Speed')

What version of Home Assistant Core has the issue?

core-2021.12.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Advantage Air

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 2 years ago

advantage_air documentation advantage_air source (message by IssueLinks)

probot-home-assistant[bot] commented 2 years ago

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

Bre77 commented 2 years ago

Hey @Kranzy, when setting the fanspeed to Auto on my unit, it displays "high", but the API does correctly report its in auto. I added this mode because the API supports it, even though the Android app seemly does not.

I haven't heard of "myfan" before, and dont think its mentioned in the API docs (which isnt surprising). I am going to need to you to privately share with me the output of your API. Please browse to the following URL but replace the IP with the one you configured in Home Assistant. Feel free to remove/redact any private information like your location. http://192.168.x.x:2025/getSystemData

Kranzy commented 2 years ago

Thanks for the quick reply. What's the best way to privately share the data with you?

Kranzy commented 2 years ago

Apologies hit the wrong button when replying

Bre77 commented 2 years ago

Thanks for the quick reply. What's the best way to privately share the data with you?

brett.whynot@gmail.com

Annoyingly I don't get assigned my own issues so I am not getting notifications for your replies.

Kranzy commented 2 years ago

Have sent the email through to you.

Let me know if you need more information.

Cheers!

scidoner commented 2 years ago

This change breaks the AA integration completely when MyFan is enabled:

Logger: homeassistant.components.advantage_air
Source: components/advantage_air/__init__.py:41
Integration: Advantage Air ([documentation](https://www.home-assistant.io/integrations/advantage_air), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+advantage_air%22))
First occurred: 4:33:24 PM (2 occurrences)
Last logged: 4:34:06 PM

Unexpected error fetching Advantage Air data: 'ac1'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
    return await self.update_method()
  File "/usr/src/homeassistant/homeassistant/components/advantage_air/__init__.py", line 41, in async_get
    return await api.async_get()
  File "/usr/local/lib/python3.9/site-packages/advantage_air/__init__.py", line 54, in async_get
    if data['aircons'][ac]["info"].get("aaAutoFanModeEnabled") and data[ac]["info"].get("fan") == "autoAA":
KeyError: 'ac1'
scidoner commented 2 years ago

if data['aircons'][ac]["info"].get("aaAutoFanModeEnabled") and data[ac]["info"].get("fan") == "autoAA":

Should be

if data['aircons'][ac]["info"].get("aaAutoFanModeEnabled") and data['aircons'][ac]["info"].get("fan") == "autoAA":

Bre77 commented 2 years ago

Thanks @scidoner, I'll get that bug fixed and raise a PR as soon as I can.

scidoner commented 2 years ago

Thanks mate! Not sure if any other locations have a similar bug, worth a look!

Bre77 commented 2 years ago

@scidoner can you raise a new issue with the error you got, don't worry about adding much detail I just need something to file the PR against.

Bre77 commented 2 years ago

Thanks mate! Not sure if any other locations have a similar bug, worth a look!

I very recently added that code and can't test it as I don't have a MyAir5 system and my e-zone doesn't support that feature.

scidoner commented 2 years ago

Thanks mate! Not sure if any other locations have a similar bug, worth a look!

I very recently added that code and can't test it as I don't have a MyAir5 system and my e-zone doesn't support that feature.

All good mate, I can test anything you need with MyAir5

Kranzy commented 2 years ago

@Bre77 I am also able to test if you need me to.

Bre77 commented 2 years ago

@scidoner and @Kranzy, appreciate the offers.

If you have Visual Studio Code and Docker, you can run a development home assistant with my fixed branch, using this link https://open.vscode.dev/Bre77/core/tree/aa-0.3.1

If you have Python, download and extract https://github.com/Bre77/advantage_air/archive/refs/heads/master.zip, then run the usertests.py file and confirm your AC is changed to auto correctly.

Swallowtail23 commented 2 years ago

Updating to HA 2022.2.7 has broken my AdvantageAir integration. image

Swallowtail23 commented 2 years ago

If this upgrade was to be a Breaking Change it would have been nice to know...

thecode commented 2 years ago

If this upgrade was to be a Breaking Change it would have been nice to know...

Breaking changes are not approved for patch releases (e.g. update from 2022.2.6 to 2022.2.7). This is a closed issue, please create a new issue. Thanks

Swallowtail23 commented 2 years ago

I've since discovered https://github.com/home-assistant/core/issues/66642 and https://github.com/home-assistant/core/pull/66488... Re "Breaking changes are not approved for patch releases" - this was UNINTENTIONALLY a breaking change - perhaps I needed to put '/s'? /s