Is there any easy way to use timers with conditions?
Posted: Thursday 11 January 2018 17:51
Hi everyone, i found the timers extremely useful.
However, if i want to use them with a condition it becomes some complicated.
A exemple a timer lauch the switch at 16:00 only if the temperature x is over 15°C
My current solution
- I can use cron to launch a python script with the condition before using json to lauch or not the timer. It is not convenient due to it can be done by user interface.
- I can use lua time script to launch each minute a script and if the time is ok and the conditions, the command array function could be used. The same issue as previsouly and the script is executed each minute while it needs only to be lauch once a day
Is there any simpler way to achieve this aim?
However, if i want to use them with a condition it becomes some complicated.
A exemple a timer lauch the switch at 16:00 only if the temperature x is over 15°C
My current solution
- I can use cron to launch a python script with the condition before using json to lauch or not the timer. It is not convenient due to it can be done by user interface.
- I can use lua time script to launch each minute a script and if the time is ok and the conditions, the command array function could be used. The same issue as previsouly and the script is executed each minute while it needs only to be lauch once a day
Is there any simpler way to achieve this aim?