They both have a state of 0.08 which is 4.8 minutes so why does one of them have 4m as its value attribute and one has 5m?
As I said I only noticed this happening recently, almost certainly since v113.
Incidentally, I believe they should both show exactly 5 minutes (or very close allowing for generous HA processing time) as it should be given they are on for the duration of a 5 minute delay. But I’ll cross that bridge later.
Looking at the source there’s a whole bunch of truncating (floor, and int) and just plain ignoring seconds altogether. It’s never going to be more accurate than +/- 1 minute.
e.g. seconds are discarded rather than rounding to the nearest minute in the output formatting:
I guessed it might be a rounding error somewhere but it doesn’t make much sense to me to have a history sensor that can be so inaccurate. It would be nice if the sensor just reported seconds and left it up to us to format how we liked.