Door Binary Sensor not showing open/close

After the latest update my door sensor added through custom swipe card is not showing open/closed but on/off. The developer of the card is not so active so I dont think there could be fix real soon for me. Is there a way in which I can show the state as Open when the binary sensor is on and closed when binary sensor is off without creating a seperate template binary sensor. Is there any card- mod or so to achieve this,.

You could always create a template sensor that reads the current sensor and provides a different value.

To get open/closed rather than on/off the device class of the sensor needs to be “door”. You can change this in your configuration.yaml with customize.

Was this ever fully resolved? I’m facing a similar issue with my garage door template. This used to work well but since around a month again I no longer see open/closed; instead it’s on/off.

Here’s the YAML in my configuration.yaml file. What’s interesting is that the icon template works fine so the icons are correct but for some reason it’s no using open/closed from the value template.

cover:
  platform: template
  covers:
    left_garage_door:
      device_class: garage
      friendly_name: "Left Garage Door"
      value_template: >-
       {% if is_state('binary_sensor.right_garage_door_sensor_state_any','on') %}
         open
         {% else %}
         closed
         {% endif %}
      open_cover:
        service: switch.turn_on
        data:
          entity_id: switch.right_garage_door_switch_0
      close_cover:
        service: switch.turn_on
        data:
          entity_id: switch.left_garage_door_switch_0
      stop_cover:
        service: switch.turn_on
        data:
          entity_id: switch.left_garage_door_switch_0
      icon_template: >-
       {% if is_state('binary_sensor.left_garage_door_sensor_state_any ' , 'on') %}
        mdi:garage-open-variant
        {% else %}
        mdi:garage-variant
        {% endif %}

Shouldn’t it be device_class “garage door”? There is no device_class “garage” in the docs:

I did notice that but it appears that since I’m implementing the garage door as a cover, I should be using garage for the device class. Maybe I should consider using a different interface though. I think I will split this off into a new thread since this one has been pretty quiet for a while now.

There are two door device classes: One for binary sensors and one for covers. The binary sensor one reports on for open and off for closed. The cover one reports open and closed respectively.