i want to add some custom animated img to card.
if the card is on for exmaple (air purifier) moving image like green air is show.
how can i implement it?
Gif
type: picture-elements
image: /local/background.jpg # Background image for the card
elements:
- type: image
entity: fan.air_purifier # Replace with your entity
image: /local/air_purifier.gif # Animated image for the air purifier (if on)
state_image:
"on": /local/air_purifier.gif # Animated image when on
"off": /local/air_purifier_off.png # Static image when off
style:
top: 50%
left: 50%
width: 60%
opacity: 1
SVGs work well for animation.