Closed dougle03 closed 5 months ago
There is already the field BATTERY_POWER
which combines BATTERY_CURRENT
and BATTERY_VOLTAGE
.
Is this the Watt value you are referring to?
If not can you please share more of your configuration? As I don't know which fields the id amps and volts are referencing.
I'm not seeing that field in my implementation!
The items highlighted by the red line are the only sensors I'm getting from my Shunt via the integration.
Am I missing some other fields too?
If you check the configured sensors in ESP Home you should have a BATTERY_CURRENT
and BATTERY_VOLTAGE
field. Just add add a BATTERY_POWER
. From a technical side it does exactly the same as you do just multiplying the two values.
If you check the configured sensors in ESP Home you should have a
BATTERY_CURRENT
andBATTERY_VOLTAGE
field. Just add add aBATTERY_POWER
. From a technical side it does exactly the same as you do just multiplying the two values.
Thanks for this. I did use the full.yaml as my template, so not sure how I missed this. Thanks again.
Would be good to add in a template sensor for shunt Watts. (AxV) into your standard full yaml? Perhaps something like this? Note: Requires id's adding to both Amps and Volts sensors.
- platform: template name: "Watts" unit_of_measurement: "W" accuracy_decimals: 1 icon: "mdi:flash" lambda: |- return id(amps).state * id(volts).state;