In the wiki I read the following example:
commandArray['SetSetPoint:MySetPointIdx']='20.5'
Now, this is working just fine, but I was wondering if you NEED to use the IDX or if you can also change the setpoint by using the device name.
Setpoint only adjustable by IDX? Topic is solved
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Setpoint only adjustable by IDX?
The SetSetPoint command requires an IDX but you can quite easily work around that with:
Code: Select all
commandArray = {}
local tName = 'thermostatName' -- Change to name of thermostat
local function getDeviceID(dev)
return otherdevices_idx[dev]
end
commandArray['SetSetPoint:' .. getDeviceID(tName)] = '22.5'
return commandArray
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 451
- Joined: Friday 16 October 2015 7:58
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Setpoint only adjustable by IDX?
Thanks! That would indeed be the next step. You even created the code for me. Great!
-
- Posts: 451
- Joined: Friday 16 October 2015 7:58
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Setpoint only adjustable by IDX?
Worked out just fine!
Who is online
Users browsing this forum: No registered users and 1 guest