Help with YAML spacing for a simple template binary sensor

Hi,

I’m having some trouble with the spacing for a template binary sensor. Here’s what I have right now:

binary_sensor:
  - platform: skybell
    monitored_conditions:
      - button
      - motion
      
#Living Room Motion
  -  platform: template
     sensors:
       living_room_motion:
       friendly_name: "Living Room Motion"
       device_class: motion
       value_template: "{{ is_state('sensor.zooz_living_room_burglar', '8')}}"

I get this error when I check my config:

Configuration invalid
Invalid config for [binary_sensor.template]: expected a dictionary for dictionary value @ data['sensors']['device_class']. Got 'motion'
expected a dictionary for dictionary value @ data['sensors']['friendly_name']. Got 'Living Room Motion'
expected a dictionary for dictionary value @ data['sensors']['living_room_motion']. Got None
expected a dictionary for dictionary value @ data['sensors']['value_template']. Got "{{ is_state('sensor.zooz_living_room_burglar', '8')}}". (See ?, line ?). 

I realize it’s something silly I’m overlooking, but any help is appreciated. Thanks.

#Living Room Motion
  - platform: template
    sensors:
      living_room_motion:
        friendly_name: "Living Room Motion"
        device_class: motion
        value_template: "{{ is_state('sensor.zooz_living_room_burglar', '8')}}"
1 Like