Hi, guys.
What I want to do is animate more than one “- type” thing inside picture-elements.
type: picture-elements
image: /local/kit.jpg
style: |
ha-card {
{% if is_state('fan.ventilador_socket_1','on') %}
--state-color: #FDD835;
--state-animation: rotation 2s linear infinite;
{% else %}
--state-color: #44739E;
{% endif %}
}
@keyframes rotation {
0% {transform: rotate(0deg)}
100% {transform: rotate(360deg)}
}
elements:
- type: image
entity: light.luz_da_cozinha
state_image:
'on': /local/kit.jpg
'off': /local/Kitoff.jpg
state_filter:
'on': brightness(120%) saturate(1.9)
style:
top: 50%
left: 50%
width: 100%
background-color: rgba(0,255,0,1)
tap_action:
action: toggle
- type: state-icon
state_color: true
entity: fan.ventilador_socket_1
icon: mdi:fan
style:
top: 63%
left: 36%
transform: translate(0,0)
position: absolute
'--paper-item-icon-color': var(--state-color)
animation: var(--state-animation)
- type: state-icon
entity: light.luz_da_cozinha
state_color: true
icon: mdi:lightbulb
style:
top: 63%
left: 46%
transform: translate(0,0)
position: absolute
'--paper-item-icon-color': rgb(55,25,55)
I want to create a animation for the third element (light entity). Blink, or something when is on.
Any help?
Actual: