Binary Sensor Based on Input Boolean

Long story short, I bought a door sensor that is incompatible with HA, and therefore had to do some magic with an un-used tablet, couple webhooks, and an Input Boolean helper. The helper works exactly as intended, so I created (or attempted to) a Sensor to indicate open/closed status. The Sliding Door Sensor just simply doesn’t appear in my entities. Any help is appreciated. Thanks!

binary_sensor:
  - platform: template
    sensors:
      sliding_door_sendor:
        value_template: >
          {{ 'open' if is_state('input_boolean.sliding_door', 'on')
           else 'closed' }}
        friendly_name: Sliding Door Sensor

A binary_sensor's value_template should return true or false, not 'open' or 'closed' (docs). Try this:

binary_sensor:
  - platform: template
    sensors:
      sliding_door_sensor:
        value_template: "{{ is_state('input_boolean.sliding_door', 'on') }}"
        friendly_name: Sliding Door Sensor
        device_class: door

If you are using webhooks you could probably skip the input_boolen altogether.

Ooh…color me interested! Can you explain a bit more? I’m definitely a proponent for slimming down where possible.

https://www.home-assistant.io/integrations/template/#trigger-based-template-sensors

And the binary sensor example here: https://www.home-assistant.io/integrations/template/#storing-webhook-information