mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
Fix ZHA covering mode for Aqara E1 curtain driver not initialized (#102749)
This commit is contained in:
parent
8c99cf14d3
commit
c047f47595
@ -1,6 +1,9 @@
|
|||||||
"""Closures cluster handlers module for Zigbee Home Automation."""
|
"""Closures cluster handlers module for Zigbee Home Automation."""
|
||||||
from typing import Any
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from typing import TYPE_CHECKING, Any
|
||||||
|
|
||||||
|
import zigpy.zcl
|
||||||
from zigpy.zcl.clusters import closures
|
from zigpy.zcl.clusters import closures
|
||||||
|
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
@ -9,6 +12,9 @@ from .. import registries
|
|||||||
from ..const import REPORT_CONFIG_IMMEDIATE, SIGNAL_ATTR_UPDATED
|
from ..const import REPORT_CONFIG_IMMEDIATE, SIGNAL_ATTR_UPDATED
|
||||||
from . import AttrReportConfig, ClientClusterHandler, ClusterHandler
|
from . import AttrReportConfig, ClientClusterHandler, ClusterHandler
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from ..endpoint import Endpoint
|
||||||
|
|
||||||
|
|
||||||
@registries.ZIGBEE_CLUSTER_HANDLER_REGISTRY.register(closures.DoorLock.cluster_id)
|
@registries.ZIGBEE_CLUSTER_HANDLER_REGISTRY.register(closures.DoorLock.cluster_id)
|
||||||
class DoorLockClusterHandler(ClusterHandler):
|
class DoorLockClusterHandler(ClusterHandler):
|
||||||
@ -139,6 +145,14 @@ class WindowCovering(ClusterHandler):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __init__(self, cluster: zigpy.zcl.Cluster, endpoint: Endpoint) -> None:
|
||||||
|
"""Initialize WindowCovering cluster handler."""
|
||||||
|
super().__init__(cluster, endpoint)
|
||||||
|
|
||||||
|
if self.cluster.endpoint.model == "lumi.curtain.agl001":
|
||||||
|
self.ZCL_INIT_ATTRS = self.ZCL_INIT_ATTRS.copy()
|
||||||
|
self.ZCL_INIT_ATTRS["window_covering_mode"] = True
|
||||||
|
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Retrieve latest state."""
|
"""Retrieve latest state."""
|
||||||
result = await self.get_attribute_value(
|
result = await self.get_attribute_value(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user