Help on improving my code (extending or shortening the repeat timer)
I would like to start saying I am not a developer and I am new on Hubitat. I have done my best after reading several examples on this forum
Goal: I would like to start a timer within certain time range to alternate between on and off for an power outlet on fixed timer:
On for 10 mins and off for 20 mins
And rest of the day outside the time range to be off
First, I tried to start easy, by creating a code that will alternate on and off every 15 mins. As follows
It does the job for what its intended. I don’t know if this is an optimized one for resources consumption
Next, I would like to make off for 20 mins and on for 20. I thought by extending the repeat timer it would work. But the delay command only delays execution the code rather than add time to a repeater timer.
Is there a command to add more time to counter? Or I am going at it wrong way.
Other option I thought off is just create a repeater for 30 mins then
- Turn on
- Delay 10 mins
- Turn off
But I was hoping to use a more structured if commands so I can add later on more interactions with other devices such as weather, temperatures and movements and other rules
I would really appreciate any advice.