Moin,
ich möchte meinen Hintergrund je nach Helligkeit eines Sensors ändern lassen, bekomme das aber nicht über eine if Abfrage hin.
Hier mein gedachter Code (der nicht funktionier):
views:
- title: EG
cards:
- type: picture-elements
image: /local/Wallpanel/EG/Erdgeschoss_ALL_OFF.png
elements:
- type: entity
entity: sensor.lumi_lumi_sen_ill_mgl01_illuminance
card_mod:
style: |
ha-card {
{% if states('sensor.lumi_lumi_sen_ill_mgl01_illuminance') > 800 %}
/local/Wallpanel/EG/Erdgeschoss_TAG.png;
{% else %}
/local/Wallpanel/EG/LEER.png;
{% endif %}
}
LEER sit ein 1x1 transparentes Pixel
Vielen Dank für eure Hilfe