Allow data in 'min' format to include mm:ss

Originally reported as a fault Duration in form mm:ss is not accepted this is a feature request for minutes to be accepted in the form mm:ss when other systems provide data in this form, for example through a RESTful integration

How would you distinguish hh:mm from mm:ss?

It would have to take the declaration / definition into account. In this case the declaration is ‘min’ , perhaps the declaration clause needs to allow ‘mm:ss’ . . .

Just convert the value and move on, this will likely never get added because a user can change the units on the fly and this would break that functionality.

"{{ (("00" ~ value)  | as_timedelta).total_seconds() }}"

Then use seconds as the configured unit_of_measurement.

In the UI, it will show up as a normal duration sensor and you can modify it to your hearts content (if you added a unique_id).

2 Likes