add this condition for even:
- condition: template
value_template: "{{ now().hour % 2 == 0 }}"
add this condition for odd:
- condition: template
value_template: "{{ now().hour % 2 == 1 }}"
add this condition for even:
- condition: template
value_template: "{{ now().hour % 2 == 0 }}"
add this condition for odd:
- condition: template
value_template: "{{ now().hour % 2 == 1 }}"
thanks Petro.
Iâve done exactly so as âworkaroundâ, I just thought there is more clever solution.
anyway - thanks for quick response.
regards,
Valdas
Itâs not a work around, itâs the current way unfortunately. Maybe in the future they will add a attribute to trigger that filters even and odd. I doubt itâs even on the devâs radar. Might want to add a feature request.
Condition would be best way to do the odd hour thing. I donât think any automation system, commercial or DIY, are granular enough on the triggers to split odd/even hours like that without using a condition.
so, anyone knows when the automation will run for first time?? at 23.00.00 or 01.00.00 ???
âafterâ means 01:00:00
Neither
See the time pattern trigger docs:
You can prefix the value with a
/
to match whenever the value is divisible by that number
Yours will first run at midnight.
thank you! It runs exactly every 2 hours and the first run is at midnight!
thanks