šŸ’” Sensor Light - Motion Sensor - Door Sensor - Sun Elevation - LUX Value - Scenes - Time - Light Control - Device Tracker - Night Lights

I worked to configure this blueprint yesterday but when I had saved it, my Energy Dashboard stopped working correctly. The Electricity Usage and Solar Production graphs no longer worked although all the source information was maintained correctly.

Has anyone else encountered this?

A restore from backup fixed the Energy dashboard but now I am not sure whether to try again with the Sensor Light blueprint.

@DariusM73

Sorry I just getting confused on what your trying to do. In any event Dynamic lighting only works for normal lights. If your using a sun elevation option it will only work when it is above -10 as below -10 it should be dark already.

Blacky :grinning:

@BastiKA84

I am on 2025.4.2 and tested it (your YAML)… all works perfectly.

You have a few things.

  1. Night lights are not enabled and there is nothing there (all default settings).
  2. You have a scene in Scenes - Scripts To Turn OFF and it looks like it may turn on your Living Room Lights. So when the automation finishes it will do this. Is this what your after?
  3. Your using option 1 in dynamic lighting so when the lux value goes above 600 your light will turn OFF as your brightness level is 0%.
  4. Your using Dynamic Lighting - State Control Activation State so when your binary_sensor.pc_an is ON dynamic lighting will be activated. When it is OFF it will be deactivated.
  5. Because you not selected Use Brightness in Light Control if your light is OFF (because of dynamic lighting) and you turn OFF your binary_sensor.pc_an the light will stay OFF.

You will need to go through your settings and make sure it is doing what your after.

Blacky :grinning:

@Tom_G_2010

I’m not sure of your exact settings, but try this:

  1. Disable Dynamic Lighting first.
  2. Then, use the Light Control options to set your lights to turn on at 100%.
  3. Trigger the automation… your lights should now follow the Light Control settings directly.

This helps isolate the behavior by removing any influence from Dynamic Lighting, so you can confirm the lights respond correctly to basic settings.

Once you’re confident the lights are turning on as expected (e.g., at 100%), re-enable Dynamic Lighting and start experimenting with its settings.

In the Dynamic Lighting section, there’s a link:
For more information on dynamic lighting settings Click Here

That link takes you to the FAQ on the forum, where you’ll find helpful graphs and more details. Be sure to expand the relevant section to see everything, as shown in the example below.

Hope this helps!
If you’re still having trouble, feel free to share the YAML settings of the automation you’re working on… I’ll be happy to take a look and help you troubleshoot it further.

Blacky :grinning:

@mark20

The blueprint has nothing to do with… and should not affect… your Energy Dashboard. My own Energy Dashboard is working perfectly.

This blueprint simply turns lights, switches, scenes, or scripts ON and OFF based on your settings… it’s just an automation (a blueprint), nothing more.

Blacky :grinning:

Hi Blacky,

  1. the night lights working so far. And it wasn’t night, the automation was turned off.

  2. As for the scene to turn off the lights, you can see, that the lamp is turned off in the scene.

  3. with the lights cranked to 100% and a bright image from my monitor, I usually have 520 to 550 lux. I have learned that you should have at least 500 lux in your working space, when working with a computer. So thats why I have this range minimum 500 to 600 lux.

  4. Thats correct and the way I want it. I don’t need the lights being on, when I am not working on the computer.

  5. That is also correct. I want the lights to stay off or turn off if the computer is also off.

But right now I started my gaming PC. And both automations for working and gaming lights started, with the working lights being the one handeling the lights.
I checked if my binary sensor for working was activeted but it says it was active last time two days ago:

But the automation started:

The binary sensor for gaming was active:

Or right know. I restartet my gaming PC. In HA I can see, that the automation was triggered:

But the light did not turn on. So I checked the script to start the colorloop. It was not activeted with the automation:

If I activate the script manually, the light turn on and goes into colorloop.

So maybe something isn’t right with the toggle helper?


I created that one through your blueprint.

I lokked at the code, and see, that there is a ā€œend_sceneā€ which I can’t even remember to put into the automation. I can also not find it anywhere in the automation in GUI style. But the end_scene I actually put in through the GUI is not mentioned in the code.

alias: Gaming Licht PC
description: ""
use_blueprint:
  path: Blackshome/sensor-light.yaml
  input:
    motion_trigger:
      - binary_sensor.gaming_pc_an
    light_switch:
      entity_id: script.colorloop_hue_arbeitsplatz
    boolean_scenes_scripts: input_boolean.hue_starten
    end_scenes:
      - scene.wohnzimmer_start
    time_delay: 3

I have tried putting in another scene, saving it, put back my actual wanted scene, saving it, but the code did not change. This is in both automations. I know, I started with that scene in ā€œArbeitslichtā€, but I switched to the other scene, as I got a knew lamp and found it more convinient to just delete the old scene, create a new one, and put it into the automations.
Can I just erase the line and then put back my end_scene?

@BastiKA84

I have gone through DL and I have found some bugs with the DL state control, Setting 0% and DL Toggle Helper. I have spent about 8 hours on it so far and I am just cleaning it all up for a new release.

Once it is release try it out and see if I have fixed it.

Blacky :grinning:

1 Like

Thanks!

After several rounds of testing I found the issue. I was able to get several other lights to work properly but not my living room lights. Then the light dawned over marble head here. Some time back I tested an adaptive lighting integration and those lights were being controlled by it.

The adaptive lighting integration works well by itself. And your Blueprint works well on its own. But even with the Dynamic lighting disabled in the Blueprint when the integration and blueprint are both attempting to control the same light they don’t play nice together.

I do want to see if I can get them to play nice together. Even with the motion control I will be using manual switches about 20% of the time and I like the affect that the other adaptive lighting integration provides in that instance.

Again, Thanks!
Tom G.

@Tom_G_2010

Nice one glad you found the problem. If you going to use Dynamic Lighting I am releasing an update soon that fixes a few bugs in it. Make sure you keep an eye out for it so you can update it.

Blacky :grinning:

1 Like

I have a similar problem, although I don’t use code red. This was my favorite automation before I had to bare metal my system with corrupted backups. Now I can’t seem to make it work. I know my FP2 presence sensor is working, I wrote a basic automation to test it. I’ve tried with a group for all the zones on the FP2, same result. I’m not fully sure how to check the variables you mentioned.

living_room_motion_sensors_lux_lighting] Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'

2025-04-19 09:00:24.701 ERROR (MainThread) [homeassistant.components.automation.cave_motion_sensor_lux_lighting] Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'

2025-04-19 09:00:24.715 ERROR (MainThread) [homeassistant.components.automation.living_room_sensor_light] Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'

2025-04-19 09:00:24.727 ERROR (MainThread) [homeassistant.components.automation.cave_sensor_light_automation] Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'

2025-04-19 09:00:27.341 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'spook' accessed lovelace_data['dashboards'] instead of lovelace_data.dashboards at custom_components/spook/ectoplasms/lovelace/repairs/unknown_entity_references.py, line 45: self._dashboards = self.hass.data["lovelace"]["dashboards"]. This will stop working in Home Assistant 2026.2, please create a bug report at https://github.com/frenck/spook/issues

2025-04-19 09:01:02.056 ERROR (MainThread) [homeassistant.components.automation.cave_motion_sensor_lux_lighting] Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'

2025-04-19 09:01:02.062 ERROR (MainThread) [homeassistant.components.automation.cave_sensor_light_automation] Error rendering variables: UndefinedError: 'dict object' has no attribute 'entity_id'

@EdKennedyWV

Looks like you using devices in Lights - Switches - Scenes - Scripts. You must use entities. Click here to the FAQ

If your using entities please provide 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.

Blacky :grinning:

Indeed I was, there and in night lights. I won’t be able to test it until night time, but thank you!

1 Like

@Blacky Dornauer I will test it :slightly_smiling_face::+1:
Regarding my other question with the ā€œend_sceneā€: Can I just delete the line, and how much do I need to delete?

New update 8.1

Your lighting experience, your way – take control and customize it to perfection! :bulb::sparkles:

:bug: Bug Fixes - Dynamic Lighting

  • Toggle Helper: - Fixed various bugs in the Dynamic Lighting Toggle Helper to ensure correct toggling of the ON and OFF state.
  • State Control: - Resolved issues in Dynamic Lighting state control handling.
  • 0% Min Brightness Value: - Addressed bugs where setting the Dynamic Lighting min brightness value set to 0% caused the light to turn OFF, and then when transitioning to night lights, the light would remain OFF instead of transitioning properly.
  • Global Conditions Triggering: - Fixed issues related to automation triggers where the light was OFF if 0% was set as a Min Brightness Value, preventing triggers from accruing properly.

:toolbox: Maintenance

  • Updated bypass descriptions to be clearer on the function of each input based on general feedback.
  • Cleaned up some code that could potentially cause an error log.

If you like this blueprint? Consider hitting the :heart: button in the top post :+1:

If you like my blueprints, and would like to show your support or just say thank you? Click Here :smiling_face_with_three_hearts:

Enjoy

Blacky :grinning:

3 Likes

Would it be possible to consider an option to mask this? I don’t need to see that in the HA logs.

Hi there

Been using this blueprint for a while but now Ring complains about it:

I filtered the entities for events and Ring now uses

Name                     Entity ID    [....]
Front Door Ding     event.front_door_ding
Front Door Motion  event.front_door_motion

Is it possible to update the blueprint so the Ring events can also be selected instead of sensor_binary?

Really loving the possibilities of this Blueprint!
I’m having a problem with adding the Bypass Switches. I want to use the RODRET switches from IKEA, but I don’t really understand how I can use them as an entity. I’ve tried creating a helper as an input_boolean with automations, or with the Binary Sensor Template, but none of them seem to work… Could you help me?

Understood. One follow-up question. When controlling multiple lights, if one of the lights is unavailable (unplugged, no wifi, etc) the automation fails to turn any of the other lights on.

Is there a way to have it ignore any lights that are non-responsive and continue controlling the remaining lights?

@Unopened9072

The trigger must have both ON and OFF states. If you’re using an event (such as motion from a Ring doorbell), consider creating a template binary sensor.

Blacky :grinning:

@Klaasvdb

Welcome to the community.

I don’t use them. You first need to see the state they provide. You can see this in developer tools > states tab > then find your RODRET switch. When you press it see what state they provide and from there you and decide what is the best way to handel them.

Blacky :grinning: