Binary Sensor Template Format

I’m reading that the format of a binary sensor template has changed and am having trouble getting my template to not have errors in it.

I have a monoprice door sensor that reports a value of 23 as open and 22 as closed. I’ve made a template and put the following:

##test binary sensor
- platform: template
  sensors:
    sensor name:
      friendly_name: "Entry Garage Door Sensor"
      value_template: "{% if state_attr('sensor.garage_entry_sensor_access_control_door_state', 'value') == 23 %}
closed
{% else %}
open
{% endif %}"

The first line of “- platform: template” has an error of " property platform is not allowed"
The 2nd line of “sensors:” has an error of " property sensors is not allowed"

Any idea what I am doing wrong. i do have this file referenced in my configuration.yaml to include this yaml file as well.