Skip to content

Commit

Permalink
Aotec zigbee button (#1658)
Browse files Browse the repository at this point in the history
* do not overwrite the Attribute when calling is_cluster_specific_config
* conf file to Certified DB ( zigbeefordomoticz/z4d-certified-devices@604a910 )
  • Loading branch information
pipiche38 authored Oct 18, 2023
1 parent 94792a4 commit 2ec6cef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Modules/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -3489,7 +3489,16 @@ def Decode8401(self, Devices, MsgData, MsgLQI): # Reception Zone status change
motion_via_IAS_alarm = get_device_config_param( self, MsgSrcAddr, "MotionViaIASAlarm1")
self.log.logging( "Input", "Debug", "MotionViaIASAlarm1 = %s" % (motion_via_IAS_alarm))

if motion_via_IAS_alarm is not None and motion_via_IAS_alarm == 1:
ias_alarm1_2_merged = get_deviceconf_parameter_value( self, Model, "IASAlarmMerge", return_default=None )
self.log.logging( "Input", "Debug", "IASAlarmMerge = %s" % (ias_alarm1_2_merged))

if ias_alarm1_2_merged:
self.log.logging( "Input", "Debug", "IASAlarmMerge alarm1 %s alarm2 %s" % (alarm1, alarm2))
combined_alarm = ( alarm2 << 1 ) | alarm1
self.log.logging( "Input", "Debug", "IASAlarmMerge combined value = %02d" % (combined_alarm))
MajDomoDevice(self, Devices, MsgSrcAddr, MsgEp, "0006", "%02d" % combined_alarm)

elif motion_via_IAS_alarm is not None and motion_via_IAS_alarm == 1:
self.log.logging( "Input", "Debug", "Motion detected sending to MajDomo %s/%s %s" % (
MsgSrcAddr, MsgEp, (alarm1 or alarm2)))
MajDomoDevice(self, Devices, MsgSrcAddr, MsgEp, "0406", "%02d" % (alarm1 or alarm2))
Expand Down
2 changes: 1 addition & 1 deletion Modules/readZclClusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def is_cluster_zcl_config_available( self, nwkid, ep, cluster, attribute=None):
if is_manufacturer_specific_cluster( self, cluster):
return True

if is_cluster_specific_config(self, _get_model_name( self, nwkid), ep, cluster, attribute=None):
if is_cluster_specific_config(self, _get_model_name( self, nwkid), ep, cluster, attribute):
return True

return is_generic_zcl_cluster( self, cluster, attribute)
Expand Down

0 comments on commit 2ec6cef

Please sign in to comment.