Tracking energy over a specific time

Im not sure how to approach this so looking for some guidance.

I want to display the cost of energy used for a single electrical appliance whilst the unit is on and being used. This will then have to reset and start again when the appliance is turned back on.

The appliance is our oven and is connected via a Shelly1PM.

My wife needs this as she’s working from home, cooking cakes etc. and needs to know costs involved.

As the Shelly in Home assistant shows ‘ON’ all the time, I thought I could trigger the start and end times for measuring by the sensor.oven_power

ie, when idle, the sensor.oven_power is showing 0.8W, so was thinking when the sensor.oven_power goes above 2W, start recording the power and then when the sensor.oven_power falls below 2W for 15 minutes, end the monitoring.

It’s creating the above ‘recording sensor’ to start and stop recording I’m not sure on.

Would be grateful for some feedback/ideas.

Thank you.

Use the integration sensor to “convert” W to kWh and then utility meter to track consumption.

I looked at the utility meter but couldn’t find a way to reset it.

It supposed to be reset by a service call, but after installing it, it only showed the utility_meter.calibrate in the services list.

Unless I’m doing something wrong.

You need to use a tariff for the reset service to be available.

Oh, didn’t realise that, will look into it again.

Thanks guys, that worked, I had missed the ‘Tariffs’ off as didn’t realised they would be required for this.