I am a complete newb here, mamange to work out most things so far but stuck on what is probably a simple task.
I want to make an extra sensor to show the difference between my Solar and my Grid power. This is what I have done so far following different guides, but i get nothing back.
# Calculate Power Now
- platform: template
sensors:
energy_now:
entity_id:
- sensor.shelly_shem_6eaa27_1_current_consumption
- sensor.shelly_shem_6eaa27_2_current_consumption
value_template: >-
{% set solar = states.sensor.shelly_shem_6eaa27_1_current_consumption.state|float %}
{% set grid = states.sensor.shelly_shem_6eaa27_2_current_consumption.state|float %}
{{ (grid - solar)|round(1) }}
Any help would be greatly appreciated.