Page 1 of 1

user variable as setpoint

Posted: Sunday 25 February 2018 17:46
by Patricen
Hello,

I'm trying to give a temperature setpoint using a user's variable. The issue is that only digits can be accepted within the setpoint field.
Is there a trick or an improvement that could help using a user's variable as a setpoint?

Re: user variable as setpoint

Posted: Sunday 25 February 2018 17:53
by blauwebuis
in the Aurora theme you can change the value of a text element directly in the interface. Perhaps that could be another route.

Re: user variable as setpoint

Posted: Sunday 25 February 2018 19:22
by Patricen
unfortunately no success at the moment

Re: user variable as setpoint

Posted: Tuesday 27 February 2018 11:43
by alanlsmith
I think a script is possibly the only easy solution.

Code: Select all

commandArray = {}

local switch = 'Set_Main_Thermostat'
local mainstatidx = 543
local target = tonumber(uservariables['Target_Temperature'])

if (devicechanged[switch]) == 'On' then
	commandArray[#commandArray+1] = {['SetSetPoint:' ..mainstatidx]=tostring(target)}
end

return commandArray