Inputting time >24 hours in time portion of input_datetime

I use the time portion (has_time) of an input_datetime to input the desired delay between two events (sequentially heating parts of my cabin before arriving).

For a specific case, I’ve wanted to start heating one section of the cabin uncharacteristically early, so that the delay to the next step is more than 24 hours. It seems, however, that the has_time part of an input_datetime cannot hold a time exceeding 24 hours? I didn’t see anything about this in the documentation nor have I found any similar discussion here in the community.

Am I right? Is it not possible?

It is time, and time is limited to 00:00 to 23:59.
You could use schedule or an input text that you parse.

But are you delaying for hours or do you set a time to trigger at?

Yeah, I get that time >24 hours could be seen as days, not time… It’s just that normally, the delays that I want are <24 hours, and then the has_time part of input_datetime is a very straight-forward way of implementing the input. So it’s just for this extraordinary case that I wanted >24 hours and ran into trouble. Just wanted to check that the 23:59 limit is in fact a limitation (and that it’s not just me fumbling it).

I’m using the input_datetime as input to a timer. The timer is started at each step. When the timer finishes, an automation is triggered to start the next step.

EDIT: typo

It is.

Try setting up an Input Text helper like this:

image

which enforces formats like 0:16 or 34:26; and can be used in templates like this:

{% set h,m = states('input_text.delay_timer').split(':') %}
{{ (h|int(0)*3600)+(m|int(0)*60) }} seconds

image

1 Like

That’s brilliant. (Note to self: I really must become proficient in the use of regex.) Thanks!

Regex isn’t really needed. It just validates the input.
It will work just fine without the regex as long as your input is valid

Yes, agreed, but I’m trying to make the input fool proof (since I’m the one operating the user interface, it’s needed…), so automatic validation is important. Without the validation, it’s just a matter of time before the cabin is cold on arrival, without the UI giving me a hint that that’s what’s going to happen…