Hi everyone
I come here with a rather odd behavior on my dashboard.
I have 2 buttons, one control 1 entity in the living room, the other controls 2 entities in the bedroom. So far so good right?
Now, the idea is the buttons should have the same type of animation if the lights are ON, or OFF.
For some reason, when i click on the living room button, both buttons animate, but only the living room light turn on, and when i click on the bedroom button, there is no animation on the dashboard, but the bedroom lights turn on.
Im not sure what im missing here.
Code for bedroom lights:
type: custom:button-card
entity: sensor.master_bedroom_lights_status
name: Master Bedroom Lights
icon: mdi:lightbulb-group
size: 50px
styles:
card:
- height: 80px
- width: 200px
name:
- font-size: 14px
- font-weight: bold
icon:
- color: black
- animation: none 1s ease infinite
state:
- value: "on"
styles:
card:
- background-color: cyan
name:
- color: black
- font-weight: bold
icon:
- color: white
- animation: blink 1s ease infinite
- value: "off"
styles:
card:
- background-color: grey
name:
- color: black
icon:
- color: black
- animation: none
animations:
rotate:
0%:
transform: rotate(0deg)
100%:
transform: rotate(360deg)
tap_action:
action: call-service
service: script.master_bedroom_lights
Script to call action on bedroom lights
alias: Master Bedroom lights
sequence:
- target:
entity_id:
- light.bed_mk
- light.bed_sk
action: light.toggle
data: {}
description: ""
icon: mdi:coach-lamp-variant
Code for the living room lights:
type: custom:button-card
entity: light.halo_living_room
name: Living Room Lights
icon: mdi:wall-sconce-flat
size: 50px
styles:
card:
- height: 80px
- width: 200px
name:
- font-size: 14px
- font-weight: bold
icon:
- color: white
- animation: none 1s ease infinite
state:
- value: "on"
styles:
card:
- background-color: cyan
name:
- color: black
- font-weight: bold
icon:
- color: white
- animation: blink 1s ease infinite
- value: "off"
styles:
card:
- background-color: grey
name:
- color: black
icon:
- color: black
- animation: none
animations:
blink:
0%:
opacity: 1
50%:
opacity: 0
100%:
opacity: 1
tap_action:
action: toggle
Odd behaviors detail: