How to use logics with multiply and divide?

I tried to find a logic block for this, but not sure if there is one or this has to be set up like an expression?

I would like to show 200W in a tile instead of 0.2kW.
I can’t see how to add prefixes or move the comma when I set up an AVD with a textfield, is this possible?

You can add a AVD, add a numeric field. Set the unit “W” and the needed decimal settings (decimals, min, max) if needed.
Then use a flow to set the value and use the tag from your source sensor (that das kW). Add a math expression like: {{ [tag] * 1000 }}
This will multiplicate the value with 1000 and you have a device sensor showing a value in W.

1 Like

Thank you for this!

Is the logic function with the ‘then’ card only option?
Seems like I have to create a variable aswell :thinking:

I had to try but found the solution…

That’s an example power sensor:

That’s the AVD with an energy capability:

That’s the flow:

Don’t use the “set numeric field” flow card because there you can only use a tag or value, but no expression. Use the “set field to description”:
You can select your capability and as desctiption you set the math expression including your global tag from your source energy sensor.