Hi,
I put on a picture-elements card exact the same state-icon twice, except only the first one within a conditional card.
When switch.smart_plug_luchtbevochtiger_on_off is off :
When switch.smart_plug_luchtbevochtiger_on_off is on :
Only the second state-icon works fine as expected.
Any idea ?
type: picture-elements
elements:
- type: conditional
conditions:
- condition: state
entity: input_boolean.toggle_verwittigen_vullen_watertank_luchtbevochtiger
state: "on"
elements:
- type: state-icon
style:
top: 71%
left: 84%
entity: switch.smart_plug_luchtbevochtiger_on_off
icon: mdi:cup-water
tap_action:
action: toggle
hold_action:
action: perform-action
target: {}
perform_action: script.teller_watertank_luchtbevochtiger_initialiseren
card_mod:
style:
state-badge:
$:
ha-state-icon:
$:
ha-icon:
$: |
ha-svg-icon {
{% if is_state('switch.smart_plug_luchtbevochtiger_on_off', 'on') %}
color: yellow;
{% else %}
color: white;
{% endif %}
}
- type: state-icon
style:
top: 82%
left: 84%
entity: switch.smart_plug_luchtbevochtiger_on_off
icon: mdi:cup-water
tap_action:
action: toggle
hold_action:
action: perform-action
target: {}
perform_action: script.teller_watertank_luchtbevochtiger_initialiseren
card_mod:
style:
state-badge:
$:
ha-state-icon:
$:
ha-icon:
$: |
ha-svg-icon {
{% if is_state('switch.smart_plug_luchtbevochtiger_on_off', 'on') %}
color: yellow;
{% else %}
color: white;
{% endif %}
}
image: /local/images/floorplan/downstairs/a downstairs floorplan.png