It works for the input_boolean entity and does not for the light entity.
You need to “override” this by some way - kind of using “!important” in CSS.
Seems that card-mod may be the only solution (provided here).
Then check again. Copy / paste exactly my code, check if the input_number is created.
Check whether you card-mod working with a simple examples, is it of the latest version.
Paste that code into the Template (dev-tool):
{% set ANGLE = states('input_number.test_number') + 'deg' %}
{{ANGLE}}
I have card-mod 3.1.5 installed and tested with simple rotate and translate examples. I came across this post and I´m also trying to achieve something like this. I tried your code and on the Template (dev-tool) that code works as expected but does not work when using it on the card configuration.
I´m a newbie so I don´t know if it has something to do with the variable “–my-transform-style” because I tried modifying the variable so that it would rotate 15deg instead of using the “ANGLE” value and didn´t rotate either.
What I´m trying to do is an inclinometer. So at the end what I want to accomplish is having a couple images rotate according to roll and pitch values coming from a sensor.
What browser do you use?
Recently I realized that Safari does not understand some CSS )))
Open Code inspector and check if the style is applied to the element.
If it reports an error like “wrong value” or “wrong property” - then it means that this browser does not understand it, you need to find another way…
At least this code works in Win+Chrome, iPadOS, Win+FF.
Yes that code gives the correct output of the value of the sensor and I’m using Windows 10 with Chrome browser. If I don’t use use the variable and set the degrees to a fixed value it works correctly so that’s why I’m assuming the problem might be the variable