-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
Remove duplicate sensors on single phase HomeWizard meters #104493
Conversation
Hey there @DCSBL, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, it took me some time to understand how this works.
Looks good to me now :-)
Thnx @frenck 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When testing with the suggested changes applied in an actual Home Assistant instance, I get the same result that this PR initially tries to fix.
I can't figure out why Pytest does not agree, it can't find sensor.device_total_energy_import
...
4fd5e9c
to
1e73c32
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍 Just a minor doc-thingy but that should be it!
Co-authored-by: Duco Sebel <[email protected]>
Nice! Should we do this with |
Breaking change
HomeWizard HWE-SKE (the wall plugs), SDM230, and SDM630 provided duplicate sensors for energy import and export: A total and a tariff of 1. As there is only a single tariff available on those, the total and tariff 1 are always the same. To clean this up, tariff 1 has been removed.
If you used this sensor in your energy dashboard, you will need to configure your energy dashboard to use the total import/export sensor instead.
Proposed change
The HomeWizard devices that monitor a single phase have some oddness in the user experience.
Tests have been updated to reflect the changes and the snapshots now show the effective difference of these changes.
These devices provide duplicate sensors for both energy export and import. A total and a tariff 1 sensor; however, as there is always a single tariff, it causes them to be the same.
This causes duplicate data to be logged and causes confusion on which sensor to use. This PR ensures the tariff 1 import/export sensors are only created if a second tariff exists, resulting in them not being created anymore on SDM/SKT devices.
A backward, incompatible change is highlighted in the breaking change section of this PR description.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: