-
Notifications
You must be signed in to change notification settings - Fork 40
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
Ensure a cover's supported features and attributes are respective of its window covering type attribute #410
base: dev
Are you sure you want to change the base?
Conversation
…ct window_covering_type
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #410 +/- ##
=======================================
Coverage 96.68% 96.68%
=======================================
Files 61 61
Lines 9834 9838 +4
=======================================
+ Hits 9508 9512 +4
Misses 326 326 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…current_position properties
90f300b
to
aab8119
Compare
Apply pre-commit auto fixes
aab8119
to
d9cfa64
Compare
- Also use them in the tests rather than defining them separately
dc502ce
to
5953d0f
Compare
@@ -669,7 +676,7 @@ def state(self) -> dict[str, Any]: | |||
@functools.cached_property | |||
def supported_features(self) -> CoverEntityFeature: | |||
"""Return supported features.""" | |||
return self._attr_supported_features |
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.
For consistency with the other platforms and attributes, let's keep the _attr
prefix for now. These are meant to mirror those in Home Assistant: https://github.com/home-assistant/core/blob/3aae280de50a92cdfcf5c04b088fe9178fba0b2e/homeassistant/components/cover/__init__.py#L240
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.
Hey @puddly, I've reverted the naming to include the _attr
prefix, I've also adjusted the recompute_capabilities
method so that it only updates the final value after evaluating all criteria.
…e HA cache This adds a timeout for movement states restored from the entity cache. Uses zigpy#410 as a base.
What's changed
current_position
andcurrent_tilt_position
state attributes now reportNone
if their features are not supported by the device, resolves #142352supported_features
logic so it excludes tilt only window covering types when enabling lift featureswindow_covering_type
attribute value is undefined by the deviceWCT.Shutter
orWCT.Tilt_blind_tilt_only
types, see Table 7-41. Window Covering Type from the Cluster Library Specification 07-5123 Revision 8current_tilt_position
is always Nonecurrent_position
is always NoneFixes issue
Zigbee Soma Smart Shades 3 covers report OPEN state when closed home-assistant/core#142352
Related
FYI @TheJulianJES, @puddly, @dmulcahey