After a looooong period of inactivity where I got a new job and moved to a different continent, I finally made the time to start working on Adaptive Lighting again!
I solved quite a few bugs in the last week and introduced a new feature where you can select the sleep_mode color in RGB:
Iām an avid user over 20 instances of this solution and youāve made my year with some of these updates! Thank you for stopping the errors and adding color to sleep mode!
While youāre thinking about custom color curves, can we have a way to detect/combat cloudy day syndrome?
AL works great until you have a cloudy day and then the lights are overly bright/weird CT for it being nearly dark outside. Itās not the softwareās fault because how does it know its a rainy day BUT if we had an option for an illuminance sensor to say "its the middle of the day, but the illuminance is < āxā lux, adjust AL by āxā percentage or āxā sunset hours offset to give the illusion that its adapting to cloudy day.
The illuminance sensors are already in my home for cloudy day syndrome (triggering lights based on illuminance vs time of day). It seems like we could use a similar qualifier to tweak the AL throughout the day as needed for when the conditions outside become dark and the lights inside are not 90%/6500k.
Later as the illuminance sensor detects normal light levels, the AL offset can be turned off.
Iām capable of entering a PR, just wanted to talk to you about it first
Is it possible to pass a custom sunrise to an adaptive lighting instance? Iād like to be able to do "If alarm set > make adaptive lighting sunrise at alarmtime minus 25minutes, else make adaptive sunrise at 9am.
I can see how to change the value of sunset/sunrise in the configuration, but Iād like to update it automatically according to my work schedule. (you can take my weekend lie-ins from my cold dead hands)
Itās really interesting youāve asked this.
Iāve been working with a popular blueprint to make a wake-up sunrise alarm, and have had a couple of really rude mornings with it conflicting with adaptive lighting. Waking up to a strobe light wasā¦ unpleasant.
Iāve since turned off adaptive lighting as an automation around when it would be running, but I also really dislike how the blueprint is using warm light. Adaptive lighting has a much better handle on the actual light spectrum our circadian rhythm is expecting, but is pretty bad at providing it at a set time or custom sunrise time. I attempted to jjust turn on my lights and let adaptive lighting serve a sunrise (as set in the config) but it came on at 40% brightness.
I think Iām going to ditch the blueprint and use a simple automation that turns off adaptive lighting brightness, and then increases the brightness by 1% every 5 seconds or something and just let adaptive lighting control the colour temp, since it does that really well.
This is all very off topic from why I actually came to this thread, which was for @basnijholt to add a wish list of ācould you integrate a wake-up āsunrise effectā alarmā into this component.
The other thing that would be nice is if the entity field for the config could be text-editable, as if you delete or rename an entity in there currently it bugs out and wonāt let you unselect/uncheck the entity that doesnāt exist - workaround it to delete & remake.
Edit: yeah ran into the same issue again where there seems to be an upper limit on transition effects, forgot thatās why I didnāt use it in the first place, it needs scripting to get a fluid/prolonged transition effect.
This is literally what Iām here for, too. I want to understand sleep_transition and if that can be used as a wake-up transitions for this very purpose.
Right now, I just turn off the Adaptive Lighting, and let Hue do the wake-up automation. Then, 35 mins after my alarm time, my automation re-enables Adaptive Lighting. I was wondering if there was a way to leverage sleep_mode and sleep_transition for a similar affect.
Iāve been using this all summer, but now that the winter days in the UK are much shorter, Iāve been finding that the lighting is getting too dim too quickly. Iāll be using this new feature to extend the evenings a bit. Thanks!
just want to say thanks - adaptive lighting (and its predecessors on other platforms) have been the single most effective bit of Home Automation iāve implemented.
My family have never even noticed it. I was talking to my wife about it the other day and she said she wouldnāt notice the difference, so I turned it off and showed her normal brightness for our kitchen when dark outside. She was pretty stunned.
So Iāve set it up for me and fiddling around with it and Iām encountering some issues where Iām not sure what goes wrong.
I have a philips hue color bulb in the bathroom. I set up Adaptive Lighting to handle it with the following settings. The idea is itāll stay the same cool white temperature throughout the day, and when sleep mode is turned on in the night itāll have 1% brightness and the warmest color it can.
Behind the (dumb) momentary switch to control the bathroom light is a smart relay from Fibaro relay. From what I understand, that supplies the light bulb constantly with electricity, itās just when the switch is pressed it sends a short pulse to the fibaro relay, which in turn just toggles its state (and the state of the bulb) to the other state, so off->on and on->off.
The issue I have is that sometimes when I press the switch, the Philips Hue turns on with pretty warm colors, not the 4500K I set it to in the adaptive lighting automation. After turning on warm the bulb quickly transitions to 4500K, but still not sure why itās even doing that. When sleep mode is on and I toggle the light switch, sometimes the bulb will turn and off dimmed and then suddenly start up with high brightness again, only to then quickly dim down to 1%. While I toggle it with the light switch, I can see in HA that the bulb itself stays in the on state. If I only toggle the Philips Hue light bulb in HA, that behavior doesnāt seem to happen.
Anyone know whatās happening?
Side question: just wondering how everybody else set up their adaptive lighting. Iām now at the point that sleep mode with 1% brightness will only be activated for hallway+bathroom, not the other rooms. During the day, everywhere the brightness will only go down to min. 60% otherwise it becomes to dark and strenous for the eyes
Excellent update!
I went to modify a program and found it, thought I needed glasses for a second!
Would it be hard to include both max and min sunset times? Now that Iāve got a taste I want more!
I have the opposite problem of the winter issue - very long days here in summer so sunset is currently close to 9pm, so the automation is still quite bright when we want to wind down. I had a fixed time for 1800 which works well enough though, but runs into the winter conundrum if a fixed time.
Edit: ah I just realised it would only require a bit of math to replicate this with an offset+minimum time combo
Not quite the same, but softens the transition to red light better than a static set time.
I notice the same behaviour, I assume itās turning on to the last known memory (so if last on at noon bright white with high brightness) at which point adaptive Lighting grabs it and tells it to adjust which brings it to the correct setting with a transition effect.
If the lights have been on recently the effect isnāt noticable.
I suspected itās intended behaviour, as having adaptive Lighting intercept the command before the lights come on would introduce a perceptible delay in the lights responding to input from the wall switch?
Same for me. It doesnāt seem, that it remembers the last state of brightness, because it also happens after the dimming to e.g. 1% had already be done once or more often.
Hello, I have a problem with this integration, I donāt know how to set it up. I have an RGB bulb, so I forced the RGB control. The light bulb changes color and brightness, but never to a minimum of ā0%ā and does not start from ā0%ā. No matter what I try, it will never fade. What am I doing wrong? The bulb is a GLEDOPTO 12W RGB CCT Zigbee 3.0 bulb E26 E27 Pro. Please help.
After a bit of testing I have a suspicion the lighting behaviour is related to the change from home assistant using mireds to accepting kelvin.
I wrote a simple script to turn off adaptive lighting, turn on the light setting the levels I wanted and then turned adaptive lighting back on. I activate this with my switch automation, which passes through the variables desired for that room to the script.
Using anything other than mireds caused a transition effect of turning on to the last known state before changing color to the desired color after the transition period finished.
Setting my light switch automations to call the script when sleep mode is enabled has it working well. It turns on at 1% brightness and with 500 mireds. I have one hue bulb that flashed me with white light last night, so ymmv, but Iāve used this for 2 weeks without any others misbehaving.
I attempted to extrapolate this and use maths to obtain a mired value from adaptive lighting, but ran into some errors that just werenāt worth it for me to try trouble shoot - instead I have an overly complicated script that could very very easily be optimised by someone who is better at coding than I am. It checks against the time of day and turns it on at preconfigured levels IF the lightās last_changed state is > than 3600 seconds.
Edit: actually now that I tested it while home during the day, it does seem that telling the lights to come on at a mired of 153 doesnāt avoid a transition from flashing mired 500 before transitioning to mired 153. So this might not actually be the reason for the behaviour. Regardless of color though, it definitely fixes the issue with brightness coming on at 100% and dimming down to xyz%, so Iām still happy with the work around.
Those Gledopto bulbs are RGB-CCT, so this component will work better if you donāt force RGB mode. The āCCTā means correlated color temperature, which is what Adaptive Lighting uses to set color temperature using the bulbās warm white and cool white LEDs that are present in addition to the RGB LEDs.
I have Adaptive Lighting running using those same Gledopto bulbs, and here is the integration setup that works for me:
prefer_rgb_color: FALSE
initial_transition: 5
sleep_transition: 5
Transition when applying a change to the lights: 45
interval: 90
min_brightness: 50%
max_brightness: 100%
min_color_temp: 2200
max_color_temp: 5500
sleep_brightness: 1%
sleep_rgb_or_color_temp: RGB
sleep_rgb_color: [a nice warm orange]
[sunrise and sunset settings are all defaults, no overrides]
only_once: FALSE
take_over_control: FALSE
detect_non_ha_changes: FALSE
separate_turn_on_commands: FALSE
send_split_delay: FALSE
adapt_delay: 2
These settings have worked well for me, but there is a downside: it will take the full transition time (45 seconds) for the lights to come to full brightness when turned on, and also to fully turn off when turned off. I set this long transition time because without it, I would notice each transition occurring (as a sort of perceptible āblinkā) during the day as the temperature/brightness automatically changes.
Unsure if you are still looking for an answer but I just tackled this the other day lol. I have four rooms that have dumb switches but smart bulbs and was experiencing exactly what you described. I used the following automation to achieve my desired result:
Thank you for your help. Your settings work great. I also wrote to GLEDOPTO about their bulb (GLEDOPTO 12W RGB CCT Zigbee 3.0 E26 E27 Pro). I got a vague answer confirming different brightness depending on RGB on/off mode.
This is confirmed by my observations and control of energy consumption. Itās not bad for today, Iāll do the rest of the functionality in Node-RED.
Thank you again.
Iāve just purchased a Hue Play Bar and installed the Adaptive Lighting component to use as a sunrise and sunset simulator.
Iāve set sleep_transition to 300, sleep_brightness to 1%, sleep_rgb_color_or_temp to rgb_color and sleep_rgb_color to Red.
Iāve created a script that checks the light is on and sleep mode is off, then turns sleep mode on, waits 300 seconds (for the light to transition to 1% red) and then turns the light off. This will be called manually when I go to bed.
A second script that check the light is off and sleep mode is on, turns the light on and sleep mode off. This will be called by an automation before Iām due to wake up or manually if I wake up earlier.
Is anyone else doing something similar? I guess Iāve missed some exceptions. What should I look out for? Waiting for the transition before turning the light off feels a bit clunky.
I would love to know how to enable sleep mode for all integrations with 1 simple toggle on the dashboard to force and than also auto turn on based on a time, would be fantastic.
Would also like sleep mode to turn off based on alarm time.