Yes, I did know about timers already. I use them mostly with things like my garage door. I start a timer to remind me to close it if it remains open for more than 15 minutes. With an actionable notification of course!
This is a very nice and compact way to program random vacation timers for lights and screens! It seemed complex in the beginning, but after writing the code it actually it is very clear and straightforward. Thanks!
Thank you Bram. You might want to check out this video as well to create easy presence simulation during your vacation: Automatic Presence Simulation in Home Assistant - Tutorial ruclips.net/video/OTQu3BMr3EU/видео.html
Thanks for posting this. It's a fine example of why HA is still not for regular people. A simple delay ought to survive restarts implicitly. As someone who has dug a hole by getting HA running, I much appreciate the shovel you have provided in this example so that I can bury myself more completely..
Well, creating timers is really just for critical automations. I wouldn't create a timer for light automations for example. I would use the wait time in the trigger for that.
I have successfully implemented your random timer script, it works flawlessly! THANK YOU! I use it to trigger three scripts which turn off various lights at different intervals. The randomness is comforting since this is used while on vacation [holiday].
Great video. This was very informative and just what I need to try for my kitchen lights. I will keep my time interval as fixed but I am sure I will find a use case where I need the random time interval
I have used timers for motion with my lights, but you gave me a new way to look at it. My automation starts a timer on motion, then has a do while motion is detected and would restart my timer. I have had trouble with this. My automation will sometimes drop out of the Do While loop.... This is much more clean and I think will work better. Thanks!
Thank you. I was struggling to craft an automation to restart the delay if the motion sensor retriggers and have the timer stop and the light remain on if I press the wall remote while the light was on from the motion sensor. This is the answer!
Not sure what is going on with the new HA update but theres no 'event' tab and its now 'manual event'. But I cannot add a timer as an event for a trigger. This works still but I have to add it as a state change. For example, state change from active to idle. It works that way. But I tried the exact thing in this video adding 'timer.finished' and the entity_id as my timer and HA says its not valid 🤣
Sincerely, this is too complicated for the regular people that wants some automation power out of Home Assistant but does not necessary want a million steps to create an automation of something that should be simple as a timer. Not your fault, your instructions were great.
Thanks you very much for sharing this tutorial. is it ok to use more than 1 light using the same timer or we need to create individual timer for each light eg: timer1 for light 1, timer 2 for light 2 and so on..?
You will need seperate timers if the automations run concurrently. I generally only use timers when the automation is critical. For instance for shutting of my garden watering system.
@3:45, the "Event" trigger type is no longer listed. What should I be using instead please? (HA 2023.10.3, HAOS v11) Edit: it's now called "Manual event", but it's the same.
Excellent video/tutorial! 👍 It's this kind of detail that makes such a difference in your automations and reduces frustration when things don't work as you would hope. Thanks for sharing this very precious tip! If I was not already a subscriber, I would subscribe now. 😆
Follow-up question: when the timer resumes after HA restart, does it resume from where it was or does it take into account the duration of the restart and adjust accordingly? Usually, it takes less than 2 minutes for HA to restart, I think. Just wondering if those 2 minutes are deducted from the timer when it resumes.
great instructions, thank you Please how will "yaml" look like when i need automation to run at a specific time. In your video instructions there is a Trigger "timer.finished" and I would need more Trigger "time"
Hello. I have five Philips Hue motion sensors and a UniFi AI360 camera in my garage. Your motion sensor trigger is only for one device. I could, of course, use multiple triggers (one per motion sensor), but I wonder if it is possible to create a group for these? I have tried to add a group in the Helpers menu. I tried a binary sensor group, but that just showed whether or not the sensors themselves were online, not if motion was detected or not. I also tried a sensor group (the entities for the motion sensors aren't available if I try to use this), a switch group (which gives me an on-off switch for turning the motion sensors on/off, again not providing me info about whether or not motion was detected). I can't seem to get these grouped together... do you know if there is a trick to getting them to work in a group please? Edit: I figured out what the problem was. The AI360 camera has two entities for what I assumed were motion. That assumption was incorrect. The entity called "AI 360 Detections: Motion" indicates whether or not the camera has motion detection enabled. It is *not* the actual output of the motion sensor. The entity called "AI 360 Motion" is the entity that outputs whether or not motion is detected. I was trying to put both in the same group. That's where I was going wrong. Putting just the "AI 360 Motion" entity and the Philips Hue motion sensor entities into the one binary sensor group works perfectly. However, I had to use a "State" trigger rather than "Device" at @4:12.
Hi and thanks for a nice video. I'm trying to do something similar but with a door sensor but I can't get this to work. I'm very new to Home Assistant so I don't know that much about this timers and so on. In my bathroom I have a motions sensor to turn on the lights and turn off like you did in the video but I want to use a door senor in the automation to turn off the lights when the door opens but only if the door has been closed for more then 2 minutes Or an separate automations will work to.
Thank you very much for your video. I implemented everything. Everything works. Unfortunately the lamp does not turn off after the timer has finished. Do you have an idea? I used: "timer.finished" as the event type and also assigned the entidy_id: correctly. Thank you very much for everything
Great video. This helped me setup my hallway lights, and it works for my two motion sensors since the hallway is long and has stairs with 6 lights. I tried same setup for my Aqara F2P sensor in my room, and the cancel timer does not work. I've tried for whole room occupied, and when presence identify is above 0. Each time, the timer still keeps going anyways. Aqara and Home Assistant both say it detects someone in those areas too.
@@SmartHomeJunkie I have another Philips motion sensor, same that have worked in my hallways, so I think I'll switch to that. I'll hang onto the Aqara F2P, in case they improve it later. Might as well go with the sensors I know I've been able to get to work.
How would you do the architecture with timers. One automation for timers, one for turning on/off the devices based on timers, or all in one? It's getting messy pretty quickly. 😅
Great video! Thanks as always :) Question... for a different use case, I'd like to expose a timer's "duration" to a Lovelace dashboard, so any user can customize the duration directly from lovelace. How would you go about doing this?
Thanks. I am just learning about triggers and trying to automate a gate. I'll try this method, as having a gate close after a nominated time is great until you find yourself not being fast enough and the gate closing on the car without being able to stop the automation. Ahhh the joys of being a noob to HA. Would this method be suitable by taping the button again to stop or restart the gate?
Hoi Ed, Ik start de timer ook als de lampen aan gaan (tijdens de eerste beweging), want als in jouw voorbeeld een reset na de eerste beweging plaatsvind loopt de timer niet en blijven de lampen aan.
hey, thanks for the video. works fine with a nightlight scene. it is possible to add a stopper, like If light x is already on, and a motion is detected, light x stays the same? when light x is off again, automation runs and sets x to nightlight at motion. you know ? :)
Thanks for this. I've just changed over a couple of lights to use timers but had to mod my Xiaomi motion sensors for the 5s reset as typically they are hard coded for 90s. My question today is...Where is the best place to put a condition for turning on the light based on lux? I had a condition in the old automation but if I include this in your example, the timers get screwed up as the lux level in that room goes up after the light turns on. Was not an issue without timers but now prevents the timers from functioning correctly.
Helpful video, thank you. I'm very new to HA and built a central heating controller over Christmas from smart switches and Sonoff Zigbee temperature sensors when my dumb controller failed. I've combined these into the generic thermostat entity. I turn the thermostats on (HVAC mode heat) and off (HVAC mode off) using a Google calendar (thank you for your video on calendars by the way) but I also want to be able to turn on a thermostat by a timer for x minutes. The user enters the duration somehow on the dashboard and clicks the timer to start. That sets the HVAC mode to heat and then back to off at the end of the timer. I can't find how to do that mainly because I can't see how to enter data into the dash and then pass that via a variable to the timer. Can you help or direct me to an example. Thank you
I’ve tried to follow you video but it doesn’t work on my case as my timer does not start triggered by a motion detector. In my bathroom I have a mirror which is heated by a resistance and controlled by a spring-loaded rocker light switch which I connected a smart switch. The idea is every time I push the rocker switch a timer starts for 15 minutes to heat the mirror. Following your instructions, I created a helper but I need some guidance on how to create a trigger and an action specifically for this case. Could you perhaps give me some instructions. Thanks, and great job with the channel.
and how can I use this for several motion sensors? using the same time for different sensors should'nt be possible, right? I'm using motion sensors for my hallways. Putting the sensor in groups isn't ideal in my case.
Hola Albert, despues de mucho renegar pude prender y apagar un aromatizador hvac que funciona por wifi, desde luego solo logre enviar un on y un off mediante un servicio, para lo cual cree un script para que prenda y apague, Como luego de prender home assitant no tiene forma de monitorear que esta pasando con el dispositivo se me ocurrio que podria crear un contador para que muestre la cantidad de minutos que esta encendido, luego cuando le envie el off que pare el contador, podrias darme una idea de como hacerlo? gracias
Excelent tutorial, especialy part with "random". I would like to set up value of the timer by another helper input.datetime.potlac_automatikuvetra, but HA shows error. I have got default_config: in config.yaml ... and in timers.yaml I used this timer: pocitadlonotifvetra: duration: "{{ states ('input_datetime.potlac_automatikuvetra') }}" ... it works with specified duration: '00:00:40' .... error says: Invalid config for [timer]: offset {{ states ('input_datetime.potlac_automatikuvetra') }} should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ ... it seems that timer and input date time helper have different format. Could you say a few words to this pls. Thank you.
Can the timer survive even the Home Assistant server panics. I guess you mean the formal restart of home assistant in your video. If you think I have a delay time of 30 minutes and the home assistant server/vm panics or powers off unexpectedly, can the delay timer still survive?
Hello there, thanks for your great videos, can we make a timer that triggers every 30 days and send notification on mobile , for example like a reminder to renew monthly subscription Thanks in advance❤
Hey Ed. This is the way I also use the timers. This works fine also after restarts as you showed in your awesome video. But I'm facing an issue though. I pause timers during motion and un-pause them when no motion is there anymore. Then I switch off the light on the timer finished event. But when Home Assistant reboots during a timer is paused and the motion ends before Home Assistant is fully up again the light will remain on forever - at least from what I observed. The un-pause automation doesn't run because I've "missed" the no motion change. Do you or everyone of the audience have a smart solution for this situation? All the best Marco
@@SmartHomeJunkie I had some trouble starting the timer on no motion when it wasn't paused before. Maybe that's also solvable differently but that wouldn't change the issue of missing the no motion trigger during HA is offline. 😊 I could use an automation which gets triggered by HA startup and check all the missed no motion scenarios but I feel this is not very smart nor clever. I was hoping to get a better idea while talking here. 😉 Most of the time the solution is super easy but I can't see it even it is right in front of me. 😀
@@CaptainBalou ah, now I get it. I think it will be hard to detect that there is no motion is HA is offline. The sensor has no way to send that trigger again after HA restarted. Never thought of this scenario tbh.
i am using below event state change instead of "timer.finished", i wonder if that will survive during reboot? platform: state entity_id: - timer.motion_kitchen_timer to: idle from: active
So one question: what happens if the motion never stops? Ie: I walk into the room and constantly keep moving? The timer will turn off the lights after a set random period even though I'd like it to stay on while I'm constantly moving in the room. This edge case happens much more often than HA resetting/rebooting while the timer is running, at least in my house ;-)
Matey could I use this for setting up a timer for media as I am struggling, I have an automation that when my bathroom door sensor activates it turns the lights on and plays music on my bathroom speaker..but I want the music to turn off after 10 mins but cannot figure it out !
Well, you could add a delay of 10 minutes in the Then Do section and after that turn off the music. But I would use a motion sensor and after 10 minutes of no motion turn off the music.
Thank you .. I thought delay was for delaying the start of the event but I think I get you..I could also move one of my motion sensors into bathroom also I will toy with them options thanks matey appreciate it !
When you added the first trigger, for timer finished. Nothing ever looks or calls it when the timer goes to zero. I have it all working fine the timer gets canceled and the timer gets set and started. but there is nothing that actually calls it to turn off the light if it gets to 0:0:0. When event is fired... but nothing calls that event "timer.finished". Like an automation that states if timer gets to 0 then fire timer.finished. Or did I miss something. Again I can see the start and the timers counting down. but at 0 it does nothing.
I guess you missed something. When the timer is finished, the lights turn off as you can see in the video. You can download the code to see that it works.
@@SmartHomeJunkie I think the timer.finished was not the words I used. I used the entity_id.finished So that is my fault. I just set it and will test it here in a minute. Thanks for the feedback!! Keep up the great work! I don't like coffee so can I send a beer instead? HAHAHA
- isn’t “Restore ?” option in timer configuration is supposed to persist timer between restarts? - I am not following why is it so elaborate. I got same “light on/ off” by creating two simple automations : one for on, another for off, with timeout. - Why you need a timer if timeout is few seconds and likelihood of HA restarting at that time is negligible? - Or this is so elaborate because you wanted to have it as one monolithic automation?
I never use BluePrints. I create my tutorials to teach how you can set things up yourself in Home Assistant. But, you can create a blueprint yourself based on an automation that you've created.
Home Assistant - система для задротов. Всё через скрипты, всё через абсолютно неинтуитивный синтаксис, плюс эти пайтоновские закидоны с точным количеством пробелов в отступах, это полный бред. Надеялся, что более менее будет настройка через User Interface, но даже с таким простыми вещами, как таймеры, всё опять через текстовые настройки.. Полная фигня.
Did you know about timers already? Let me know your use cases!
No, I didn’t know about it. I’ve learned it now. 😊 It was one more missing piece .
HA is full of hidden gems. Thank you for your help to find them. 😊
Yes, I did know about timers already. I use them mostly with things like my garage door. I start a timer to remind me to close it if it remains open for more than 15 minutes. With an actionable notification of course!
@@TravisWrightUtah That sounds like a good solution!
There should be a toggle on every automation or timer, something like "Persist through restart". Hopefully that's added one day.
This is a very nice and compact way to program random vacation timers for lights and screens!
It seemed complex in the beginning, but after writing the code it actually it is very clear and straightforward.
Thanks!
Thank you Bram. You might want to check out this video as well to create easy presence simulation during your vacation:
Automatic Presence Simulation in Home Assistant - Tutorial
ruclips.net/video/OTQu3BMr3EU/видео.html
My main problem with everything homeassistant is how disconnected entities and automations end being. This is the best workaround I saw so far
Your tutorials always make me think about Home Assistant in different ways. I have learned a lot from your videos, thank you.
I'm glad they helped you. Please consider sponsoring me so that I can continue my work. 🙏🏻
Thanks for posting this. It's a fine example of why HA is still not for regular people. A simple delay ought to survive restarts implicitly. As someone who has dug a hole by getting HA running, I much appreciate the shovel you have provided in this example so that I can bury myself more completely..
Well, creating timers is really just for critical automations. I wouldn't create a timer for light automations for example. I would use the wait time in the trigger for that.
I have successfully implemented your random timer script, it works flawlessly! THANK YOU! I use it to trigger three scripts which turn off various lights at different intervals. The randomness is comforting since this is used while on vacation [holiday].
That's great to hear!
Wow! Including that 'random' statement in the code should take some of my existing automations to the next level.
Thanks Ed !!!
Great video. This was very informative and just what I need to try for my kitchen lights. I will keep my time interval as fixed but I am sure I will find a use case where I need the random time interval
Great video! I wish there were more examples out there. This was so useful!
Thank you for this awesome tutorial. Been trying to do this couple of time but fail. Now it works flawlessly. Thanks again!
That's great to hear!
thank you !!!
The first Video from where i undersand how to start AND stop a Timer in the new automation
Great to hear!
Thanks Ed! this is sick! i used a node red automation that reset a "timer" after a minute. This is a game changer :D
Great that it helps!
Thanks!
Thank you for watching and showing your appreciation!
I have used timers for motion with my lights, but you gave me a new way to look at it. My automation starts a timer on motion, then has a do while motion is detected and would restart my timer. I have had trouble with this. My automation will sometimes drop out of the Do While loop.... This is much more clean and I think will work better. Thanks!
Excellent tutorial as ever. Thank you
I was searching for this solution from a month, thanks man 🎩
Glad that it helped!
Only just getting round to looking at timers this video was great, I am using a timer for a power socket so the heating is only on for an hour.
Thank you. I was struggling to craft an automation to restart the delay if the motion sensor retriggers and have the timer stop and the light remain on if I press the wall remote while the light was on from the motion sensor. This is the answer!
Not sure what is going on with the new HA update but theres no 'event' tab and its now 'manual event'.
But I cannot add a timer as an event for a trigger.
This works still but I have to add it as a state change. For example, state change from active to idle.
It works that way. But I tried the exact thing in this video adding 'timer.finished' and the entity_id as my timer and HA says its not valid 🤣
Sincerely, this is too complicated for the regular people that wants some automation power out of Home Assistant but does not necessary want a million steps to create an automation of something that should be simple as a timer. Not your fault, your instructions were great.
very inspiring tutorial. Easy to follow. As beginner not necessarily easy to understand. But this will come with time.
This was helpful! Thanks
Very nice explanation, thank you! How do you display the remaining time of the timer in your dashboard?
Love your energy!
Thank you a really great tutorial
Thanks for the video. That was helpful
Thank you for the vid! I guess the bug with the timer_finished event not firing if it happens during downtime is not fixed?
Thanks for the video really helpful. I'm just getting into node red. Would you have a tutorial for something similar in node red?
Hi,
I just used your automation and added a slider timer helper to set the lenght of the timer.
So I can set the timer with easy from the UI.
Can you still show the state of the timer counting down with that? I have got the slider working, but than not the state of the countdown.
Thanks for good tutorial. Is there any option to add manual switch to this automation to turn on light without turing off by automation?
Maybe this helps?
How to Combine BUTTONS and AUTOMATIONS in Home Assistant - Tutorial
ruclips.net/video/sNmonuw4EHo/видео.html
Awesome as always Ed 👍
Thank you Stu!
Thanks you very much for sharing this tutorial. is it ok to use more than 1 light using the same timer or we need to create individual timer for each light eg: timer1 for light 1, timer 2 for light 2 and so on..?
You will need seperate timers if the automations run concurrently. I generally only use timers when the automation is critical. For instance for shutting of my garden watering system.
So helpful. How would you solve it with multiple sensors (ie. in large room, with a sensor in each end)
Put the sensors in a group
Thx for the web page version.
You're welcome! Now you can enjoy my content without any interruptions from pesky ads. Happy watching!
@3:45, the "Event" trigger type is no longer listed. What should I be using instead please? (HA 2023.10.3, HAOS v11)
Edit: it's now called "Manual event", but it's the same.
Excellent video/tutorial! 👍
It's this kind of detail that makes such a difference in your automations and reduces frustration when things don't work as you would hope.
Thanks for sharing this very precious tip!
If I was not already a subscriber, I would subscribe now. 😆
Thank you for your support!
Follow-up question: when the timer resumes after HA restart, does it resume from where it was or does it take into account the duration of the restart and adjust accordingly?
Usually, it takes less than 2 minutes for HA to restart, I think. Just wondering if those 2 minutes are deducted from the timer when it resumes.
@@gildaslefur2435 It will end at the initially calculated end time.
@@SmartHomeJunkie very cool! Dank u wel !
great instructions, thank you
Please how will "yaml" look like when i need automation to run at a specific time. In your video instructions there is a Trigger "timer.finished" and I would need more Trigger "time"
Hello. I have five Philips Hue motion sensors and a UniFi AI360 camera in my garage. Your motion sensor trigger is only for one device. I could, of course, use multiple triggers (one per motion sensor), but I wonder if it is possible to create a group for these?
I have tried to add a group in the Helpers menu. I tried a binary sensor group, but that just showed whether or not the sensors themselves were online, not if motion was detected or not. I also tried a sensor group (the entities for the motion sensors aren't available if I try to use this), a switch group (which gives me an on-off switch for turning the motion sensors on/off, again not providing me info about whether or not motion was detected).
I can't seem to get these grouped together... do you know if there is a trick to getting them to work in a group please?
Edit:
I figured out what the problem was.
The AI360 camera has two entities for what I assumed were motion. That assumption was incorrect.
The entity called "AI 360 Detections: Motion" indicates whether or not the camera has motion detection enabled. It is *not* the actual output of the motion sensor.
The entity called "AI 360 Motion" is the entity that outputs whether or not motion is detected.
I was trying to put both in the same group. That's where I was going wrong.
Putting just the "AI 360 Motion" entity and the Philips Hue motion sensor entities into the one binary sensor group works perfectly. However, I had to use a "State" trigger rather than "Device" at @4:12.
Hi and thanks for a nice video. I'm trying to do something similar but with a door sensor but I can't get this to work. I'm very new to Home Assistant so I don't know that much about this timers and so on. In my bathroom I have a motions sensor to turn on the lights and turn off like you did in the video but I want to use a door senor in the automation to turn off the lights when the door opens but only if the door has been closed for more then 2 minutes
Or an separate automations will work to.
Thank you
Thank you very much for your video. I implemented everything. Everything works. Unfortunately the lamp does not turn off after the timer has finished. Do you have an idea? I used: "timer.finished" as the event type and also assigned the entidy_id: correctly. Thank you very much for everything
Great video. This helped me setup my hallway lights, and it works for my two motion sensors since the hallway is long and has stairs with 6 lights. I tried same setup for my Aqara F2P sensor in my room, and the cancel timer does not work. I've tried for whole room occupied, and when presence identify is above 0. Each time, the timer still keeps going anyways. Aqara and Home Assistant both say it detects someone in those areas too.
There must be an error in your sensor or automation somewhere.
@@SmartHomeJunkie I have another Philips motion sensor, same that have worked in my hallways, so I think I'll switch to that. I'll hang onto the Aqara F2P, in case they improve it later. Might as well go with the sensors I know I've been able to get to work.
Great video, Thanks a lot!
How would you do the architecture with timers. One automation for timers, one for turning on/off the devices based on timers, or all in one? It's getting messy pretty quickly. 😅
Great video Ed as always. Did you open issue for Timer on GitHub for not triggering finished when in restart?
Yes I did: github.com/home-assistant/core/issues/79145
@@SmartHomeJunkie Dude you are amazing
@@SmartHomeJunkie Looks like it was closed without actually being fixed?
Great video! Thanks as always :)
Question... for a different use case, I'd like to expose a timer's "duration" to a Lovelace dashboard, so any user can customize the duration directly from lovelace. How would you go about doing this?
Me too. Did you find how to do this?
Thanks. I am just learning about triggers and trying to automate a gate. I'll try this method, as having a gate close after a nominated time is great until you find yourself not being fast enough and the gate closing on the car without being able to stop the automation. Ahhh the joys of being a noob to HA. Would this method be suitable by taping the button again to stop or restart the gate?
Hoi Ed,
Ik start de timer ook als de lampen aan gaan (tijdens de eerste beweging), want als in jouw voorbeeld een reset na de eerste beweging plaatsvind loopt de timer niet en blijven de lampen aan.
hey, thanks for the video. works fine with a nightlight scene. it is possible to add a stopper, like If light x is already on, and a motion is detected, light x stays the same? when light x is off again, automation runs and sets x to nightlight at motion. you know ? :)
Thanks for this. I've just changed over a couple of lights to use timers but had to mod my Xiaomi motion sensors for the 5s reset as typically they are hard coded for 90s. My question today is...Where is the best place to put a condition for turning on the light based on lux? I had a condition in the old automation but if I include this in your example, the timers get screwed up as the lux level in that room goes up after the light turns on. Was not an issue without timers but now prevents the timers from functioning correctly.
I usually add a condition in the action to turn on the light. This way I am sure the light always turns off, even if the lux value is too high.
@@SmartHomeJunkie Thanks for the prompt reply. I'll give that a try
Helpful video, thank you. I'm very new to HA and built a central heating controller over Christmas from smart switches and Sonoff Zigbee temperature sensors when my dumb controller failed. I've combined these into the generic thermostat entity. I turn the thermostats on (HVAC mode heat) and off (HVAC mode off) using a Google calendar (thank you for your video on calendars by the way) but I also want to be able to turn on a thermostat by a timer for x minutes. The user enters the duration somehow on the dashboard and clicks the timer to start. That sets the HVAC mode to heat and then back to off at the end of the timer. I can't find how to do that mainly because I can't see how to enter data into the dash and then pass that via a variable to the timer. Can you help or direct me to an example. Thank you
can you do a tutorial on how to build a presence simulation for lights when on vacation ? there are a few but they are not very clear. thx !
Sure I can! I'll put it on the list. Actually it's already on there 😜
The Automations interface has changed a bit since then, but it's still useful
Thanks. Yes, that is the pain of Home Assistant. The interface changes constantly. That's why creating tutorials is not very motivating unfortunately.
I’ve tried to follow you video but it doesn’t work on my case as my timer does not start triggered by a motion detector. In my bathroom I have a mirror which is heated by a resistance and controlled by a spring-loaded rocker light switch which I connected a smart switch. The idea is every time I push the rocker switch a timer starts for 15 minutes to heat the mirror. Following your instructions, I created a helper but I need some guidance on how to create a trigger and an action specifically for this case. Could you perhaps give me some instructions. Thanks, and great job with the channel.
I'd love to see how you created the dashboard, especially the part with the timer status.
Thanks! I will work on a dashboard video soon.
It's just an "entities" card with the motion detector and timer selected as the entities
@@diedrichg Yes, thank you. I had figured that out a while back.
and how can I use this for several motion sensors? using the same time for different sensors should'nt be possible, right? I'm using motion sensors for my hallways. Putting the sensor in groups isn't ideal in my case.
Thanks
You're very welcome!
Can you create a video describing the high availability of Home Assistant? or any other fix if the home server breaks
Great video! Do I need to create a new timer-helper for each automation or can I utilize it for different automations at the same time? 🤔 thanks!
You can use it for multiple automations as long as it's not used simultaneously.
Hola Albert, despues de mucho renegar pude prender y apagar un aromatizador hvac que funciona por wifi, desde luego solo logre enviar un on y un off mediante un servicio, para lo cual cree un script para que prenda y apague, Como luego de prender home assitant no tiene forma de monitorear que esta pasando con el dispositivo se me ocurrio que podria crear un contador para que muestre la cantidad de minutos que esta encendido, luego cuando le envie el off que pare el contador, podrias darme una idea de como hacerlo? gracias
Is there a specific reason to choose random time? or is it also fine with a fixed time. why random time?
thanks!
No, you can use a fixed time. It's just an extra example to also show how a random function works.
@@SmartHomeJunkie Great! thanks a lot for the great knowledge you share!
Hi, been following your videos on HA. Do u help in setting up HA from scratch?
I do consultancy and training. You can send me an email for the conditions and rates.
Please let me know ur email id and I'll drop u an email
👍verry helpfull 👍
Excelent tutorial, especialy part with "random". I would like to set up value of the timer by another helper input.datetime.potlac_automatikuvetra, but HA shows error. I have got default_config: in config.yaml ... and in timers.yaml I used this timer: pocitadlonotifvetra:
duration: "{{ states ('input_datetime.potlac_automatikuvetra') }}" ... it works with specified duration: '00:00:40' .... error says: Invalid config for [timer]: offset {{ states ('input_datetime.potlac_automatikuvetra') }} should be format 'HH:MM', 'HH:MM:SS' or 'HH:MM:SS.F' for dictionary value @ ... it seems that timer and input date time helper have different format. Could you say a few words to this pls. Thank you.
You might be able to fix this by using the timestamp_custom function in your template.
Can the timer survive even the Home Assistant server panics. I guess you mean the formal restart of home assistant in your video. If you think I have a delay time of 30 minutes and the home assistant server/vm panics or powers off unexpectedly, can the delay timer still survive?
Very handy :)
Hello there, thanks for your great videos, can we make a timer that triggers every 30 days and send notification on mobile , for example like a reminder to renew monthly subscription
Thanks in advance❤
Hey Ed.
This is the way I also use the timers. This works fine also after restarts as you showed in your awesome video.
But I'm facing an issue though. I pause timers during motion and un-pause them when no motion is there anymore. Then I switch off the light on the timer finished event. But when Home Assistant reboots during a timer is paused and the motion ends before Home Assistant is fully up again the light will remain on forever - at least from what I observed. The un-pause automation doesn't run because I've "missed" the no motion change.
Do you or everyone of the audience have a smart solution for this situation?
All the best
Marco
I'm not sure why you pause the timer. Why don't you just start a timer as soon as there is no motion and stop the timer when there's motion again?
@@SmartHomeJunkie I had some trouble starting the timer on no motion when it wasn't paused before. Maybe that's also solvable differently but that wouldn't change the issue of missing the no motion trigger during HA is offline. 😊 I could use an automation which gets triggered by HA startup and check all the missed no motion scenarios but I feel this is not very smart nor clever. I was hoping to get a better idea while talking here. 😉 Most of the time the solution is super easy but I can't see it even it is right in front of me. 😀
@@CaptainBalou ah, now I get it. I think it will be hard to detect that there is no motion is HA is offline. The sensor has no way to send that trigger again after HA restarted. Never thought of this scenario tbh.
Is it possible to reuse this timer in multiple automations in parallel?
I don't think so. You can not use the same timer concurrently I believe.
Thanks, but it's too much trouble
I just need a simple delay, do you have a video for it. I can't find anything on youtube???
You can use the delay action...
i am using below event state change instead of "timer.finished", i wonder if that will survive during reboot?
platform: state
entity_id:
- timer.motion_kitchen_timer
to: idle
from: active
I like this approach as I was using two automations and now got it down to one
So one question: what happens if the motion never stops? Ie: I walk into the room and constantly keep moving? The timer will turn off the lights after a set random period even though I'd like it to stay on while I'm constantly moving in the room. This edge case happens much more often than HA resetting/rebooting while the timer is running, at least in my house ;-)
The light will stay on as long as there’s motion.
Matey could I use this for setting up a timer for media as I am struggling, I have an automation that when my bathroom door sensor activates it turns the lights on and plays music on my bathroom speaker..but I want the music to turn off after 10 mins but cannot figure it out !
Well, you could add a delay of 10 minutes in the Then Do section and after that turn off the music. But I would use a motion sensor and after 10 minutes of no motion turn off the music.
Thank you .. I thought delay was for delaying the start of the event but I think I get you..I could also move one of my motion sensors into bathroom also I will toy with them options thanks matey appreciate it !
How would I make a trigger with 5 minutes to go using the duration function?
When you added the first trigger, for timer finished. Nothing ever looks or calls it when the timer goes to zero. I have it all working fine the timer gets canceled and the timer gets set and started. but there is nothing that actually calls it to turn off the light if it gets to 0:0:0. When event is fired... but nothing calls that event "timer.finished". Like an automation that states if timer gets to 0 then fire timer.finished. Or did I miss something. Again I can see the start and the timers counting down. but at 0 it does nothing.
I guess you missed something. When the timer is finished, the lights turn off as you can see in the video. You can download the code to see that it works.
@@SmartHomeJunkie I think the timer.finished was not the words I used. I used the entity_id.finished So that is my fault. I just set it and will test it here in a minute. Thanks for the feedback!! Keep up the great work! I don't like coffee so can I send a beer instead? HAHAHA
@@worm-haandled4615 Beer, pizza, everything works 😉
nice
Im wanting to setup a network access timer thru the unifi integration, Im stuck lol
Îm newbie and the « Conditions » tag is not avaliable when i want to add action… any idea?
not sure wha you are referring to but when you choose an option under "Then Do". I found "Add condition" there
- isn’t “Restore ?” option in timer configuration is supposed to persist timer between restarts?
- I am not following why is it so elaborate. I got same “light on/ off” by creating two simple automations : one for on, another for off, with timeout.
- Why you need a timer if timeout is few seconds and likelihood of HA restarting at that time is negligible?
- Or this is so elaborate because you wanted to have it as one monolithic automation?
Hi! I like to keep everything regarding one device in one automation to keep my automations list clean.
Wat is precies de logica van een variabele timer?
A build In blueprint would be nice to have. We will drown in helpers and automations
I never use BluePrints. I create my tutorials to teach how you can set things up yourself in Home Assistant. But, you can create a blueprint yourself based on an automation that you've created.
Home Assistant - система для задротов. Всё через скрипты, всё через абсолютно неинтуитивный синтаксис, плюс эти пайтоновские закидоны с точным количеством пробелов в отступах, это полный бред. Надеялся, что более менее будет настройка через User Interface, но даже с таким простыми вещами, как таймеры, всё опять через текстовые настройки.. Полная фигня.
Great explanation. Thank you
Glad it was helpful!