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

Return Ambient PWS brightness sensor unit and remove CONF_MONITORED_CONDITIONS #25284

Merged
merged 5 commits into from Jul 20, 2019

Conversation

@bachya
Copy link
Contributor

commented Jul 19, 2019

Breaking Change:

The unique_id for Ambient sensors uses a new formula, meaning that even though they have the same friendly names, new sensors will be created. The integration will automatically perform this migration under the hood, but if you've altered the entity IDs of any Ambient PWS entities, you'll need do the same to the new entities upon creation.

Additionally, the monitored_keys configuration option is no longer supported in configuration.yaml. The integration will now create sensors for all conditions supported by the particular device.

Description:

Following up on #24690, some Reddit users mentioned they preferred the old unit for the Ambient brightness sensor (Wm^2) instead of the new unit (lx). This PR gives users both: anytime a Wm^2 brightness sensor is created, a lx variant is created, as well.

This work also revealed an erroneous pattern in the unique_id property of Ambient sensors: they relied on the sensor name. Since the name can change, this PR also corrects unique_id to use the sensor type. This is a breaking change, as it will produce different entities than what users had before.

Lastly, based on feedback, this PR removes the monitored_conditions configuration key (per ADR-0003).

Related issue (if applicable): N/A

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#9903

Example entry for configuration.yaml (if applicable):

ambient_station:
  api_key: !secret ambient_api_key
  app_key: !secret ambient_app_key

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

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

@bachya bachya changed the title Return Ambient PWS brightness sensor (unit: W/m^2) Return Ambient PWS brightness sensor unit and remove CONF_MONITORED_CONDITIONS Jul 19, 2019

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 20, 2019

Please update the breaking change paragraph to include the removal of monitored_conditions.

@MartinHjelmare MartinHjelmare merged commit 693fa15 into home-assistant:dev Jul 20, 2019

9 checks passed

CI Build #20190720.3 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python35) Tests PyTest Python35 succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA

@bachya bachya referenced this pull request Jul 20, 2019

Merged

Remove CONF_MONITORED_CONDITIONS from Ambient PWS docs #9928

2 of 2 tasks complete

@bachya bachya deleted the bachya:ambient-brightness-sensor-2 branch Jul 20, 2019

@lock lock bot locked and limited conversation to collaborators Jul 21, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.