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
Use enum sensor device class in Z-Wave #92029
Conversation
Hey there @home-assistant/z-wave, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
the coverage difference is misleading because I just rewrote some code to reduce lines but those lines were already not covered |
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!
What's the code coverage? |
of the 7 lines missing from patch coverage in this PR, 3 already existed but were flagged because I rewrote the code to reduce some lines. For the four I added, these are all guard statements that we shouldn't hit in a normal scenario. I do wish there was a way to validate whether these guards are actually needed but unfortunately we don't know what we don't know in terms of the devices that are out there |
Proposed change
If I understand the ENUM device class properly, we should be using it whenever there is a finite list of possible states. This PR correctly handles those use cases.
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: