-
-
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
Expose specific device_class for Velux covers #24279
Conversation
Blinds, Rollingshutters and Awnings did not set their respective device_class attribute Previously they would all appear as device_class "window"
Hey there @Julius2342, mind taking a look at this pull request as its been labeled with a integration ( This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people. |
if isinstance(self.node, RollerShutter): | ||
return 'shutter' | ||
if isinstance(self.node, Awning): | ||
return 'awning' |
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.
I think this should have an explicit return None
at the end in case none of the if cases match
fallback device class is always 'window' in the event we have an unknown cover type
The pipeline is blocked bc of two trivial linter errors:
@gibman : may you change them? |
* Update cover.py Blinds, Rollingshutters and Awnings did not set their respective device_class attribute Previously they would all appear as device_class "window" * fallback device class is always 'window' fallback device class is always 'window' in the event we have an unknown cover type * trailing whitespace removed, trimmed as well * Update cover.py
Blinds, Rollingshutters and Awnings did not set their respective device_class attribute
Previously they would all appear as device_class "window"
Breaking Change:
Description:
Related issue (if applicable): fixes #
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: