I would like the outcome of an automation to be selected based on a time condition. The trigger is a motion sensor. Something like this:
if (time is after 22 and before 06) run script 1
script 1 --> turn_on light, brightness_pct: 1, delay 00:01, turn_off light
elif (time is after 06 and before 19) run script 2
script 2 --> turn_on light, brightness_pct: 40, transition: 1800
elif (time is after 19 and before 22) run script 3
script 3 --> turn_on light, brigtness_pct: 10, transition: 1800
But Iām unsure how to do it in HA. Do I need three separate automations or can this be combined?