j0dan
July 24, 2019, 9:51pm
1
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.
tom_l
July 24, 2019, 11:43pm
2
It’s a sensor. Not a binary sensor. So there is no icon change.
j0dan
July 25, 2019, 2:01am
3
Thanks. So I guess I’d need a template sensor to work around this.
tom_l
July 25, 2019, 2:14am
4
Yep a template binary sensor that changes state depending on the door sensor would be the easiest way.
j0dan
July 25, 2019, 3:53am
5
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
tom_l
July 25, 2019, 4:02am
6
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