mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
use newly added is_server for cluster reporting (#26533)
This commit is contained in:
parent
28beebac61
commit
fec6706bf7
@ -202,7 +202,7 @@ class ZigbeeChannel(LogMixin):
|
|||||||
# Xiaomi devices don't need this and it disrupts pairing
|
# Xiaomi devices don't need this and it disrupts pairing
|
||||||
if self._zha_device.manufacturer != "LUMI":
|
if self._zha_device.manufacturer != "LUMI":
|
||||||
await self.bind()
|
await self.bind()
|
||||||
if self.cluster.cluster_id in self.cluster.endpoint.in_clusters:
|
if self.cluster.is_server:
|
||||||
for report_config in self._report_config:
|
for report_config in self._report_config:
|
||||||
await self.configure_reporting(
|
await self.configure_reporting(
|
||||||
report_config["attr"], report_config["config"]
|
report_config["attr"], report_config["config"]
|
||||||
|
@ -50,7 +50,7 @@ class FakeEndpoint:
|
|||||||
"""Add an input cluster."""
|
"""Add an input cluster."""
|
||||||
from zigpy.zcl import Cluster
|
from zigpy.zcl import Cluster
|
||||||
|
|
||||||
cluster = Cluster.from_id(self, cluster_id)
|
cluster = Cluster.from_id(self, cluster_id, is_server=True)
|
||||||
patch_cluster(cluster)
|
patch_cluster(cluster)
|
||||||
self.in_clusters[cluster_id] = cluster
|
self.in_clusters[cluster_id] = cluster
|
||||||
if hasattr(cluster, "ep_attribute"):
|
if hasattr(cluster, "ep_attribute"):
|
||||||
@ -60,7 +60,7 @@ class FakeEndpoint:
|
|||||||
"""Add an output cluster."""
|
"""Add an output cluster."""
|
||||||
from zigpy.zcl import Cluster
|
from zigpy.zcl import Cluster
|
||||||
|
|
||||||
cluster = Cluster.from_id(self, cluster_id)
|
cluster = Cluster.from_id(self, cluster_id, is_server=False)
|
||||||
patch_cluster(cluster)
|
patch_cluster(cluster)
|
||||||
self.out_clusters[cluster_id] = cluster
|
self.out_clusters[cluster_id] = cluster
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user