I am new to Home assistant, I have been using the easy version of creating automations. I really want to learn YAML. I Have been working on an automation to turn a smart plug on that is wired to my doorbell camera when the battery level goes below 50%, then to turn off when the battery is at 100% I think my coding looked good but i keep getting extra keys not allowed error. can someone please help me and teach me what i did wrong. Thanks so much.
name: Turn on charger when doorbell battery is low
description:
automations:
-
trigger:
- type: device.state.Battery
device: sensor.doorbell_battery_percentage
state: batteryLevel
is: 50
actions: - type: switch.turn_on
devices:- switch.bedroom_soundbar
- type: device.state.Battery
-
starters:
- type: device.state.Battery
device: sensor.doorbell_battery_percentage
state: batteryLevel
is: 100
actions: - type: switch.turn_off
devices:- switch.bedroom_soundbar
- type: device.state.Battery