The Everything Light: select any trigger and turn on your light in any way.
Turn on a light at the push of a button
Turn on your stairwell lights when motion is detected and then turn them off again after a set time
Turn your living room lights to a warm color at 20% when your TV turns on?
…
This and much more is possible with this Blueprint.
How it works:
Select any trigger.
Select any condition.
Choose the lights you want to control (switch entities are supported, but due to their nature they only support the DEFAULT and TOGGLE modes.)
Choose the mode the light should use to turn on:
DEFAULT MODE: The light will turn on at its default setting.
FIXED BRIGHTNESS MODE: The light will turn on at a set brightness percentage, optionally color or temperature can be set.
DYNAMIC MODE: The light will be assigned a brightness value based on the value of a ambient light sensor, optionally color or temperature can be set.
Choose if the light needs to turn off again or not. There are 3 possiblities for this (multiple options can be activated at once).
TURN OFF WITH TRIGGER: Select triggers that turn off the light.
TURN OFF AT TIME: Turn the light off at a set time.
STAIRCASE FUNCTION: Waits after the light has been turned on and then turns it back off after the set duration.
Amended syntax to new guidelines (HA 2024.8 & 2024.10 changes)
Open to see older changes.
23/01/2024 - Version 2.5
Corrected logic in the turn off functions where the triggers where activated regardless of the required conditions in some cases.
21/10/2024 - Version 2.4
BREAKING: removed the ‘turn of at time’ configuration. This option was redundant as it can also be set through the ‘turn off with trigger’ configuration.
Re-activated the option to use the staircase function and the turn off triggers simultaneously.
Fixed the turn off conditions (yes, again…)
General lay-out corrections to improve user friendliness and legibility.
21/01/2024 - Version 2.3
Fixed the turn off conditions. They are no longer ignored.
Only 1 turn off option is possible while I’m working to fix interoperability of multiple options.
10/01/2024 - Version 2.2
Added support for switch entities (Only DEFAULT & TOGGLE modes are supported due to the nature of this entity type)
Added a new TOGGLE mode, allowing users to toggle light and switch entities with a simple setup instead of using the turn off triggers.
Adjusted and corrected descriptions to make the blueprint more user-friendly
Correcting some spelling errors
09/01/2024 - Version 2.1
Corrected a bug where the automation would not run unless an optional light sensor was selected.
Removed the ‘don’t turn the lights off’ option since it was redundant and could cause an error.
Changed the order of the turn off selectors to make them more user-friendly (Thanks @freddeh for the feedback).
Modified selector descriptors to make the automation more user friendly.
Modified the automation description for better legibility.
Moved some default values around for better consistence in the code base.
Slight modifications to templates for consistency and legibility.
02/01/2024 - Version 2.0:
Added a way to turn off the light in 3 ways:
- at a set time
- with 1 or more triggers
- with a staircase function (turn off the light after a set time has passed)
Changed the operating mode to allow the turn off functions to work correctly
Modified descriptions and layout for better usability
General code corrections
31/12/2023 - Version 1.3:
Change the mode to restart (BREAKING, reload the blueprint!)
31/12/2023 - Version 1.2:
Added switch entity types to the target light selector
Corrected code with regards to color temperature setting
30/12/2023 - Version 1.1:
Bugfix in the dynamic lighting algorithm
General editing and text modifications to make it more user friendly
Just tried it, all looks good, but the blueprint is not able to find any of my devices, with the exception of two of them (?). Other similar light blueprints can see all of them.
I guess you’re referring to the light target selection field .
I’ve added the possibility to select switch entity types in addition to the light entity types now. Could you test again?
Either post a screenshot or
Configure your automation, then on the top right, click the 3 dots and select ‘edit in Yaml’. Then paste that code here. (please select the ‘preformatted text’ option in the reply menu (it’s under the cog icon).
This error appears when I use the IKEA sensors. Had no problem with them the last two days. When I use the Hue sensor I don’t get this message, but no lights turn on either.
EDIT: Also tried this automation with my Google Nest Doorbell, no action either.
Oh, and I would strongly advise you to change your entity ID’s to something more legible like: binary_sensor.mijn_bewegingssensor.
This will greatly help you with your automations in the future.
Added a way to turn off the light in 3 ways:
- at a set time
- with 1 or more triggers
- with a staircase function (turn off the light after a set time has passed)
Changed the operating mode to allow the turn off functions to work correctly
Modified descriptions and layout for better usability
Firstly - thanks for pulling this together, it was really straight forward to follow the instructions (I think!)
I’m having an issue though, I can see the triggers I set being triggered when I flip my switch (it says triggered in the trigger setup window), however the devices I’m wanting to control aren’t reacting?! They’re all hue/zigbee lights.
When I look at the automation it say’s it has never been triggered.
The trace timeline says
Stopped because of unknown reason "null" at January 3, 2024 at 8:52:37 AM (runtime: 0.00 seconds)
Not sure what other information I can provide that would be helpful, but yeah - nothing happening for me!
I had a similar issue during testing: I had changed my light sensor entity name so it wasn’t correctly setup.
Can you double check that alle entity names in your automation configuration are correct?
As a newbie to this blueprint it is a bit confusing to have first Tiggers and then Conditions in the top section and in DYNAMIC mode you have first Turn Off Conditions and then down below Turn Off Triggers… took me a few minutes to figure that out. Might be a minor improvement to just switch the order around in the bottom.
Edit: looks like the Turn Off Conditions are not checked at all in DYNAMIC mode when the trigger is reached, is that true?