Skip to content

Commit

Permalink
Merge pull request #12 from tizzen33/tizzen33-patch-1
Browse files Browse the repository at this point in the history
Support 'cover' device
  • Loading branch information
tizzen33 authored Aug 19, 2020
2 parents cd6f55a + bf62000 commit 59a3691
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ def updateDevices(self):
#Domoticz.Debug('Tuya state: ' + str(response_json["payload"]["data"]["state"]))
#Domoticz.Debug('Domoticz state: ' + str(Devices[Unit].nValue))
#Domoticz.Debug('State value true: ' + str(states["True"]) + ' , false: ' + str(states["False"]))
if(Devices[Unit].nValue != states[str(response_json["payload"]["data"]["state"]).lower()]):
Devices[Unit].Update(nValue = states[str(response_json["payload"]["data"]["state"]).lower()], sValue = str(states[str(response_json["payload"]["data"]["state"]).lower()]))
Domoticz.Debug('Device ' + Devices[Unit].Name + ' status updated to ' + str(response_json["payload"]["data"]["state"]).lower())
if(str(response_json["payload"]["data"]["state"]) in states):
if(Devices[Unit].nValue != states[str(response_json["payload"]["data"]["state"]).lower()]):
Devices[Unit].Update(nValue = states[str(response_json["payload"]["data"]["state"]).lower()], sValue = str(states[str(response_json["payload"]["data"]["state"]).lower()]))
Domoticz.Debug('Device ' + Devices[Unit].Name + ' status updated to ' + str(response_json["payload"]["data"]["state"]).lower())


def onStop(self):
Domoticz.Debug("onStop called")

Expand Down

0 comments on commit 59a3691

Please sign in to comment.