Hello I was able to calculate the difference between to sensors in a template from different posts.
But I struggle to display it in a gauge as value.
Can you please help with step by step from template below to gauge with the value.
My first customization so not a glue how to put that together.
# Calculate Remaining Power
- platform: template
sensors:
remaining_power:
value_template: >
{{ ‘%0.1f’ | format(states(‘sensor.inverter_active_power’) | float -
states(‘sensor.power_meter_active_power’) | float) | round(1)}}
unit_of_measurement: ‘W’
friendly_name: Remaining Power```
############
Calculate Remaining Power
- platform: template
sensors:
remaining_power:
value_template: >
427.0
unit_of_measurement: ‘W’
friendly_name: Remaining Power