šŸ’” Smart lux dimmer - Adjust light brightness depending on light sensor value

Iā€™ve got the Tradfri Lights from ikea, you can change those values while the light is off with them.

Iā€™ve tried most Blueprints from here which can trigger on Motion and also have a Lux Sensor setting, non of them work with motion detection anymore since the latest 2023 HA Update. So iā€™m looking for blueprints which just changes the Brightness, Color/Temp Settings metioned above without affecting the on or off state of my lights. Iā€™ve just bound the motion triggers to the lights now so they get turned on and off without HA automations.

If you set the brightness percentages at maximum and minimum ambient light to the same setting, then only color or temperature should be affected.
Maybe that helps.

I can really see no use case to change the brightness, color or temperature when the light is off.

RELEASE:

05/01/2024 - Version 2.0

  • Adding back the 2.0 version of this Blueprint as itā€™s a lot more basic.
  • Users who donā€™t need more options can use this simpler version. It is easier to use and so more user-friendly.

All future development will continue from version 4.0 and on.

GET IT HERE:
VERSION 2.0 (BASIC)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

1 Like

NEW RELEASE:

07/01/2024 - Version 4.1

  • Added a transition timer to smoothen out the dimming from the current brightness setting to the next
  • General code correction for uniformity
  • Spelling corrections

Thanks for the blueprint
Would be great to be able to use sunset/sunrise with offset instead of lux sensor.
Do you think that this could be incorporated at some point?
Thanks

Thank you!

My other blueprint: The Everything light allows you to use any trigger and uses the logic of this blueprint for the Dynamic lighting mode.

Hi !
Thanks for the Blueprint, its very cool !

I see the max_brightness_value: 1000 , if i write a bigger number (1500-2000) it will work ? Or the max limit its 1000 ?

1 Like

Thank you for that Automation. It is great!!!

1 Like

Youā€™re welcome!

The max brightness value is set at 1000 lux becuase I figured there would be no need to go any higher. (I donā€™t think youā€™d need any light turned on if the ambient light value is already at 1000 lux)
Is there a specific use case youā€™re looking at?

This is amazing! Iā€™m impressed with how natural this feels, I have not paid any attention to light levels for a long time :slight_smile:

But, I have a question. I have spots where the brightness is oversized so that I normally only use around 40% of the maximum brightness. However, when I have to do some work or cleaning, I would like to increase the intensity, but then smart lux overrides.

What is the best way to be able to override smart lux for a short time?

Think something like ā€œif light intensity has been changed manually, set smart lux to pause for 30 minutes for the zone in questionā€

1 Like

Thank you!
Not particularly, I was just asking. I found the ā€œBrightness when ambient light value over max settingā€ and iā€™m using this over 1000 lux.

1 Like

There are conditions that can be set.
I actually have a similar situation, where it dims my lights dynamically in the stairwell, but when weā€™re cleaning there youā€™d want the lights to be set at 100%.
We simply have a boolean helper that we set and it prevents the blueprint from running.

1 Like

I think that use case will be very limited, so Iā€™m not modifying the blueprint for everyone.
However, should you feel the need to change it, you could just modify it yourself using the studio code server or a similar add-on.
If you change the max brightness value on line 166 that should allow you to set it to a higher value.
Donā€™t forget to refresh the automations afterwards: Developer Tools > YAML > YAML configuration reloading and click on ā€˜Automationsā€™.

1 Like

Installed it yesterday. Works great with my HUE motion sensor. Thank you for your effort

1 Like

Great to hear!

1 Like

Your template works amazing for me as well. One thing, which I think might be missing is, that the automation is triggered automatically once movement is detected. Currently it does only seem to trigger the automation once the light detection sensor is changing, therefore I trigger the automation externally if movement is detected. How do you solve that?

1 Like

Hi @headless,

Itā€™s not missing, itā€™s just not a feature of this blueprint. The goal here was to have dynamic light based on the light thatā€™s available in the environment.

If you want to use other triggers, I would encourage you to look at my other blueprint: The Everything Light - Trigger a light any way and turn it on in any way
The dynamic lighting setting in that blueprint is based on the logic from this one, but it allows you to use any trigger, including a motion sensor.

This is such a great Blueprint, thank you very much!.
For one room, Iā€™d like to use it ā€œrevertedā€ I use an outside light sensor and when it gets darker (clouds, thunderstorm, etc.), Iā€™d like to get the Lights brighter and vice versa.
I took a look at your code (I can not code by myself) and I think it is not possible to swap the values from max. and min. brightness (so max. brightness is set e.g. to 5% and min. brightness to 45%), because it will result in a negative result of your calculationā€¦
Can you help me with my requirement?

1 Like

Thanks for this blueprint.
I would like to include a feature, which adds a certain delay for the dimmer output.
For example: the light sensor (in my case direct sun light) is jumping because of fast moving clouds and the light output is correspondingly jumping. For such situations it would be great, if the dimmer output would only change in adjustable time intervalls with average values, f.e. the dimmer changes the light only after 60s with an value correspondig to the average light sensor value of the last 60s.

1 Like