So I am using an Iammeter module to monitor my grid. It provides me two sensors which I have configured in the Energy dashboard:
sensor.imeter_xxxxxxxx_importenergy_x
sensor.imeter_xxxxxxxx_exportenergy_x
The energy dashboard uses these to calculate and display the “Grid Total”.
Is that value available to use via an entity?
I have created a template sensor which I use as input for daily, weekly, etc… Utility Meter helpers, but I regularly get spikes which basically makes these helpers unusable.
# Grid net energy
- sensor:
- name: "Grid Net Energy"
unique_id: grid_net_energy
unit_of_measurement: "kWh"
state_class: total_increasing
device_class: energy
state: >
{% set import = states('sensor.imeter_613677eb_importenergy_x') | float(0) %}
{% set export = states('sensor.imeter_613677eb_exportenergy_x') | float(0) %}
{{ import - export }}
Apparently, the built-in “Grid Total” does not have this issue so I’d like to build mob helpers on that value.