Hey there. I tried to make a condition to show room colored images based on the temerature of a room. But it doesn’t work. Need help.
Here my condition:
- conditions:
- condition: or
conditions:
- condition: numeric_state
entity_id: climate.wohnzimmer
attribute: temperature
above: 0
below: 17
value_template: "{{ float(state.state) + 2 }}"
elements:
- type: image
image: /local/ui/heating/livingroom_heating_blue.png
style:
mix-blend-mode: lighten
left: 47.3%
top: 15.05%
width: 42.53%
transform: none
- condition: numeric_state
entity_id: climate.wohnzimmer
attribute: temperature
above: 17
below: 23
value_template: "{{ float(state.state) + 2 }}"
elements:
- type: image
image: /local/ui/heating/livingroom_heating_orange.png
style:
mix-blend-mode: lighten
left: 47.3%
top: 15.05%
width: 42.53%
transform: none
- condition: numeric_state
entity_id: climate.wohnzimmer
attribute: temperature
above: 23
value_template: "{{ float(state.state) + 2 }}"
elements:
- type: image
image: /local/ui/heating/livingroom_heating_red.png
style:
mix-blend-mode: lighten
left: 47.3%
top: 15.05%
width: 42.53%
transform: none
Update:
I do get it to work but I still cant embed the or condition and I had to switch to a temperture sensor because with the climate it wont work!
- type: "custom:config-template-card"
entities:
- sensor.wohnzimmer_temperatur
element:
type: conditional
conditions:
- condition: numeric_state
entity: sensor.wohnzimmer_temperatur
above: 23
elements:
- type: image
image: /local/ui/heating/heating_livingroom_red.png
action: none
hold_action:
action: none
tap_action:
action: none
style:
mix-blend-mode: lighten
left: 47.35%
top: 15.05%
width: 42.53%
transform: none