Allright. In my search to a good vacation script and no replies to the topics @ the forum, I’m trying to make some kind of a simple vacation script.
The situation is that I’ve got some scene’s that are running daily right now. Turning lights on at several brightnesses, a script for when going to bed and one for waking up
Thing is I want to run them when I’m away with in interval of half an hour. This is what I’ve got right now.
- id: '1569353168194'
alias: Vakantiemodus - lampen aan avond
trigger:
- at: '17:{{ (range(30, 59)|random|int) }}:00'
platform: time
condition:
- condition: state
entity_id: input_boolean.vakantie_modus
state: 'on'
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- data:
entity_id: script.lampen_fase1
entity_id: script.lampen_fase1
service: script.turn_on
Thing I wonder is if the random time between 17.30 / 18.00 will work to run the script if the sun is down? And if so; will it turn on the script? This is what the automation generator from UI spit out, but it looks kinda strange…