Page 1 of 1

Thermostat Mode Widget

Posted: Monday 15 April 2019 10:25
by pipiche
I want to create a Thermostat Mode widget inside a plugin, but I'm facing trouble to get/set Modes
Screenshot 2019-02-16 at 19.33.10.png
Screenshot 2019-02-16 at 19.33.10.png (146.85 KiB) Viewed 1303 times
Here after is the code I'm using to create. However how can I add/define the Mode List ?

Code: Select all

unit = 1
myDev = Domoticz.Device(DeviceID='001', Name='Thermostat Mode', Unit=unit, Type=243, Subtype=20)
myDev.Create()
ID = myDev.ID
if myDev.ID == -1 :
      Domoticz.Error("Domoticz widget creation failed. %s" %(str(myDev)))
Screenshot 2019-02-16 at 19.33.10.png
Screenshot 2019-02-16 at 19.33.10.png (146.85 KiB) Viewed 1303 times

I had a look to an existing device created by OZW. I do not see any Mode define at that level !!!

Code: Select all

343|20|00000401|1|BT Entrée - Thermostat Mode|1|243|20|0|0|12|255|1||2019-02-15 20:17:21|75|0.0|1.0|0.0|1.0|||0|0|0|||