Replace any expression in HomeKitWindowCover with a simple or (#102146)
This commit is contained in:
parent
16c5a12c87
commit
eea9de063b
1 changed files with 3 additions and 8 deletions
|
@ -154,14 +154,9 @@ class HomeKitWindowCover(HomeKitEntity, CoverEntity):
|
|||
if self.service.has(CharacteristicsTypes.POSITION_HOLD):
|
||||
features |= CoverEntityFeature.STOP
|
||||
|
||||
supports_tilt = any(
|
||||
(
|
||||
self.service.has(CharacteristicsTypes.VERTICAL_TILT_CURRENT),
|
||||
self.service.has(CharacteristicsTypes.HORIZONTAL_TILT_CURRENT),
|
||||
)
|
||||
)
|
||||
|
||||
if supports_tilt:
|
||||
if self.service.has(
|
||||
CharacteristicsTypes.VERTICAL_TILT_CURRENT
|
||||
) or self.service.has(CharacteristicsTypes.HORIZONTAL_TILT_CURRENT):
|
||||
features |= (
|
||||
CoverEntityFeature.OPEN_TILT
|
||||
| CoverEntityFeature.CLOSE_TILT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue