Miele integration - different behavior on elapsed time depending on appliance

Hi!
I’m testing the new official Miele integration (core 2025.05.1) and I’ve noticed that there are different behaviors for the elapsed time sensor, depending on the appliance.

Just to give an example, I have W1 washer with M-touch display.
The new integration is reporting exactly the value returned by Miele API: when program phase moves to “End”, the elapsed time goes to 0 immediately.
The old custom integration had some caching of the elapsed time in order to keep reporting the last value until the appliance goes away from “End” state.

I also have dishwasher behaving in the same way.

Instead, the T1 dryer is behaving differently. Here the elapsed time remains there until the appliance is prepared to start a new cycle.
So, in this case, the elapsed time is available at the end of the cycle, but it is also available when appliance is off. This is not meaningful.

I also have ovens behaving this way.

I think that we should patch the value reported by those sensors in a similar way as in the previous custom integration, in order to provide a single way of behaving and in order to allow getting this information when needed (at the end of cycle).
In my installation I use the elapsed time when the appliance goes to “End” in order to:

  • send a notification telling me that the program has ended
  • register cycle on a Google Sheet
  • count appliance operating hours

In the custom integration, we were:

  • if the appliance status == “End”, report cached value
  • if the appliance status == “Off”, report None
  • otherwise cache value returned from API and return it

Caching was made by means of a class attribute. Maybe it’s worth thinking about a more robust caching to survive even if the integration is reloaded or HA restarted.