Is there a plugin or script to execute a command only if it falls within a time period?
For example, bump back the thermostat when the sleep button is pushed only if it is between april and october?
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
perform action only if within a specific date range?
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: perform action only if within a specific date range?
You can use this script:If the date is within the specified limits, the macro continues.
If the date is outside the specified limits, the macro stops working.
Pako
Code: Select all
#Date Format: month-day
start ="04-01"
stop = "10-31"
now = eg.Utils.time.strftime("%m-%d")
if now < start or now > stop:
eg.programCounter = NoneIf the date is outside the specified limits, the macro stops working.
Pako