Thanks! Yes it would be cool to have the granularity on the lux timing as I quite like having the Time Delay as low as possible so the lights are on as little as possible if everyone leaves the room.
That said if you add much more complexity to this blueprint itâll become Turing-complete
Is there a way to use a helper entity to set what scene is activated by the blueprint?
I have a couple of lighting scenes in my office depending on whether Iâm working, gaming etc, but thereâs no set times or days when I might be doing any given thing.
Iâm wondering if I can get the blueprint to reference a helper entity to decide which scene it activates on motion. Then I can set the helper entity based on various other factors.
Iâm interested in this too as I want to have different scenes for outside lighting for certain days of the year. So most of the year it would use scene.front_motion_normal but around Halloween it would use scene.front_motion_halloween scene (this is just one of a number of occasion related scenes).
Iâd go further and say Iâd also like the ability to change the âidleâ turn off scene too to allow me to have ambient lighting when motion isnât detected but only between certain times. So I could have an automation set the scene helper to scene.front_lightsoff_normal or scene.front_ambient_normal depending on the time of day but then on Halloween I may wish to use scene.front_ambient_halloween instead.
I had considered having automations adjusting the content of the scenes rather than switching between scenes but this feels really kludgy.
Yes, as long as you are on Version 4.3 and above. The blueprint has 2 different light settings. I call them âLightâ or âNormal Lightsâ and âNight Lightsâ. Just because they are called âNight Lightâ doesnât mean we have to use them for night time. They could be used for your âgamingâ. So you could have ânormal lightsâ for âworkingâ and then use the âNight Lights Conditionsâ + âEnable entity state option (your helper)â for gaming and select a different scene for your gaming ( = night lights in the blueprint). If you would like more than 2 different light selections then you would need to have 2 + automations and use the by-pass and make sure the helper also toggles the by-passes ON and OFF so you will switch (disable / enable) the automations to your requirements.
This would be very similar to the my post above but your helper for night lights would be triggered on a calendar event.
I will put this on the list of suggestions.
Having 2 set of lights âNormal Lightsâ and âNight Lightsâ with all the different options is a lot of code. On the areas we need more than 2 set of lights I suggest to have 2 different automations. You can set âThe Time Optionsâ for this or you can use the by-pass.
Thanks @Blacky - great ideas to go with your great blueprint. Iâm always amazed at how responsive and engaged you are. A real shining light in the community.
I already use night mode as well atop for it original purpose, also there are about 4-5 different occasions during the year where I want themed lighting.
However Iâve had a eureka moment after slept on it and thinking about your comments regarding minimising complexity within the blueprint (which I think is absolutely the right call),. What if the blueprint allowed scripts to be selected as well in places where it currently allows scenes to be specified?
If a scene is specified it would be activated as usual, whereas if a script is specified, the script would be invoked. Any complexity about selecting scenes could be handled as user serviceable elements in the âroll your ownâ scripts.
Really nice blueprint, thank you for the work and time.
I made my own automation like this with the addition to loop while water is consumed.
This is so the light donât turn off when showering.
Just passing the thought if someoneâs looking to expand the blueprint
Code I used:
Are these themes for things like Xmas, Halloween etc were you would like a timed schedule? Example Xmas = Between 1st Dec to 26 Dec you would like the lights to be ON from 6pm to 11:30pm with Xmas theme.
I am working on something at the moment, it is not scripts but you may like it. It is realy for the HA enthusiast.
Unfortunately the newly created group sensor cause the same error. So I decided to delete automation and blueprint and reimport blueprint again. Then restarted HA. But this does not work ether.
Iâve got the same error again and again
Logger: homeassistant.components.automation.hallway_light_on_presence
Source: components/automation/__init__.py:608
Integration: Automation (documentation, issues)
First occurred: 10:38:29 (1 occurrences)
Last logged: 10:38:29
Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'
All newly created automations with this blueprint cause the same error. Even with a simple motion sensor added. Thatâs very strange behaviour, because all earlier added automations was working.
Could you please provide us your YAML of the automation? This YAML code are the settings you have selected in the automation so I can help. To do this go into your automation, top right 3 dots, Edit in YAML, copy all the code, come back to the forum and in your reply at the top tool bar click on â</>â and paste code in there.
Yes, thatâs exactly it. Youâve really peaked my interest with the thing that youâre currently working on. Canât wait to hear more.
As an aside, I used to have a lighting automation which took a theme name from a helper as well as text helpers for base names of âambientâ, âmotionâ and âidleâ scenes. If the theme helper was blank - scenes were triggered whose names were in the text helpers. If the theme helper wasnât blank, the scene names was derived as follows _ - if this scene existed it would be activated, if it didnât exist just the base scene name would be used.
E.g.
Base scenes:
Idle: scene.porch_off
Ambient: scene.porch_ambient
Motion: scene.porch_motion
At halloween, the theme helper may contain âhalloweenâ. In addition to the normal scenes, I also had scene.porch_motion_halloween defined. In the evening when it got dark, the usual scene.porch_ambient was activated to give warm low-level light (as thereâs no theme variant of the scene defined). When motion was detected, scene.porch_motion_halloween was activated to turn all the lights green.
At Christmas, the theme helper may contain âchristmasâ. In this instance I have only defined an override scene scene.porch_ambient_christmas to give nice christmassy illumination when not triggered but then activates the normal scene.porch_motion when motion was detected.
I had different lighting automations for different areas of the house which all reacted to the house theme and by selectively creating scenes with the appropriate names I could define overrides or not as needed for each area.
I have stair lights that I turn on very low at night, and then a motion sensor that raises the brightness when it detects motion, dimming it back to the low level after a certain amount of time. Is there a way to have the âoffâ state instead be different to enable this use case?