Hi,
All the timers that I see have 2 input_numbers (sliders) to set “starting time” (one for hours and another for minutes).
I would like to have it in just one slider.
I’m trying:
configuration.yaml
input_number:
hora_de_inicio_fraccion:
name: Hora de inicio
icon: mdi:timer
initial: 12
min: 0.00
max: 23.75
step: 0.25
- platform: template
sensors:
tiempo_de_depuradora:
friendly_name: 'Tiempo de depuradora'
value_template: '{{ states.input_number.hora_de_inicio_fraccion.state | int }}:{% if states.input_number.minutos_riego.state|length == 1%}0{% endif %}{{(((states.input_number.hora_de_inicio_fraccion.state | float) - (states.input_number.hora_de_inicio_fraccion.state| int)) * 60) | int }}'
automation.yaml
- id: 'programador depuradora'
alias: 'Programa depuradora'
initial_state: 'true'
trigger:
- platform: time_pattern
minutes: '/1'
seconds: 10
condition:
- condition: template
value_template: '{{ (now().strftime("%s") | int | timestamp_custom("%H:%M", False)) == states.sensor.tiempo_de_depuradora.state }}'
It is working OK, but
is it possible to see the slider values in HH:MM format insted of HH.hh?
The sensors looks Ok, but the slider appears in fraction of hours.
(18.25 in the slider means 18:15h as seen in the sensor)
Thanks