Page 1 of 1

Change planning for timed switch with lua

Posted: Sunday 27 November 2016 19:33
by armand8
Hi everyone,

I'm trying to make predictive the ignition time of my heaters according to the temperature in the room (i.e. : I want a temperature at a time in a room, start of the heater ignition is automated).
My idea was to use a dummy timed switch and then modify the ignition time with lua, would it be possible ? I didn't find anything about modifying the "Timers" table in database with lua.

Thanks for reading and sorry for my english !

Re: Change planning for timed switch with lua

Posted: Monday 28 November 2016 15:49
by emme
to run an event (or a script) on a certain time I use a global variable with the right time I want to run
than a Time Event will check if the current time is the same as the one in the timer and then execute the script

maybe you can use the same way... have something store the time in a variable and then check the time and execute

ciao
M

Re: Change planning for timed switch with lua

Posted: Thursday 01 December 2016 22:10
by armand8
Thank you emme for your answer. In fact I already use time and device scripts.
My question was more : is it possible to change the time set in the planning of the switch with lua ?