I’m not sure if I’m using the right terminology but i have searched and cant find what i’m looking for in another post although I would guess its a common enough question.
I have for instance a smart socket that shows -
On / Off button
Current
Power
Voltage
If I wanted to an additional entity that takes the wattage and divides it by 1000 to give kW, how can i display the result “kW” of that simple equation W/1000= kW ?
I managed to find a way to do it.
I created a template sensor with the code.
{% set SocketPower = states(‘sensor.tv_power’) | float %}
{{ (SocketPower * 0.024603) }}
It gives me the cost of the power being used by the socket in pence if consumption was to stay constant for the next hour, obviously the cost would change if the consumption or duration changed.
I then edited the smart socket tile and added the “SocketPower” sensor.