Hello, can anyone help me with the IF Statement?
type: picture-elements
elements:
- type: state-badge
entity: sensor.byd_battery_box_premium_hv_temperatur
style:
top: 58%
left: 70%
transform: scale(0.7, 0.7)
color: transparent
{% if states('sensor.byd_battery_box_premium_hv_temperatur') | float > 5 %}
'--label-badge-red': green
'--label-badge-background-color': lightgreen
{% else %}
'--label-badge-red': red
'--label-badge-background-color': orange
{% endif %}
- type: state-badge
entity: sensor.shelly1pm_84cca8a81c55_temperature
style:
top: 25%
left: 30%
transform: scale(0.7, 0.7)
color: transparent
'--label-badge-red': red
'--label-badge-background-color': orange
image: /local/plans/Stadel - Erdgeschoss.jpg
Thanks