-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
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 invalid watts sensor from NUT #140334
Remove invalid watts sensor from NUT #140334
Conversation
Hey there @bdraco, @ollo69, @pestevez, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Thanks @tdfountain
Looks like this was added in #55491 I agree based on above that it appears to be invalid. However it seems like the user who opened the PR was able to get it to work with their device so I'm not sure we should remove it. |
@wranglatang, I proposed at PR to remove the "watt" NUT variable as a separate sensor. Can you please shed light on whether you made this sensor work, and if so, how? Thanks for your help and contribution! We want to make sure not to remove functionality that users are dependent upon. The NUT documentation does not list "watt" as a valid variable. The naming format is inconsistent with other NUT variables (which are generally x.y). Finally, I reviewed the NUT source code and I am unable find any instances of the "watt" variable from any device driver. |
Based on the information above, I can't see how this sensor could ever work. We haven't heard back from the original submitter though so I am going to give them a bit more time before merging |
Meanswhile, there is a merge conflict. Could you take a look @tdfountain? Thanks! 👍 ../Frenck |
c61830e
to
73642da
Compare
Please see PR #141401. My apologies, I inadvertently closed the branch when committing the merge. |
Proposed change
Remove the "watts" sensor since it is invalid. This appears like a breaking change, but is not actually a breaking change. NUT variables are based on RFC 9271 available at https://www.rfc-editor.org/info/rfc9271 with a complete list of num names at https://github.com/networkupstools/nut/blob/master/docs/nut-names.txt. These variables generally take the form of x.y. The variable name "watts" is not a valid variable name. The sensor is therefore invalid and cannot be used. This PR removes the sensor from sensor.py and the translation from strings.json. It is not listed in icons.json. There are no test cases that reference this invalid sensor.
Type of change
Additional information
Checklist
ruff format 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
.To help with the load of incoming pull requests: