Skip to content

Commit

Permalink
Enable possibility to force MajDomoDevice on a specific Ep
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 committed Feb 4, 2024
1 parent 28298dd commit de99cf6
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Modules/readZclClusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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):
Expand Down

0 comments on commit de99cf6

Please sign in to comment.