#Invert alert class for the Zone card?
1 messages · Page 1 of 1 (latest)
Try playing with the entity properties, you can change what the sensor is supposed to be. If that doesn't help you can create a helper entity that inverts it.
I don't think there is a way to define a normally open sensor. (You'd think there would be though...)
create a helper entity that inverts it
Initially, this is kind of what I was thinking. But, I think, in order for the Zone card to ignore the real entity, it would have to be removed from the zone which might not be optimal for the overall setup.
well, I just changed the old sensor to a different type. the icon is inverted, but that's just a detail, at least now there's no notification when the door is open
off
{% else %}
on
{%endif%}``` dunno if this code can be imroved, but it works
I made my own "alerting" cards a long time ago with custom:button-card. Normally closed and normally open was something that I had to account for in its design.
state:
# This is for NC and currently closed and NO and currently open.
- value: |
[[[ if ((variables.normally_closed && entity.state == 'off') || (!variables.normally_closed && entity.state == 'on')) return true]]]
operator: template
icon: '[[[ return (variables.normally_closed) ? "mdi:door-closed" : "mdi:door-open" ]]]'
color: rgb(28, 28, 28)
styles:
name:
- color: rgb(28, 28, 28)
```The normally_closed variable is set to true as default, but setting it to false creates the normally open variant.