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.
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
I am on the next version 1.6 and I forgot to push it out. It has been tweaked a bit but If you would like each light to be able to turn OFF after X amount of time once it has been turned ON then yes. The new version will allow you to have multiple entities and you can just turn one ON or any of them ON but the time delay will be from the last one that was turned ON. 1.5 will turn them all ON and OFF together but 1.6 will give you an option to turn them ON and OFF together or turn them ON individually but they will all go OFF together. That may work for you
I will have to look at my version again to make sure it is ready to be released and then I will push it out. I try and get this done tomorrow.
I would like to be able to set the time for the timer using some control in the UI. Right now I have the timer hard coded to leave the device on for a fixed number of hours. I am using it to charge an e-bike battery and would like to be able to change the number of hours from a UI control instead of having to edit the instance of the blueprint.
I created an input_number in the UI and have a slider that spans the range of values that I’d like to use to set the number of hours that the timer is on. Is there a way to use this with this blueprint? I’m a bit of a HA newbie. I’ve done some reading and it seems I may need to use a helper and a variable plus a template, but I’m not quite sure how to do that. Can I do it without editing this blueprint and just make modifications to the automation that uses the blueprint? Any help would be much appreciated.
Not sure if this is what your are after but just brain storming.
I would have a notification that would send a message to my phone if the light is ON for X amount of time and motion is OFF. Then I would have an action button in the message were I can decide if I would like to turn the light OFF.
Start Trigger - Time Delay = X amount of time the light must be ON for.
Global Conditions = motion must be OFF.
Action buttons = set it up to turn your light/s OFF.
Set one up for each automation.
One light used in a automation - easy set up.
Two or more lights used in a automation - Use one light as the state trigger and in action turn OFF add all lights.
Maybe that will work for you.
You will have to set up a template sensor for when the light is ON for X and motion is OFF = turn ON else = OFF. Then use that as a trigger in a automation to turn lights OFF. But you may have them going OFF when you would like them ON hence the notification method above, you get to decide and it is only if someone leaves the light ON and the automation gets tricked (sequence of events leads to the light/s being ON) and the light stays ON.
Totally up to you… hope this helps… let us know how you go.
I must be asking for something out of the ordinary if it doesn’t already exist.
I have had it in node red for a while and find that an easier platform than Hass automations. But trying to tackle it here instead. Out of curiosity.
So far I have created a blueprint for this so I can cut down on setup for the various rooms. I won’t need it on the fully motion activated lights, your sensor light works perfectly there.
I won’t need it on lights that I intend to leave on for long periods. Eg lamps in some rooms or ambiance lighting. Outdoor lighting.
I do want it for main lights as now that so many are entirely automated by motion, the kids tend to just walk out and leave every light on.
Blueprint so far has an initial time period option, repeating time option. Light target to consider. Motion sensor and then an end/off scene.
I haven’t mastered how to be able to select both a light target to turn off OR an end scene to turn on yet. If I add both items to the command they both need to be populated. So for now I am just creating an end scene for each room/scenario.
Will keep at it for now. Unless you fancy a new challenge! Happy to share the code so far but wouldn’t have a clue how to maintain it properly. Be great to improve it so you could select different options for the command. Light to turn off or scene to activate. Feels like it’s basically quarter of your sensor light version. But the light or I suppose scene being activated as a list of triggers being the trigger to start it off.