Closed davewins closed 1 year ago
Hi davewins, I think by the new cover control that the code can be:
elif dev_type == 'cover':
if Command == 'Open':
dev.open_cover()
UpdateDevice(Unit, 1, 'Open', not dev.available())
elif Command == 'Stop':
dev.stop_cover()
UpdateDevice(Unit, 0, 'Stop', not dev.available())
elif Command == 'Close':
dev.close_cover()
UpdateDevice(Unit, 0, 'Close', not dev.available())
https://www.domoticz.com/wiki/Domoticz_API/JSON_URL%27s#Open-Close_Blinds
The plugin is fixed.
Code for Open/Close cover requires updating so that it updates the Domoticz status correctly:
change the code from:
elif dev_type == 'cover': if Command == 'Open': dev.open_cover() elif Command == 'Stop': dev.stop_cover() elif Command == 'Close': dev.close_cover() UpdateDevice(Unit, 1, 'On', not dev.available()) to:
elif dev_type == 'cover': if Command == 'Open': dev.open_cover() UpdateDevice(Unit, 1, 'On', not dev.available()) elif Command == 'Stop': dev.stop_cover() elif Command == 'Close': dev.close_cover() UpdateDevice(Unit, 0, 'Off', not dev.available());