Hey,
can someone explain to me how I can compare two values in secondary_Info?
i have a sensor (sensor.Test ) and a helper (input_number.test).
if both are the same then ok if different then xxx
somehow I can’t get it to use an if is_state template here.
type: entities
entities:
- type: custom:numberbox-card
entity: input_number.test
icon: mdi:sine-wave
card_mod:
style: |
:host {
--mdc-icon-size: 30px;
{% if states['sensor.rgb_treppe_helligkeitssensor'].state < states['number.template_number'].state %}
--paper-item-icon-color: red;
{% endif %}
}
:host {
{% if states['sensor.rgb_treppe_helligkeitssensor'].state > states['number.template_number'].state %}
--paper-item-icon-color: magenta;
{% endif %}
}
:host {
{% if states['sensor.rgb_treppe_helligkeitssensor'].state == states['number.template_number'].state %}
--paper-item-icon-color: green;
{% endif %}
}
entities:
- sensor.lightlevel_5
secondary_info: >
compare: <b style='color:[[ if states('sensor.lightlevel_5') ==
states('input_number.test') ]]'>equal // unequal </b>
name: Sensor
border: false