We need a new helper type to manage units of time expressed and displayed as durations, rather than time of day. In the past, input_datetime (with has_date=no, has_time=yes) suited this purpose when it used to display time in 24H terms, but now that it displays time in 12H terms, it is an irrational input field for specifying durations (for example, when using input_datetime to specify 10 minutes duration, it must be input as “12:10 AM”, reflecting it’s true intended use for handling time of day values).
I propose a new passive helper (possibly called “input_duration” and existing only to provide a UI input field and state value to be read by a rule) which accepts a duration value (via the UI) as in this example:
The value returned by a call to “states('input_duration.xxxxx')” (using the above example as input) should take the form “00:10:00”, same as does input_datetime with has_date=no.
Is there or could there be an easy way to access/edit attributes from the UI/dashboard?
Then this could be done using a timer entity. {{state_attr('timer.x', 'duration')}} already returns “%H:%M:%S”
I like the idea of a input_duration component.
How should the UI look like?
Should it be like the input_datetimetime
Where you have sperate input fields for hoursminutes and seconds or should there be one input field where you could type in seconds or maybe even milliseconds.