hello,
i created badge for an template sensor. this sensor has three possible states good
, ALARM
, Sensor Error!
.
i tryed to change color in the badge according state, but this does not work, it is alwas red, as color seems to be defined by any HA default states only and mine are not off
, closed
etc…?
how could i get e.g. a RED color for ALARM
state, any other color for state Sensor Error!
? and all others states default color (blue)
here my template sensor
## FLOODLEVEL template Sensor Waschkueche AbflussALARM START
floodalarm_inhouse:
#unit_of_measurement: mm
value_template: >-
{% if is_state("binary_sensor.aqara_ws_103_water_leak", "off") %}
good
{% elif is_state("binary_sensor.aqara_ws_103_water_leak", "on") %}
ALARM
{% else %}
Sensor Error!
{% endif %}
## FLOODLEVEL template Sensor Waschkueche AbflussALARM END
thanx in advance
br
Frank