Skip to content

Fix sensor type creation with multiple Ambient weather stations#30850

Merged
balloob merged 1 commit into
home-assistant:devfrom
bachya:ambient-temp-sensors
Jan 16, 2020
Merged

Fix sensor type creation with multiple Ambient weather stations#30850
balloob merged 1 commit into
home-assistant:devfrom
bachya:ambient-temp-sensors

Conversation

@bachya
Copy link
Copy Markdown
Contributor

@bachya bachya commented Jan 16, 2020

Description:

The ambient_pws integration had a bug where, despite supporting multiple weather stations, the same sensor types would be created for every station – even if different stations had different sensor types attached to them. This PR fixes that.

Related issue (if applicable): fixes #30513

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

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

@bachya bachya self-assigned this Jan 16, 2020
@balloob balloob added this to the 0.104.1 milestone Jan 16, 2020
Copy link
Copy Markdown
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

Ok to fix this now. We should move to drop monitored conditions as per adr 003

@balloob balloob merged commit 9bfcd04 into home-assistant:dev Jan 16, 2020
@balloob balloob mentioned this pull request Jan 16, 2020
@bachya bachya deleted the ambient-temp-sensors branch January 16, 2020 20:03
@bachya
Copy link
Copy Markdown
Contributor Author

bachya commented Jan 16, 2020

@balloob Even though I use the monitored_conditions nomenclature, it's not doing the same thing that ADR 003 is designed to address: I only create sensors for data that is represented in the API call; I don't allow people to specify what sensors they want to ignore via YAML.

@balloob
Copy link
Copy Markdown
Member

balloob commented Jan 16, 2020

Ok!

@lock lock Bot locked and limited conversation to collaborators Jan 17, 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.

Multiple weather stations - Not all sensors are pulled.

3 participants