Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #196 from fredericbcv/dev
Browse files Browse the repository at this point in the history
fix issue #240 on jeedom-zigate/jeedom-plugin-zigate
  • Loading branch information
doudz authored Sep 19, 2020
2 parents cb4652e + acdaad8 commit b7a6375
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zigate/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,7 @@ def action_ias_warning(self, addr, endpoint,
'policepanic': '0100', 'firepanic': '0101', 'emergencypanic': '0110'
}.get(mode, '0000')
strobe = '01' if strobe else '00'
level = {'low': '00', 'medium': '01', 'high': '10', 'veryhigh': '11'}.get(level, '00')
level = {'low': '00', 'medium': '10', 'high': '01', 'veryhigh': '11'}.get(level, '00')
warning_mode_strobe_level = int(mode + strobe + level, 2)
strobe_level = {'low': 0, 'medium': 1, 'high': 2, 'veryhigh': 3}.get(strobe_level, 0)
data = struct.pack('!B' + addr_fmt + 'BBBBHBHBB', addr_mode, addr, 1,
Expand All @@ -2259,9 +2259,9 @@ def action_ias_squawk(self, addr, endpoint,
addr_mode, addr_fmt = self._choose_addr_mode(addr)
addr = self.__addr(addr)
manufacturer_specific = manufacturer_code != 0
mode = {'armed': '0000', 'disarmed': '1000'}.get(mode, '0000')
mode = {'armed': '0000', 'disarmed': '0001'}.get(mode, '0000')
strobe = '1' if strobe else '0'
level = {'low': '00', 'medium': '01', 'high': '10', 'veryhigh': '11'}.get(level, '00')
level = {'low': '00', 'medium': '10', 'high': '01', 'veryhigh': '11'}.get(level, '00')
squawk_mode_strobe_level = int(mode + strobe + '0' + level, 2)
data = struct.pack('!B' + addr_fmt + 'BBBBHB', addr_mode, addr, 1,
endpoint,
Expand Down

0 comments on commit b7a6375

Please sign in to comment.