Could you give us an example of what you are trying to do so it helps me to understand.
It wasn’t really well thought out on my part. With a normal automation it is easier with my special requests.
I want to start a timer via an input_boolean (“activate pool pump for 30min”). After the timer has expired, the input_boolean should be turned off and a pushover message should be sent.
The plan is to start a pool pump over it.
I did it now with an own automation.
BLUEPRINT CODE UPDATE
Just a heads up if your still on a old HA version before you update.
From time to time Home Assistant update their code structure and the old code will become “DEPRECATED” stopping / breaking automations from working. It effected this blueprint about 4 to 6 months ago. I wanted to wait some time so everyone had a chance to update their HA version before updating the code as older HA versions can not run the new code. This blueprint has now been updated so it will still operate once HA remove the “DEPRECATED” code from their system.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
Hello,
Another nice blueprint here !
I would like to use it to start a bed heater for X minutes.
I use a slider helper as input time
I use a button helper to start the timer
It works but the button entity cannot trigger the automation
If I run manually, the script works as it should.
Any idea ?
Bonus: It would be very nice if just sliding the slider could also (re)start the automation !!!
Bonus 2: display the remaining time in lovelace … is there a way to access the timer entity of the automation ?
Here is the code.
ps: entity_input: - light.salon_salon_1948 … is for testing purpose
Thanks !
alias: Couverture Chauffante
description: ""
use_blueprint:
path: Blackshome/timer-relay.yaml
input:
entity_input:
- light.salon_salon_1948
trigger_input:
- input_button.test_start_couverture
time_minutes: "{{ states('input_number.test_couverture') | float }}"
trigger_state: "on"
I have updated the blueprint and gave it a bit of a tickle, I think I got most of them except the “sliding the slider”, not sure what you were talking about.
Hope this works for you
Blacky
New Feature
-
Timer Helper Added a timer helper option. By adding a timer helper it will survive a Home Assistant restart and resume its time. It also allows you to display the time in a dashboard.
Note - When creating your timer helper, make sure you tick the box to restore so it will survive a HA restart and don’t set any time in the timer helper duration, use the time settings in the automation.
-
Entities You can add any entity you like now.
-
Trigger State You can select a trigger state “Any State Change - Example Button Helper”. This will now work with the new button helper HA released a few months ago.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
Hello @Blacky, you are so quick, thanks !!!
Good news, everything works, even the slider now starts the automation, it’s almost perfect !
Here is the code for those who want to do the same thing:
alias: Couverture Chauffante Seb
description: ""
use_blueprint:
path: Blackshome/timer-relay.yaml
input:
entity_input:
- light.salon_salon_1948
trigger_input:
- input_button.couverture_35_min
- input_number.couverture_chauffante_seb
time_minutes: "{{ states('input_number.couverture_chauffante_seb') | float }}"
trigger_state: state
include_timer_helper: enable_timer_helper
timer_helper: timer.timer_couverture_chauffante_seb
I can now just set the number with a script or trough api and my heating blanquet will start for XX minutes when I activate my go to bed mode
One more suggestion:
I think that it would simplify further the process to have a button called “heat for 20 minutes”, another one “heat for 35 minutes” etc
If the blue print could set a timer depending of the trigger it would spare the need to create an intermediate script for each button.
Here is the current result:
Tip:
Setting the input_number min value to -1 allows to stop the timer and turn off the entity by sliding the slider to -1
No problem
That is a good idea, I will put it on the list. For now you could create 2 automations, one for 20min and one for 35min and use the same timer helper
Happy days
Blacky
Also if you click on the timer and you will see a pause, cancel and finish selection.
Didn’t know that, very useful !
New Feature
- HA Restart If not using a timer helper then the automation will try and restart to then turn your entities OFF.
Bugs Fixes
- Fixed a bug not allowing multiple entities as a selection.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
This is a full redesign and will break your existing automation. We have also changed the name so you can keep your exiting automation and just use the import blueprint button at the top and try it out.
New Feature
- Name Change - To align with my other blueprint and hopefully for better understanding of the blueprint.
- Triggers - You can now have 4 different triggers with 4 different run times for your entities in the one blueprint. No need to have multiple automations for different times.
- Time Input - Removed time sliders to keep the blueprint clean now having 4 time selections.
- Entities - You can now have any entity domain.
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
Installed and seems to work as it should
Thanks !
Thought you would like it. You noticed the update it quickly. I used it for a few weeks now with the timer helper and it has been working well. Finally had time to push it out.
Blacky
Installed and working perfect.
Is it possible to add “sun” condition or any other conditions?
Thanks!
Could you provide a use case for this.
Have you also looked at my Turn Light, Switch or Scene On & Off with Trigger Conditions blueprint. You can define a time and add any condition you like.
Blacky
I would like to trigger garage ceiling lamps when garage door button pressed.
Lights should turn off after 10 mins and automation should work only before sunrise and after sunset.
Shelly relay is connected to my garage door opener and when I press the button it turns on for 0.05 seconds then switch back to off position. This is why I cannot use your other automation. Light is turning on for only 0.05 seconds then turns back to off position.
I need to trigger light with only on command from shelly relay and stay on for selected duration.
how do i import this blueprint?
i’m getting
Invalid blueprint: extra keys not allowed @ data['blueprint']['input']['timer_helper']['selector']['filter']. Got None
Not very helpful error message to me