fix: add type 54 vertical blind support and remove spurious battery_charging control lock

This commit is contained in:
Richard Mann
2026-04-11 17:40:35 +10:00
parent 8a6a17b767
commit 1b9aed4f89
2 changed files with 4 additions and 4 deletions

View File

@@ -53,8 +53,9 @@ SHADE_TYPE: Final[dict[int, str]] = {
33: "Duette Architella, Top Down Bottom Up", 33: "Duette Architella, Top Down Bottom Up",
39: "Parkland", 39: "Parkland",
47: "Pleated, Top Down Bottom Up", 47: "Pleated, Top Down Bottom Up",
# top down, tilt anywhere # tilt anywhere (position + tilt)
51: "Venetian, Tilt Anywhere", 51: "Venetian, Tilt Anywhere",
54: "Vertical Blind, Tilt",
62: "Venetian, Tilt Anywhere", 62: "Venetian, Tilt Anywhere",
} }
@@ -71,6 +72,7 @@ class ShadeCapability(NamedTuple):
SHADE_CAPABILITIES: Final[dict[int, ShadeCapability]] = { SHADE_CAPABILITIES: Final[dict[int, ShadeCapability]] = {
# tilt anywhere (position + tilt) # tilt anywhere (position + tilt)
51: ShadeCapability(has_tilt=True), 51: ShadeCapability(has_tilt=True),
54: ShadeCapability(has_tilt=True),
62: ShadeCapability(has_tilt=True), 62: ShadeCapability(has_tilt=True),
# tilt only (no position movement) # tilt only (no position movement)
39: ShadeCapability(has_tilt=True, tilt_only=True), 39: ShadeCapability(has_tilt=True, tilt_only=True),

View File

@@ -110,9 +110,7 @@ class PowerViewCover(PassiveBluetoothCoordinatorEntity[PVCoordinator], CoverEnti
@property @property
def supported_features(self) -> CoverEntityFeature: # type: ignore[reportIncompatibleVariableOverride] def supported_features(self) -> CoverEntityFeature: # type: ignore[reportIncompatibleVariableOverride]
"""Flag supported features, disable control if encryption is needed.""" """Flag supported features, disable control if encryption is needed."""
if ( if self._coord.data.get("home_id") and not self._coord.api.has_key:
self._coord.data.get("home_id") and not self._coord.api.has_key
) or self._coord.data.get("battery_charging"):
return CoverEntityFeature(0) return CoverEntityFeature(0)
return super().supported_features return super().supported_features