Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trigger:
- - platform: template
- # CHANGE THE FOLLOWING:
- # "input_datetime.dim_time" to your own datetime input
- # "hours = 1" TO YOUR LIKING (https://www.home-assistant.io/docs/configuration/templating#time)
- value_template: "{{ ((strptime(now().year~'-'~now().month~'-'~now().day~' '~states('input_datetime.dim_time'), '%Y-%m-%d %H:%M:%S') - timedelta( hours = 1 )) | as_timestamp) == now() | as_timestamp }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement