State-icon how to show unavailability of an entity?
pillemats opened this issue · comments
pillemats commented
hi
i am using my floorplan with the config-template-card
is it possible to show the icon in another color, f.e. in red if the entity is not available? maybe it is possible to change the icon if windows open, closed and unavailable
here is my config:
- type: state-icon
entity: binary_sensor.fenster_vorne_buro
icon: mdi:window-closed-variant
style:
left: 44%
top: 95.5%
'--iron-icon-stroke-color': '#999'
border-radius: 100%
text-align: center
background-color: rgba(255, 255, 255, 0)
it always looks the same, whether it is available or not
if it is available and the window is opened color changed to yellow (is it also possible to change the color?, myabe green, or something else)
thanks
ildar170975 commented
- This is a neither a bug report nor a feature request. This is a question. Please ask questions in a dedicated HA Community thread: https://community.home-assistant.io/t/100-templatable-lovelace-configurations/105241
- Since you need to colorize a state-icon element inside a picture-elements card dependently on some entities’ states - then a better option could be using a card-mod in combination with the native
style
option - https://community.home-assistant.io/t/styling-elements-in-picture-elements-card-a-small-tutorial/315252/13. Definitelyconfig-template-card
can be used as well - but this could be not a better choice.
Closing the issue.
Please continue this discussion in any of threads mentioned - dependently of your choice.