I’m just new to this and read a lot about the syntax of yaml automation files. I think I have followed all the rules for spacing and indentation and still it gives me errors.
Here’s my automation text. Any help on obvious errors are appreciated.
- automation:
- id: SunDownLights
- alias: Hallway Lamp at Dusk
trigger:
platform: sun
event: sunset
action:
service: light.turn_on
entity_id: light.hall_light
data:
brightness: "1"
- id: SunRiseLights
- alias: Hallway Lamp at Dawn
trigger:
platform: sun
event: sunrise
action:
service: light.turn_off
entity_id: light.hall_light
data:
brightness: "0"
- id: SunsetKitchen
- alias: Kitchen Lamp at Sunset
trigger:
platform: sun
event: sunset
action:
service: light.turn_on
entity_id: light.kitchen_lamp
data:
brightness: "9"
- id: SunriseKitchen
- alias: Kitchen Lamp at Sunrise
trigger:
platform: sun
event: sunrise
action:
service: light.turn_off
entity_id: light.kitchen_lamp
data:
brightness: "0"
Yeah,sorry I should have been clearer. Hyphens are used for lists. Multiple automations under the automation heading, multiple platforms, services etc.