Input_datetime show seconds

Hi,

is there any chance to show configure seconds for the input_datetime helper? Or where can i find the component to implement it by myself.

thx

What is the use case?
I guess you can always use an input_text and go down to milliseconds if you want.

I would like to set a duration for a light, how long it would be switched on after the motion sensor switched on like this:

I am not happy with this custom component.


I rather prefer the standard component but i cannot show or set seconds for the input_datetimer. Perhaps some else have a better solution how to do this.

If you are just setting a time period you can use an input_number and have that be the seconds part of your delay time.

heres my example:

input_number:
  kitchen_light_auto_off_time:
    name: Off after
    min: 1
    max: 9
    step: 1
    icon: mdi:camera-timer
    unit_of_measurement: min
  - delay: '00:0{{ states.input_number.kitchen_light_auto_off_time.state | int }}:00'

Hi sparkydave. Thanks for your post. How does it looks like in your visualization? I can’t even imagine what it looks like :slight_smile:

image

You can also make it a box selector rather than a slider:

Great thanks.
I saw in on github at home-assistant/Frontend that in ha-base-time-input.ts there is a variable β€œ{this.enableSecond}”. Why this is not active at the moment? That would be great and should solve my problem :slight_smile:

3 Likes