hello, I created a sensor to read an energy value in kwh using the "Integration - Riemann sum integral ". I need to reset this value and restart it with a digital input. How can I do?
Hi,
If I understand your question correctly you can ācalibrateā your sensor reading by placing any value you want into that sensor. This is useful if using an āincreasing_totalā sensor to log energy consumption, and you want your HA reading to match your actual meter reading.
If you go to Developer Tools > Services and add this yaml (below) to the box, it should replace the current sensor value with 30208. You would click the āCall Serviceā button to calibrate with this value you have entered. The Call Service button will change to a green checkmark if successful. The value can be whatever you want - zero, or the current reading on your meter.
service: utility_meter.calibrate
target:
entity_id: sensor.gas_meter
data:
value: '30208'
Just change the entity_id: to match your own sensor name, and change the value between the quotes to whatever value you need.
I hope this helps,
Cheers,
Mike.
on my machineā¦ there is no service with this name: