I followed the alarm clock tutorial using the templates, and I have gotten it in my files without errors, and the sliders show up in my UI, but nothing happens when the time is hit.
I originally had this automation using the sunrise and it worked, but with Daylight savings time having hit it’s completely throwing me off so I just want to be able to set it with numbers in the UI.
sensor:
- platform: yr
- platform: template
sensors:
alarm_time:
friendly_name: 'Time'
value_template: '{{ states.input_slider.hour.state }}:{% if states.input_slider.minute.state|length == 1 %}0{% endif %}{{ states.input_slider.minute.state }}'
input_number:
hour:
name: hour
min: 0
max: 23
step: 1
mode: slider
minute:
name: minute
min: 0
max: 60
step: 1
mode: slider
- id: '1540415715656'
alias: Sunrise Lights
trigger:
- platform: template
value_template: '{{ now.time().strftime("%-H") == states.input_slider.hour.state and now.time().strftime("%-M") == states.input_slider.minute.state }}'
action:
- service: light.turn_on
data:
entity_id: light.bedroom, light.lamp
brightness_pct: 100
color_name: floral white
To be honest, I have no idea what anything in the value_template means. Please help, I need my alarm clock to be a productive person in society