From de99cf67a030a19694fd0fcd3e61d29b86f97d37 Mon Sep 17 00:00:00 2001 From: Patrick Pichon Date: Sun, 4 Feb 2024 11:28:19 +0100 Subject: [PATCH] Enable possibility to force MajDomoDevice on a specific Ep --- Modules/readZclClusters.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Modules/readZclClusters.py b/Modules/readZclClusters.py index fd75eb3d0..c55bf0759 100644 --- a/Modules/readZclClusters.py +++ b/Modules/readZclClusters.py @@ -376,7 +376,7 @@ def action_majdomodevice( self, Devices, MsgSrcAddr, MsgSrcEp, MsgClusterId, Msg self.log.logging( "ZclClusters", "Debug", "action_majdomodevice - %s/%s %s %s %s %s" %( MsgSrcAddr, MsgSrcEp, MsgClusterId, MsgAttrID, device_model, value )) - + _majdomo_formater = cluster_attribute_retrieval( self, MsgSrcEp, MsgClusterId, MsgAttrID, "DomoDeviceFormat", model=device_model) self.log.logging( "ZclClusters", "Debug", " _majdomo_formater: %s" %_majdomo_formater) @@ -387,15 +387,18 @@ def action_majdomodevice( self, Devices, MsgSrcAddr, MsgSrcEp, MsgClusterId, Msg self.log.logging( "ZclClusters", "Debug", " _majdomo_formater: %s %s -> %s" %(_majdomo_formater, value, majValue)) _majdomo_cluster = cluster_attribute_retrieval( self, MsgSrcEp, MsgClusterId, MsgAttrID, "UpdDomoDeviceWithCluster", model=device_model) - self.log.logging( "ZclClusters", "Debug", " _majdomo_cluster: %s" %_majdomo_cluster) - majCluster = _majdomo_cluster if _majdomo_cluster is not None else MsgClusterId + self.log.logging( "ZclClusters", "Debug", " _majdomo_cluster: %s" %_majdomo_cluster) _majdomo_attribute = cluster_attribute_retrieval( self, MsgSrcEp, MsgClusterId, MsgAttrID, "UpdDomoDeviceWithAttribute", model=device_model) majAttribute = _majdomo_attribute if _majdomo_attribute is not None else "" self.log.logging( "ZclClusters", "Debug", " _majdomo_attribute: %s -> %s" %(_majdomo_attribute, majAttribute)) - MajDomoDevice(self, Devices, MsgSrcAddr, MsgSrcEp, majCluster, majValue, Attribute_=majAttribute) + _majdomo_endpoint = cluster_attribute_retrieval( self, MsgSrcEp, MsgClusterId, MsgAttrID, "UpdDomoDeviceWithEp", model=device_model) + target_ep = _majdomo_endpoint if _majdomo_endpoint is not None else MsgSrcEp + self.log.logging( "ZclClusters", "Debug", " _majdomo_ep: %s -> %s" %(_majdomo_endpoint, target_ep)) + + MajDomoDevice(self, Devices, MsgSrcAddr, target_ep, majCluster, majValue, Attribute_=majAttribute) def majdomodevice_possiblevalues( self, MsgSrcEp, MsgClusterId, MsgAttrID, model, value):