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

Refactor tahoma integration and move to overkiz domain #49403

Closed
wants to merge 14 commits into from
Closed

Conversation

iMicknl
Copy link
Contributor

@iMicknl iMicknl commented Apr 19, 2021

(work in progress, this PR description will be updated every time rework-tahoma will be merged)

Breaking change

The broken tahoma integration will be replaced with the new overkiz integration. A user would manually need to create a new config entry for the Overkiz integration via the Config Flow, however they are helped with device discovery via DHCP.

  • Entities now use entity ids based on their unique device url.
  • Changed MotionSensor, SmokeSensor, ContactSensor mapping from sensor to binary_sensor.
  • Changed GarageDoor mapping from switch to cover.
  • Changed OnOffLight from switch to light
  • Stateless devices (RTS) will be marked as assumed_state = True.
  • Support for excluding devices has been removed. Use the disable entities feature, which is provided by Home Assistant.

Proposed change

General

  • Supports Config Flow with reauth and Options Flow, with DHCP discovery
  • Many of the 6000 supported Overkiz brands are now supported out of the box since we moved away from a hardcoded list of supported devices. Every device will be mapped based on their category and available states and commands.
    • For example this integrations now supports pergolas, gates, swimming pools, curtains, electricity sensors, humidity sensors, temperature sensors, air sensors, heating systems, rgb lights.
  • Uses new async Python API with better exception handling and retry logic
  • Uses DataUpdateCoordinator to update all entity states via one call. Implements an event listener constantly listening to new events (even outside Home Assistant) to be more reliable and to consume less resources, which will result in no more TooManyRequests exceptions.
  • Gateway (hub) is added as a device in the Device Registry
  • Overkiz area's are added as suggested area's on first load
  • Adds support for other OverKiz based hubs, like Atlantic Cozytouch, Hitachi Hi Kumo, Nexity Eugénie, Rexel Energeasy Connect
  • Add support for other Somfy area's, like Australia and North America

Cover

  • Improved cover platform with support for tilt position and indication if a cover is opening or closing.
  • All cover movement can now be cancelled, even when action was initiated outside Home Assistant.

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

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:

@probot-home-assistant
Copy link

Hey there @philklei, mind taking a look at this pull request as its been labeled with an integration (tahoma) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@iMicknl iMicknl changed the title Refator tahoma integration and move to overkiz domain Refactor tahoma integration and move to overkiz domain Apr 19, 2021
@balloob
Copy link
Member

balloob commented Apr 19, 2021

Why change the name?

@iMicknl
Copy link
Contributor Author

iMicknl commented Apr 19, 2021

Why change the name?

See the discussion in #49165 (comment).

TLDR: this integration now support IoT platforms of multiple vendors based on the Overkiz API platform. Not just TaHoma, but also Cozytouch (custom integration now), Hi Kumo (custom integration now) and more.

@iMicknl
Copy link
Contributor Author

iMicknl commented Apr 29, 2021

Would someone be able to rebase rework-tahoma on dev? There have been quite some basic changes lately that would impact this PR.

Let's see if we can get this one to core first, and later on add the other platforms directly to dev.

@iMicknl
Copy link
Contributor Author

iMicknl commented Jul 14, 2021

Any way to move this forward? We are massively out of sync and I am not sure what the best way is for us to move this forward.

Have this PR rebased and create new PR's that target this branch, or would another strategy make more sense? Currently 240+ users are using this custom integration (see https://analytics.home-assistant.io/custom_integrations.json) and I believe this would be a lot more with autodiscovery in core.

@Quentame
Copy link
Member

Quentame commented Sep 22, 2021

Hi @iMicknl !

Going to review 🎉

I have only a Thermor Cozytouch (Thermor is a brand from Atlantic) to test, but not (yet) a water_heater/climate platform in this integration ?

Checking #49641 first.

@iMicknl
Copy link
Contributor Author

iMicknl commented Sep 22, 2021

Hi @iMicknl !

Going to review 🎉

I have only a Thermor Cozytouch (Thermor is a brand from Atlantic) to test, but not (yet) a water_heater platform in this integration ?

Checking #49641 first.

Thanks @Quentame! Could you perhaps briefly get in touch with me on Discord (iMick#1903)? I am in favour of updating this PR first, since https://github.com/iMicknl/ha-tahoma had many (good) changes lately. The Overkiz integration as custom component should also offer your Cozytouch devices already.
I don't want to waste review time on something that is perhaps already fixed.

We would love to see this being part of Hacktoberfest, having the Overkiz integration in and the obsolete TaHoma integration removed.

Copy link
Member

@Quentame Quentame left a comment

Choose a reason for hiding this comment

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

Review WIP

.coveragerc Show resolved Hide resolved
homeassistant/components/overkiz/const.py Show resolved Hide resolved
Dev automation moved this from Incoming to Review in progress Sep 22, 2021
@bdraco
Copy link
Member

bdraco commented Dec 19, 2021

Any way to move this forward? We are massively out of sync and I am not sure what the best way is for us to move this forward.

Have this PR rebased and create new PR's that target this branch, or would another strategy make more sense? Currently 240+ users are using this custom integration (see analytics.home-assistant.io/custom_integrations.json) and I believe this would be a lot more with autodiscovery in core.

If the tahoma integration is completely broken, we should remove it.

Since everything is really out of sync, how about bringing in the component as a new integration in the overkiz namespace, starting with the base __init__.py and the simplest platform. Then we can merge each platform as if it is a new integration. It should avoid the need for the intermediate branch and make things usable right away.

@iMicknl
Copy link
Contributor Author

iMicknl commented Dec 19, 2021

@bdraco you are right. We discussed this a while ago with @Quentame and that seems the best strategy to me.

  1. Remove broken tahoma integration from core
  2. Start a new PR for overkiz when we are ready

We have been working on the custom component and are quite in sync with core changes, just the typing is something where we would need to spend more work. However, currently we have some reliability issues that are impacting many users, thus we wait until we figured out a fix with Somfy for that.

I will close this PR for now.

@iMicknl iMicknl closed this Dec 19, 2021
Dev automation moved this from Review in progress to Cancelled Dec 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2021
@Quentame Quentame deleted the rework-tahoma branch February 16, 2022 13:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.