Sensors.yaml file template sensors are not showing up in entities

File this under “This used to work I swear”. I’ve got a lovelace representation of a door lock status showing the dreaded “broken link” icon. At first I thought it was looking for the icon itself, but it looks like the entity isn’t showing up from my sensors.yaml file. Here’s a snippet from the sensors.yaml file:

- platform: template
  sensors:

# Front Door Lock (For UI State Display Purposes)
    front_lock_status:
      entity_id: input_boolean.front_lock
      friendly_name: "Front Lock Status"
      value_template: >-
        {% if is_state('input_boolean.front_lock', 'on') %}
          Unlocked
        {% else %}
          Locked
        {% endif %}
      icon_template: >-
        {% if is_state('input_boolean.front_lock', 'on') %}
          mdi:lock-open
        {% else %}
          mdi:lock
        {% endif %}

None of the sensors that follow the “- platform: template” section show up as entities for me in Developer Tools like they used to. The referenced input_booleans DO show up. The next section of the file has command_line, systemmonitor, version, rest. All of those are working. Just the template stuff isn’t. And I’ve got no errors in the log that I can see. I’m stumped but also really rusty here. It used to work so I suspect there was a breaking change I missed.

Why do you have this in the config:

entity_id: input_boolean.front_lock

it’s not listed as a valid option in the docs and I’m trying to figure out what you are expecting it to do.

Are there any errors listed in the logs?

entity_id was deprecated. If you are on a new version of HA, it might cause it to not load. There would be an error in your logs due to this.

If removing entity_id doesn’t cause it to appear, the other common mistake is having 2 sensor sections. That doesn’t seem like the issue here though.

Your yaml format and template syntax is correct. So if there’s any other issues in your config file they would be before this section of code.