Hi everyone,
I’m desperately trying to use the value of my sensor in a Picture Elements Card.
The goal is to rotate a pointer along a circle. I have a template sensor that provides the angle, and now I need the card to accept and use this value.
It works fine with a static value:
type: picture-elements
image: /local/picture.png
elements:
- type: image
image: /local/zeiger.svg
style:
top: 50%
left: 50%
width: 70%
transform: translate(-50%, -50%) rotate(138deg)
transform-origin: center
But not with any of my dynamic attempts:
elements:
- type: image
image: /local/zeiger.svg
style:
top: 50%
left: 50%
width: 70%
transform: >
[[[ "translate(-50%, -50%) rotate(" + states['sensor.fastenzeiger_winkel'] + "deg)" ]]]
transform-origin: center
Can anyone help me figure out what I’m doing wrong?