How should I add an offset (e.g,. 425 kWh) to an integration sensor?
I am using a integration sensor to try and replicate what my solar utility meter is reading for import kWh and exported kWh. I have not found a way to directly read from the utility meter from Duke Energy and it does not appear to have an API.
The integration sensor below works fine. I want to give it an offset and see if I can create a “digital twin” of the utility meter inside HA.
#solar energy integration sensors
- platform: integration
source: sensor.current_power_consumption_grid_to_house
name: Imported Energy
unit_prefix: k
round: 3
Should I create a new template sensor and do the math inside of the sensor definition:
{% set virtual_meter_imported_energy = (states('sensor.imported_energy') | int) + 425 %}
{{virtual_meter_imported_energy}}
Is this something better done with a Utility Meter?