I want to control the brightness of my kitchen lights using the lux sensor, but sometimes I want to override the brightness manually with a button for X minutes. I could use a bypass for that, but I still want to control the on/off state using the presence sensor I have. Is there a way to do this within the blueprint, or should I make a second automation for this?
Second, might it be an idea to move the FAQ and manual to a GitHub wiki instead of this forum? Itās super difficult to find what Iām looking for in the 3k comments here.
I have an innovelli smart light switch which sometimes is in the āOnā state while the lights have been turned off manually in the HA app or through another automation.
How could I adjust the blueprint to trigger off an event (such as button press), so that even if the state doesnāt change the lights still react correctly?
I am considering whether to use this for my garage lights, I have lux sensors, presence and motion sensors grouped into appropriate helpers.
But hereās the kicker. My garage lights are on a relay that can also be turned on by a physical switch.
I want that physical switch to also be a "trigger* for turning on the lights for the specified time frame that is in the Smart sensor blueprint.
So I have that set for 2 minutes. If itās dark, and occupancy is detected, turn on the lights, keep them on for 2 minutes after occupancy is no longer detected. If the lights are turned on manually, ALSO keep on for 2 minutes or indefinitely if thereās occupancy.
unfortunately I get an error message with your blueprint:
I previously used your blueprint with IKEA motion detectors and lights via ZHA. This worked without any problems.
Now I have changed the entire installation to Zigbee2MQTT and also adapted or recreated the automations with your blueprints. Unfortunately, these no longer work and give the following error message in the log:
Logger: homeassistant.components.automation.test_sensor_blueprint
Source: components/automation/__init__. py:663
Integration: Automation (documentation, problems)
First occurred: 20:04:21 (5 occurrences)
Last logged: 20:22:49
Error rendering variables: UndefinedError: ādict objectā has no attribute āentity_idā
I have completely recreated the automations as a test with your blueprint, very simple, just a motion detector and a light; but always the same error, no matter which devices I use.
Do you have any ideas? What other information can I provide to narrow down the problem further? I have updated everything in Home Assistant to the latest versions.
I think what your asking is when the lux is above 200 then the light should not come ON with movement but when below 200 say 199 the brightness should be 100% and then when it gets to 2 lux the brightness should be 50% (looking at your sketch)
Rather than using a schedule helper use a Times of the Day Sensor. Set your times to 4-9 PM. Once you create the Times of the Day Sensor helper then create a group helper and group your Motion and Times of the Day Sensor. Then use the group helper as the trigger only.
HA will not allow you to group different domains like a motion sensor and a schedule helper so this is why we need to create the Times of the Day Sensor.
Dynamic Lighting only works for normal lights and it was designed for when light conditions would change like during the day with natural light. Night lights should have a consistent value as it is dark. Then the logic changes at night with the option of glow lights. There is a lot of logic that all has to work together in the one blueprint.
You can manually change the brightness once the lights are ON, and they should stay that way until the automation turns them OFF.
If youāre looking to press a button that temporarily changes the brightness for a set amount of time and then reverts back, you could use the Night Lights state condition. For example, when the button is pressed, it could turn ON a toggle helper for X minutes, then automatically turn it OFF.
I have other blueprints that can handle this toggle behavior, but you could also create a simple automation that turns the toggle ON and OFF when the button is pressed.
Once the toggle helper is created, add it to Night Lights as the Entity State condition, set the desired brightness in Night Lights, and make sure to enable āIf lights are ON, adjust the lights when crossing overā in the Night Light control options.
When I first started, I never expected my blueprints to grow the way they have.
Iāve added links to the FAQ⦠including references back to the main FAQ⦠but at the end of the day, it all takes time. Lately, most of my spare time is spent answering questions rather than developing new features.
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.
Thanks for reaching out and your well written bug report.
I used your YAML and just replace the entities with mine. So we have the exact same settings.
When I activate the trigger the light turns ON 100%.
I then activate night lights and the lights transition to 5%.
Then I deactivate the trigger to start the night light time delay.
During the night lights time delay I then deactivate night lights and the lights go to 100% and start the timer for normal lights.
The lights turn OFF after the normal lights delay.
Works perfect Try another test.
When I activate the trigger the light turns ON 100%.
I then activate night lights and the lights transition to 5%.
I then deactivate night lights and the lights go to 100%.
Works perfect
Sorry I canāt find the bug.
Note your using toggle helpers in Scenes & Scripts - Toggle Helper and Night Lights - Scenes & Scripts - Toggle Helper. You donāt need to use toggle helpers when using lights. This is only required when using scenes and scripts.
Not sure if you got the point - as you suggested, Iām using the night glow and night light during day/evening, but as I learnt here dynamic light is not available. So, the āflippedā logic basically works but useless finally, as there is not dynamic light. I also tried it with a combination of smart light and sensor light for motion - but there is no option in dynamic light to come back from motion light of 100% to 20% (ambient light level) - only using a scene, but also here no way to use dynamic light.Could you have one more view on the use case and your proposal? Br Darius
Hi Blacky,
since I updated to core 2025.4.2, my automations with your blueprint donāt work anymore, only the nightlights do. I use the dynamic lightning in my home office, which normally starts two lights. I can see that the automation is triggered, but it just doesnāt do anything. I then start the lamps manually, also start the automation manually and hope for brightness correction throughout the day, but that doesnāt work either. Funny thing, turning the lamps off does work, sort of. It brings them to a state that would be used while running (4500K and 90% brightness). Then I have one in my gaming area that should start the colorloop on my Hue lamp with a script. Again, I see that the automation has been started, but it does not. When I start the script manually, the lamp turns on and goes into colorloop mode. Since I have not changed anything in the automations or the lamps, I assume it is the latest update to 2025.4.2. Have you had similar experiences? Any suggestions what to do?
Kind Regards
Edit:
alias: Arbeitslicht
description: >-
Regelt das Licht im Wohnzimmer wenn ich am Arbeitsplatz sitze. Es soll immer
hell genug am Arbeitsplatz sein.
use_blueprint:
path: Blackshome/sensor-light.yaml
input:
motion_trigger:
- binary_sensor.am_arbeiten
light_switch:
entity_id:
- light.lampe_basti_arbeit
- light.wohnzimmer_decke
dynamic_lighting_lux_sensor: sensor.arbeit_presence_sensor_illuminance
include_dynamic_lighting: enable_lux_controled_brightness
dynamic_lighting_heartbeat: 0.25
dynamic_lighting_state_control: enable_state_control
dynamic_lighting_state_control_entity: binary_sensor.pc_an
include_light_control: []
dynamic_lighting_min_brightness: 0
dynamic_lighting_max_lux: 600
dynamic_lighting_min_lux: 500
end_scenes:
- scene.wohnzimmer_start
dynamic_lighting_min_colour_temp: 4500
dynamic_lighting_max_colour_temp: 4500
dynamic_lighting_step_value: 2
dynamic_lighting_dead_zone: 8
light_colour_temperature: 4500
include_light_colour_control: use_colour_temperature
dynamic_lighting_boolean: input_boolean.wohnzimmer_arbeitslicht
The binary Sensor for starting the automation (for which I donāt know how to get the YAML code):
@Blacky
I just found your Sensor Light Blueprint and the features fit exactly what I want to accomplish. I have a room with 4 Philips Hue Lights and an Aqara FP2 presence/lux sensor. I want to manage the lights based on motion, ambient light level, and adjust the lighting dynamically.
The automation is triggering correctly but my lights come on at about 5% brightess with a very low color temp. regardless of the settings in the blueprint. I have tried the using the light control settings to bring the lights up in brightness and I have tried the dynamic lighting settings with several different configurations. But, to no avail, no matter the settings my lights come on at about 5% brightess with a very low color temp.
Iāve been reading through the documentation but havenāt found the answer yet. If Iāve missed something and you can point me in the right direction that would be greatly appreciated!