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

Add support of multiple Tado accounts #31527

Merged
merged 5 commits into from
Feb 11, 2020
Merged

Conversation

gorynychzmey
Copy link
Contributor

@gorynychzmey gorynychzmey commented Feb 6, 2020

Added support of multiple Tado accounts
Changed generation of sensor unique id.
FIxed error detecting opened window.

Breaking change

Changed generation of unique id of sensor and climate - now it includes id of home.

Proposed change

RIght now Tado has no native support of multiple bridges in one account. This change allows to add multiple Tado accounts to HASS.

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
tado:
  - username: [email protected]
    password: !secret tado_pwd1
  - username: [email protected]
    password: !secret tado_pwd2

In case of only one account this configuration will also work:

# Example configuration.yaml
tado:
    username: [email protected]
    password: !secret tado_pwd

Additional information

Important: chrism0dwk/PyTado#10 must be merged into PyTado to this change to work correctly.

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

Changed geberation of sensor unique id (breaking change)
@probot-home-assistant probot-home-assistant bot added integration: tado merging-to-master This PR is merging into the master branch and should probably change the branch to `dev`. labels Feb 6, 2020
@probot-home-assistant
Copy link

Hey there @michaelarnauts, mind taking a look at this pull request as its been labeled with a integration (tado) you are listed as a codeowner for? Thanks!

@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #31527 into dev will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #31527      +/-   ##
==========================================
+ Coverage   94.58%   94.66%   +0.07%     
==========================================
  Files         746      762      +16     
  Lines       54025    55017     +992     
==========================================
+ Hits        51101    52081     +980     
- Misses       2924     2936      +12     
Impacted Files Coverage Δ
homeassistant/components/updater/binary_sensor.py 92.10% <0.00%> (-7.90%) ⬇️
homeassistant/__init__.py 88.46% <0.00%> (-7.38%) ⬇️
homeassistant/components/light/device_action.py 93.93% <0.00%> (-6.07%) ⬇️
homeassistant/components/unifi/config_flow.py 95.60% <0.00%> (-4.40%) ⬇️
homeassistant/components/unifi/controller.py 94.88% <0.00%> (-3.95%) ⬇️
homeassistant/components/hue/bridge.py 72.07% <0.00%> (-3.42%) ⬇️
homeassistant/components/unifi/switch.py 92.92% <0.00%> (-2.61%) ⬇️
homeassistant/components/zha/cover.py 93.93% <0.00%> (-2.03%) ⬇️
homeassistant/components/deconz/deconz_device.py 93.87% <0.00%> (-0.47%) ⬇️
homeassistant/components/alexa/capabilities.py 93.37% <0.00%> (-0.19%) ⬇️
... and 61 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8b4bd95...9995928. Read the comment docs.

@frenck
Copy link
Member

frenck commented Feb 6, 2020

Please don't merge to master, target the dev branch.

@gorynychzmey gorynychzmey changed the base branch from master to dev February 6, 2020 12:49
@balloob balloob removed the merging-to-master This PR is merging into the master branch and should probably change the branch to `dev`. label Feb 6, 2020
@balloob
Copy link
Member

balloob commented Feb 6, 2020

Why not migrate to config entries ?

@gorynychzmey gorynychzmey marked this pull request as ready for review February 6, 2020 17:45
@MartinHjelmare MartinHjelmare changed the title Added support of multiple Tado accounts Add support of multiple Tado accounts Feb 6, 2020
@balloob balloob merged commit 3df2cb6 into home-assistant:dev Feb 11, 2020
@gorynychzmey gorynychzmey deleted the master branch February 11, 2020 19:33
@lock lock bot locked and limited conversation to collaborators Feb 12, 2020
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.

5 participants