Skip to content

Conversation

@Noltari
Copy link
Contributor

@Noltari Noltari commented Dec 28, 2020

Breaking change

Tado zone sensors will be replaced by their corresponding binary_sensors. Therefore, users will have to update lovelace panels, scripts and automations referring to the following sensors by their corresponding binary sensor (replace sensor with binary_sensor)

  • sensor.%TADO_ZONE%_early_start will be replaced by binary_sensor.%TADO_ZONE%_early_start
  • sensor.%TADO_ZONE%_link will be replaced by binary_sensor.%TADO_ZONE%_link
  • sensor.%TADO_ZONE%_open_window will be replaced by binary_sensor.%TADO_ZONE%_open_window
  • sensor.%TADO_ZONE%_overlay will be replaced by binary_sensor.%TADO_ZONE%_overlay
  • sensor.%TADO_ZONE%_power will be replaced by binary_sensor.%TADO_ZONE%_power

The following state attributes have been removed:

  • sensor.%TADO_ZONE%_overlay: termination
  • sensor.%TADO_ZONE%_open_window: open_window_attr

Proposed change

Use binary sensors where appropriate (for Tado Zones) instead of normal sensors.

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: !secret tado_username
  password: !secret tado_password

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:

@michaelarnauts
Copy link
Contributor

You'll need to rebase since the changes from #44571 are also in this PR.

@Noltari
Copy link
Contributor Author

Noltari commented Dec 28, 2020

You'll need to rebase since the changes from #44571 are also in this PR.

@michaelarnauts done :)

@MartinHjelmare MartinHjelmare changed the title Tado: add zone binary sensors Add tado zone binary sensors Dec 30, 2020
Copy link
Contributor

@michaelarnauts michaelarnauts left a comment

Choose a reason for hiding this comment

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

This looks fine, but I'm not really sure what the policy is regarding the description of the breaking change.

@MartinHjelmare
Copy link
Member

Please be explicit when naming the entity types that are breaking in the breaking change paragraph. Also briefly explain what users need to do to cope with the breaking change.

@Noltari
Copy link
Contributor Author

Noltari commented Dec 31, 2020

Please be explicit when naming the entity types that are breaking in the breaking change paragraph. Also briefly explain what users need to do to cope with the breaking change.

Done:

Breaking change

Tado zone sensors will be replaced by their corresponding binary_sensors:

  • sensor.%TADO_ZONE%_early_start will be replaced by binary_sensor.%TADO_ZONE%_early_start
  • sensor.%TADO_ZONE%_link will be replaced by binary_sensor.%TADO_ZONE%_link
  • sensor.%TADO_ZONE%_open_window will be replaced by binary_sensor.%TADO_ZONE%_open_window
  • sensor.%TADO_ZONE%_overlay will be replaced by binary_sensor.%TADO_ZONE%_overlay
  • sensor.%TADO_ZONE%_power will be replaced by binary_sensor.%TADO_ZONE%_power

@MartinHjelmare
Copy link
Member

Please also mention what users should do to cope with this change. Eg update these entity ids in automations and scripts that depend on the ids.

@Noltari
Copy link
Contributor Author

Noltari commented Jan 1, 2021

Please also mention what users should do to cope with this change. Eg update these entity ids in automations and scripts that depend on the ids.

Done:

Breaking change

Tado zone sensors will be replaced by their corresponding binary_sensors. Therefore, users will have to update lovelace panels, scripts and automations referring to the following sensors by their corresponding binary sensor (replace sensor with binary_sensor):

  • sensor.%TADO_ZONE%_early_start will be replaced by binary_sensor.%TADO_ZONE%_early_start
  • sensor.%TADO_ZONE%_link will be replaced by binary_sensor.%TADO_ZONE%_link
  • sensor.%TADO_ZONE%_open_window will be replaced by binary_sensor.%TADO_ZONE%_open_window
  • sensor.%TADO_ZONE%_overlay will be replaced by binary_sensor.%TADO_ZONE%_overlay
  • sensor.%TADO_ZONE%_power will be replaced by binary_sensor.%TADO_ZONE%_power

These should be binary sensors.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
@MartinHjelmare
Copy link
Member

Please try to avoid squashing commits after review has started, to make it easier for readers to track changes.

@Noltari
Copy link
Contributor Author

Noltari commented Jan 1, 2021

Please try to avoid squashing commits after review has started, to make it easier for readers to track changes.

Ok, I will avoid it in the future.
Excuse me but it's the usual procedure in other projects.

@frenck
Copy link
Member

frenck commented Jan 1, 2021

Not in this project. We squash on merge, making the PR clean in the end. Individual commits are trackable/more visible to see what has been changed over time in the PR during a review.

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!

@MartinHjelmare
Copy link
Member

MartinHjelmare commented Jan 1, 2021

Please add the Binary Sensor ha_category to the docs page and link the docs PR in this PR description.

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

@Noltari
Copy link
Contributor Author

Noltari commented Jan 2, 2021

Please add the Binary Sensor ha_category to the docs page and link the docs PR in this PR description.

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

Done: home-assistant/home-assistant.io#16076

@MartinHjelmare
Copy link
Member

Thanks!

@MartinHjelmare MartinHjelmare merged commit 067f2d0 into home-assistant:dev Jan 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 3, 2021
@Noltari Noltari deleted the tado-zone-binary branch January 12, 2021 08:08
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.

6 participants