Skip to content

Commit

Permalink
Merge pull request #140 from Smanar/beta
Browse files Browse the repository at this point in the history
New version
  • Loading branch information
Smanar authored Nov 12, 2022
2 parents 89e3cbb + 1fe7740 commit 51169b8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Author: Smanar
#
"""
<plugin key="deCONZ" name="deCONZ plugin" author="Smanar" version="1.0.25" wikilink="https://github.com/Smanar/Domoticz-deCONZ" externallink="https://phoscon.de/en/conbee2">
<plugin key="deCONZ" name="deCONZ plugin" author="Smanar" version="1.0.26" wikilink="https://github.com/Smanar/Domoticz-deCONZ" externallink="https://phoscon.de/en/conbee2">
<description>
<br/><br/>
<h2>deCONZ Bridge</h2><br/>
Expand Down Expand Up @@ -278,7 +278,7 @@ def onCommand(self, Unit, Command, Level, Hue):
if _type == 'config':
if Devices[Unit].DeviceID.endswith('_lock'):
_json = {'lock':True}
if Command == 'Off':
elif Command == 'Off':
if device_type == 'Warning device':
_json['alert'] = 'none'
#Force Update using domoticz, because some device don't have return
Expand Down Expand Up @@ -387,8 +387,12 @@ def onCommand(self, Unit, Command, Level, Hue):
_json.pop('bri')
_json['transitiontime'] = 0

#Stop for shutter
if Command == 'Stop':
#covering
if Command == 'Open':
_json['open'] = False
elif Command == 'Close':
_json['open'] = True
elif Command == 'Stop':
_json = {'stop':True}

#color
Expand Down Expand Up @@ -700,7 +704,7 @@ def InitDomoticzDB(self,key,_Data,Type_device):
#Create the current device
self.CreateIfnotExist(IEEE,'ZHADoorLock',Name)
# power and consumption on the same endpoint
elif Model == 'ZHEMI101' or Model == 'TH1124ZB':
elif Model == 'ZHEMI101' or Model == 'TH1124ZB' or Model == '45856' or Model == 'E1C-NB7':
self.Devices[IEEE]['option'] = 1
self.CreateIfnotExist(IEEE,Type,Name,1)
else:
Expand Down

0 comments on commit 51169b8

Please sign in to comment.