Picture Glance on/off state not working for some entities

On a picture-glance card the entities highlight if they are open/unlocked, but one of my entities is highlighted in either state. How can I configure what state is on/off in terms of a highlight.

See the screenshot below. The door is always white in either state.

It’s a sensor. Not a binary sensor. So there is no icon change.

Thanks. So I guess I’d need a template sensor to work around this.

Yep a template binary sensor that changes state depending on the door sensor would be the easiest way.

If anyone else is running into this, here is my binary template sensor for a door with icons:

binary_sensor:
  - platform: template
    sensors:
      front_door:
        friendly_name: "Front Door"
        value_template: >-
          {{ not is_state('sensor.zone_001','Normal') }}
        icon_template: >-
          {% if not is_state('sensor.zone_001','Normal') %}
            mdi:door-open
          {% else %}
            mdi:door
          {% endif %}
2 Likes

You could simplify this to:

binary_sensor:
  - platform: template
    sensors:
      front_door:
        friendly_name: "Front Door"
        value_template: >-
          {{ not is_state('sensor.zone_001','Normal') }}
        device_class: door
1 Like