mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Replace any expression in HomeKitWindowCover with a simple or (#102146)
This commit is contained in:
parent
16c5a12c87
commit
eea9de063b
@ -154,14 +154,9 @@ class HomeKitWindowCover(HomeKitEntity, CoverEntity):
|
|||||||
if self.service.has(CharacteristicsTypes.POSITION_HOLD):
|
if self.service.has(CharacteristicsTypes.POSITION_HOLD):
|
||||||
features |= CoverEntityFeature.STOP
|
features |= CoverEntityFeature.STOP
|
||||||
|
|
||||||
supports_tilt = any(
|
if self.service.has(
|
||||||
(
|
CharacteristicsTypes.VERTICAL_TILT_CURRENT
|
||||||
self.service.has(CharacteristicsTypes.VERTICAL_TILT_CURRENT),
|
) or self.service.has(CharacteristicsTypes.HORIZONTAL_TILT_CURRENT):
|
||||||
self.service.has(CharacteristicsTypes.HORIZONTAL_TILT_CURRENT),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if supports_tilt:
|
|
||||||
features |= (
|
features |= (
|
||||||
CoverEntityFeature.OPEN_TILT
|
CoverEntityFeature.OPEN_TILT
|
||||||
| CoverEntityFeature.CLOSE_TILT
|
| CoverEntityFeature.CLOSE_TILT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user