Hello, how can i muliply two values
i habe a ampere and a volt values and i wanna have the power.
how can i make this?
THX
Syntax would look like this:
{{ states('sensor.plug2_power') | int * states('sensor.plug2_power') | int }}
then i have this error
Konfigurationsfehler erkannt:
- Kein Typ angegeben.
Where did you add it to get that error ? Did you replace the entity ids with yours ?
Paste your code here and can have a look
{{ states(‘sensor.gosungrow_virtual_5327125_14_1_1_p13001’) | int * states(‘sensor.gosungrow_virtual_5327125_14_1_1_p13002’) | int }}
Is this in a template sensor ?
no it is only a entity
Where are you pasting it ?
i found it under device
and then under sensors
Are you trying to make a new sensor with state of the other entities multiplied together ?
i have a sensor with ampere an a sensor with volt, and i need the power in watt
You can create this via the UI. Create a template sensor by going to Settings / Devices & Services / Helpers, Create Helper, Template sensor, and setting up like this:
with the state template being:
{{ states("sensor.gosungrow_virtual_5327125_14_1_1_p13001")|float(0) * states("sensor.gosungrow_virtual_5327125_14_1_1_p13002")|float(0) }}
Thank you very much, it will be work.
that was to erly.
the template only show 0 W.
Why i dont refresh ?