It seems there is a problem with the code. The slider value for below 10 is only one digit, whereas the below 10 value for now.time().strftime("%H") or now.time().strftime("%M") are zero-padded. So, the above conditional statement for hour or minute below 10 will always return false.
To rectify this, just change to this…
now.time().strftime("%-H")
or now.time().strftime("%-M")
I believe you could just move the value template line into the trigger section. That way you don’t need the part that checks the time every 15 minutes. so far it works for me.
So this all looks super cool, but do you think we can take everything here and combine it together? As a noob at this it’s a little hard to follow, but I’m getting there. If we could sum up that would be awesome though. Thanks!
Thanks! Really appreciated. You just have a little mistake in your template sensor: you handled the case where the minutes were 0, and added another 0, but you didn’t handled the case where they were set to 5. A more generic template: {{ states.input_slider.alarmhour.state }}:{% if states.input_slider.alarmminute.state|length == 1%}0{% endif %}{{ states.input_slider.alarmminute.state }}
I have a question !
When i want to put a transition on my light for the morning like that - alias: "aurora 07h00" trigger: - platform: time after: "06:50:00" condition: - platform: state entity_id: input_boolean.reveil state: 'on' - platform: state entity_id: input_boolean.lightreveil state: "on" - platform: state entity_id: input_select.choixreveil state: "07:00" action: service: light.turn_on entity_id: light.chambre data: transition: 600
The light turn on but the transition doesn’t happen… the light is on with full brightness… it isn’t very peaceful to wake up…
Have you test that ?
I updated my code to replace platform with condition in condition.
I think that my word transition was not good indented, a space was needed the T of transition had to be under the T of data.
This is awesome stuff guys! Thank you. As a noob of course I have at least one question! Would it be possible to add a duration slider? So that you can set how long the even triggers for? Obviously not useful as an alarm with notify, however, I’m thinking this would be amazingly useful as a timer module for a pool pump.
Im also not sure how to change the action to use a rpi_gpio switch… one thing at a time!
Thanks again for sharing!