Washing machine energy and cost summary for last wash cycle

I have just installed a Shelly Plus PM Mini behind the plug for my Washing Machine and Tumble Dryer. I would like to create an automation to summarise and the Energy and Cost (from Tibber integration) for the last wash/dry cycle that was run.

So the automation needs to pick up when the cycle started (from Home Connect Alt integration) and when it ends and then sum the energy used and the cost from the hourly tariff from the Timber integration.

Such an integration is way above my knowledge level, but I think more people would enjoy the result if we could get this to work!

Many thanks from Sweden!

I would use the utility_meter integration. You can either code it yourself something like this:

utility_meter:

  dryer_daily:
    name: Dryer Daily
    source: sensor.dryer
    cycle: daily

  dryer_weekly:
    name: Dryer Weekly
    source: sensor.dryer
    cycle: weekly

or you can go to Helpers & create a utility_meter Helper, following the directions there.