I can’t my automation script to work. If I only have one section “alias” without the “-” it works ok, but as soon as I add a second automation, I believe I have to include the “-”, but then HASS will not restart. I think it might be an indentation issue, but I’ve tried many combinations with no success, please see code below, the “automation” text has no indentation. Thanks for your help.
automation:
- alias: Turn on red light when movement detected
trigger:
platform: state
entity_id: sensor.aeotec_zw100_multisensor_6_burglar_4_10
from: '0'
to: '8'
condition:
condition: time
after: '23:00:00'
before: '07:00:00'
action:
service: light.turn_on
entity_id: light.aeotec_zw098_led_bulb_level_2_0
data:
brightness: 100
rgb_color: [255,10,0]
- alias: Turn on lights at sunset
trigger:
platform: sun
event: sunset
offset: "-01:00:00"
- action:
service: light.turn_on
entity_id: light.aeotec_zw098_led_bulb_level_2_0
data:
brightness: 255
rgb_color: [255,255,255]
# - action:
# service: switch.turn_on
# entity_id: switch.switch.aeotec_zw096_smart_switch_6_switch_3_0