Page 1 of 1
Setpoint only adjustable by IDX?
Posted: Thursday 26 November 2020 11:02
by Plantje
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.
Re: Setpoint only adjustable by IDX?
Posted: Thursday 26 November 2020 12:57
by waaren
Plantje wrote: ↑Thursday 26 November 2020 11:02
I was wondering if you NEED to use the 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
Re: Setpoint only adjustable by IDX?
Posted: Thursday 26 November 2020 14:09
by Plantje
Thanks! That would indeed be the next step. You even created the code for me. Great!
Re: Setpoint only adjustable by IDX?
Posted: Thursday 03 December 2020 21:18
by Plantje
Worked out just fine!