Lovelace: Time Picker Card

ok thanks . can you tell me how I reset the time picker. now it start everyday at the time I was setting in time picker

automations:

image

You donā€™t have to do anything with the time picker card.

All you need to do is set a different time in the input_datetime entity. You can do that however you wantā€¦you can use the time picker, or the UI input, or thru an automation service. Do it however you would otherwise before you even installed the time picker card.

i have never used it beforeā€¦ new to HA :slight_smile:

Have you looked at the docs for the input_datetime?

Have you tried to add the input_datetime entity to a card in lovelace?

yes to both :slight_smile: it starts perfect everyday my vacuum robot - but i shall only run once.

I guess Iā€™m lost on what the problem isā€¦

You havenā€™t even given any specifics on what you are trying to do or the problem you are having.

You havenā€™t said what the input datetime is supposed to be doing.

This thread is about the time picker card and you started out asking about that. But now it seems that the issue is about a vacuum automation issue.

ok ,sorry i will try to explain
i will use the time picker - to turn on my vacuum
image
and use this template
image
and it work fine, but when i set the timer (in this example 19:06) it starts every day at 19:06
how do I make it , so it only use the time picker time once. ? fx, reset time picker ? maybe I misunderstood the function ?

Thatā€™s what Iā€™ve been trying (and failing) to explain.

You donā€™t reset the ā€œtime pickerā€. You reset (changeā€¦) the input_datetime entity.

Literally the only thing that the ā€œtime pickerā€ does is change the value that is contained in the input_datetime.

Everything else is done outside of that one thing. The automation is what determines when or if the vacuum runs. It does that by looking at the trigger you set which compares the time now to the time that you set in the input_datetime.

If you only want it to run once then you will have to figure out how to do that in the automation.

My advice would be to just make the last action in the automation to turn itself off. Then you will have to turn the automation back on again at some point to get it to run again at the newly selected time, which is done bt setting the input_datetime to something else via the frontend, a service call or via the ā€œtime pickerā€.

now I get it ! thanks - that was the missing part :slight_smile: Thanks again for your big help.

Can this be used with input number? Need something to adjust the time for my irrigation systemā€¦

If you want to be able to ā€œturn It on and offā€, simply add the automation to your front end.
Iā€™m using it as my alarm clock.

4 Likes

Does the time resets on Hassio reboot or does it keep the last time inputed? BTW whats the ā€œ[0:5]ā€ for?

The time is controlled by how you configured your Input Datetime entity. If you set an initial value for that it will reset, but this has nothing to do with Time Picker Card :slight_smile:

the [0:5] takes the first 5 characters of the input_datetimeā€™s value - basically stripping the seconds - for example 14:00:00 will become 14:00

1 Like

OK so added it to my irrigation setup looks good!

2020-05-31_10-51-08

2 Likes

Do you know whatā€™s the equivalence of this with your time format (instead of [0:5]):
timestamp_custom('%-I:%M %p', True)
I want to display hours:minutes am/pm

Iā€™m not using [0:5] for displaying it - Iā€™m using it to compare the value against a time sensor in an automation - I think itā€™s easier like that.

You can display the value of an input_datetime in whatever way is most convenient to you :slight_smile:

Looks awesome, good work!

Hereā€™s an idea for the future: It would be great if it supported a time range as well, basically taking a start datetime and an end datetime entity.

Can this be used to turn on a switch at a set time ?

If so, any ideas on what the config would look like ?

No. This only used to set the time values of an input_datetime.

You would have to create an input_datetime to control your switch. But then you could use this card to select the time instead of using the normal UI interface for selecting it.

hello ThaNerd

can you please post your yaml configuration?

thank you