Hi all, I’m new to these yaml configurations and I’m hoping someone can help me with the following. I’m using below code in a picture card but I can’t manage to get the lights icon to glow-up when lights are active. I’m using below code
type: picture-elements
image: /api/image/serve/25be64739c76a6ae7bbfec00b41490c3/512x512
elements:
- type: state-icon
entity: sensor.living_room_lights_on
icon: mdi:lightbulb-group
style:
left: 87%
top: 90%
transform: translate(-50%, -50%)
card_mod:
style: |
ha-icon {
color: {{ 'yellow' if states('sensor.living_room_lights_on') | int > 0 else 'gray' }};
}
tap_action:
action: call-service
service: light.turn_off
data:
entity_id:
- light.living_room
- light.generic_zigbee_coordinator_ezsp_living_staanlamp
- light.living_spots
- light.tv_meubel
- type: state-label
entity: sensor.living_room_lights_on
style:
left: 95%
top: 90%
transform: translate(-50%, -50%)
font-size: 18px
font-weight: bold
- type: state-icon
entity: sensor.living_room_temperature
icon: mdi:thermometer
style:
left: 67%
top: 90%
transform: translate(-50%, -50%)
icon-color: true
- type: state-label
entity: sensor.living_room_temperature_2
style:
left: 77%
top: 90%
transform: translate(-50%, -50%)
font-size: 18px
font-weight: bold
grid_options:
columns: full
hope you can help me.
Grtz, Sven