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

Fix duplicate sensors being created #25 #45

Merged
merged 1 commit into from
Jan 22, 2023
Merged

Fix duplicate sensors being created #25 #45

merged 1 commit into from
Jan 22, 2023

Conversation

hmmbob
Copy link
Contributor

@hmmbob hmmbob commented Jan 21, 2023

Fix for duplicate sensor setup as described in #25.

If one has both electricity and gas from Zonneplan, one will have two connections in the response. The electricity connection contains all relevant data, such as electricity and gas prices. The gas connection lacks a lot of information, but is still getting setup:

https://github.com/fsaris/home-assistant-zonneplan-one/blob/main/custom_components/zonneplan_one/coordinator.py#L87-L90

This PR first tries to use the electricity connection to poll for the summary data and if successful skips retrieving the summary data for the gas connection.

If you are affected by this bug, follow these steps:

  • Update the Zonneplan component through HACS
  • Restart Home Assistant
  • In Home Assistant click on Configuration and click on Integrations
  • Remove Zonneplan, and then re-add Zonneplan

Likely introduced in 11e9adb
Fixes #25

@hmmbob hmmbob mentioned this pull request Jan 21, 2023
@fsaris
Copy link
Owner

fsaris commented Jan 22, 2023

Tnx for the PR. Nice find

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double sensors?
2 participants