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

Airtouch4 integration #43513

Merged
merged 12 commits into from
Aug 17, 2021

Conversation

samsinnamon
Copy link
Contributor

@samsinnamon samsinnamon commented Nov 22, 2020

Proposed change

Adds integration with AirTouch 4 smart AC Controllers. This has been discussed in a few forum posts: https://community.home-assistant.io/t/airtouch-4-integration-aus/233295/ and https://community.home-assistant.io/t/polyaire-air-touch-2-or-3/19650/21

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml
should be configured by the config flow, which just takes an ip address of a local AirTouch 4 controller

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

Copy link
Contributor

@cmroche cmroche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samsinnamon
Copy link
Contributor Author

@cmroche thanks for reviewing this. Is there anything that I need to do to move this to the next stage or is it just a case of waiting? (sorry if that's a dumb question, first open source PR)

@noobydp
Copy link

noobydp commented Feb 7, 2021

Howdy everyone, any chance we can get this finalised soon?
Thanks :)

@samsinnamon
Copy link
Contributor Author

Howdy everyone, any chance we can get this finalised soon?
Thanks :)

Hi @noobydp, any idea of who needs to be contacted to move this forward? I've been waiting for any feedback or someone to move it forward, but have heard nothing since last year

@noobydp
Copy link

noobydp commented Feb 7, 2021

Howdy everyone, any chance we can get this finalised soon?
Thanks :)

Hi @noobydp, any idea of who needs to be contacted to move this forward? I've been waiting for any feedback or someone to move it forward, but have heard nothing since last year

Sorry I dont know, I'm just an innocent bystander :P
@cgarwood are you able to help?

@samsinnamon
Copy link
Contributor Author

Howdy everyone, any chance we can get this finalised soon?
Thanks :)

Hi @noobydp, any idea of who needs to be contacted to move this forward? I've been waiting for any feedback or someone to move it forward, but have heard nothing since last year

Sorry I dont know, I'm just an innocent bystander :P
@cgarwood are you able to help?

@frenck sorry to tag you but you were really quick on the documentation PRs - are you able to give us any guidance on how to get this integration moved forward? Seems like it has been parked for months and I'm not really sure what to do. There's a bunch of people really keen for it, and we'd all like to work on adding improvements!

Copy link
Contributor

@iMicknl iMicknl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look at your code and had the following remarks. Hopefully it is helpful.

homeassistant/components/airtouch4/climate.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/climate.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/climate.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/climate.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/climate.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/strings.json Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
@samsinnamon
Copy link
Contributor Author

I had a look at your code and had the following remarks. Hopefully it is helpful.

@iMicknl thank you greatly for taking the time to look through this PR and give it a review - I have attempted to address all the things you raised (and have also merged in some minor tweaks to the behaviour/bug fixes requested by the community members who have been testing the integration) - let me know if there is anything else that needs changing :)

homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/climate.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
@samsinnamon
Copy link
Contributor Author

@MartinHjelmare thanks very much for all your work reviewing this PR, really appreciate it - hopefully 3rd time's the charm! Please let me know if anything else is needed :)

@salty2011
Copy link

@LonePurpleWolf just an FYI the manifest.json is missing a version tag. In the lastest Home Assistant version this appear to prevent the integration from loading as a result.

As a test I added a version tag into the manifest and restarted HA and this then allowed the integration to load correctly in the lastest version of HA

@samsinnamon
Copy link
Contributor Author

samsinnamon commented Jul 20, 2021

@LonePurpleWolf just an FYI the manifest.json is missing a version tag. In the lastest Home Assistant version this appear to prevent the integration from loading as a result.

As a test I added a version tag into the manifest and restarted HA and this then allowed the integration to load correctly in the lastest version of HA

@salty2011 do you have a reference for this? I could just be looking in the wrong place but I can't find any other integrations with a version tag - I know that custom integrations required a version tag https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes/ - if you're trying to use this integration by manually adding it as a custom integration that is outside the scope of this PR as discussed here https://community.home-assistant.io/t/airtouch-4-integration-aus/233295/76 (and is mostly a workaround for the fact this PR has been waiting 6 months) - if not, please let me know where I need to put a versions tag

Thanks!

@frenck
Copy link
Member

frenck commented Jul 21, 2021

This is a core integration addition, core integrations don't need a version tag. That comment is incorrect.

@salty2011
Copy link

@LonePurpleWolf @frenck ,apologies wasnt aware that core integration didn't require the tag. Just something I came across while trying to manually test the integration.

Aside from that, appear to be working well

@frenck
Copy link
Member

frenck commented Jul 21, 2021

@LonePurpleWolf Quick scan over this PR (sorry first time for me looking at this code), it looks pretty nice at first glance!

So, let's get this train choo choo-ing 🚂

I think it is best if you'd rebased this PR onto the latest dev branch before doing anything at this point. After that, see if we can get the builds fixed.

At that point, I think we can do some minor upgrades/changes that reduce the code a bit, since, after the rebase, this PR will have access to some nice helpers that allow for that.

If you have any questions, please let me know, I'm happy to help.

../Frenck

@samsinnamon samsinnamon force-pushed the airtouch4-integration branch from 4038fc7 to 4dbe291 Compare July 21, 2021 12:24
@samsinnamon
Copy link
Contributor Author

Hi @frenck thanks very much for taking a look! I have (hopefully) rebased onto more recent code, and also hoping that the builds might get a bit further this time (made a slight change to the external library). Let me know if theres things you think should be changed to use new helpers (not too sure what is available sorry)

@samsinnamon samsinnamon force-pushed the airtouch4-integration branch from ceeb658 to 3fc82d4 Compare August 17, 2021 07:16
@samsinnamon
Copy link
Contributor Author

@MartinHjelmare @frenck hoping I've addressed the stuff you guys raised in the last round of code review - thanks for all the suggestions!

Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/climate.py Outdated Show resolved Hide resolved
homeassistant/components/airtouch4/config_flow.py Outdated Show resolved Hide resolved
@samsinnamon samsinnamon requested a review from ludeeus August 17, 2021 13:47
@MartinHjelmare MartinHjelmare merged commit 35f563e into home-assistant:dev Aug 17, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.