Comments (11)
I believe the reason it's setting it to 1% is because it believe you're stuck in sleep mode, even if it's not night. There is a sleep mode switch. I'd confirm this is set to off.
from adaptive-lighting.
I have the same issue since today without doing any updates.
I only have the issue if I set a min sunset
time or a max sunset time
other than None
.
Setting min
and max
sunset times to None
is a workaround for me for now.
from adaptive-lighting.
[Copy pasting this message in a few recent open issues]
I just wanted to take a moment to express my heartfelt thanks to everyone that is active in this repo. Your contributions, from answering questions to addressing issues, have been invaluable. It's amazing to see how supportive and helpful our community is!
Adaptive Lighting is all about enhancing your living spaces with smart, sunlight-responsive lighting. We've had quite a few discussions and open issues recently, and I see this as a positive sign of our community's engagement and growth. If you come across anything in the documentation that's unclear or if you have suggestions for improvement, please don't hesitate to share!. Your feedback is crucial for making Adaptive Lighting better for everyone.
On a personal note, I've recently welcomed twin boys into my family, which has been an incredible and life-changing experience. As you can imagine, my time is now more limited, and while I'm doing my best to keep up with the project, there may be delays in my responses. I appreciate your understanding and patience during this time.
Rest assured, I'm fully committed to addressing any bugs, especially those related to new Home Assistant updates, as swiftly as possible. I understand that many issues may stem from hardware limitations or misunderstandings about things like Zigbee groups. Your continued support and collaboration in helping each other out not only strengthen our community but also enhance the Adaptive Lighting experience for all.
Thank you once again for your understanding, patience, and support. Let's keep our houses well lit and adaptive for maximal enjoyment of life! 🌞🏠🌙
from adaptive-lighting.
Okay with some additional logging I was able to identify the exact conditions on my system that causes the issue.
For the bug to happen I need to set min_sunset to the right range of value, currently in my area if I set it to 20:30:00 it causes the issue and the light becomes dark just after sunset.
Modified code generating the logs:
def noon_and_midnight(
self,
dt: datetime.datetime,
sunset: datetime.datetime | None = None,
sunrise: datetime.datetime | None = None,
) -> tuple[datetime.datetime, datetime.datetime]:
"""Return the (adjusted) noon and midnight times for the given datetime."""
if (
self.sunrise_time is None
and self.sunset_time is None
and self.min_sunrise_time is None
and self.max_sunrise_time is None
and self.min_sunset_time is None
and self.max_sunset_time is None
):
solar_noon = self.astral_location.noon(dt, local=False)
solar_midnight = self.astral_location.midnight(dt, local=False)
_LOGGER.error("BBB " + str(solar_noon) + " ////// " + str(solar_midnight))
return solar_noon, solar_midnight
if sunset is None:
sunset = self.sunset(dt)
if sunrise is None:
sunrise = self.sunrise(dt)
middle = abs(sunset - sunrise) / 2
if sunset > sunrise:
noon = sunrise + middle
midnight = noon + timedelta(hours=12) * (1 if midnight.hour < 12 else -1)
else:
midnight = sunset + sunset
noon = midnight + timedelta(hours=12) * (1 if midnight.hour < 12 else -1)
_LOGGER.error("AAA " + str(noon) + " ////// " + str(midnight) + " ------- " + str(sunset) + " /////// " + str(sunrise) + " //// " + str(middle))
return noon, midnight
The logs when the light is dark:
2024-04-03 22:31:28.078 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Kitchen: execute_cancellable_adaptation_calls with data: AdaptationData(entity_id=light.strip_kitchen_fridge, context_id=01HTJTHM8J:al:JNUX:ntrv:02, sleep_time=10.0, force=False, max_length=1, which=both, initial_sleep=False)
2024-04-03 22:31:28.079 ERROR (MainThread) [custom_components.adaptive_lighting.color_and_brightness] AAA 2024-04-02 12:01:44.656321+00:00 ////// 2024-04-02 00:01:44.656321+00:00 ------- 2024-04-02 18:30:00+00:00 /////// 2024-04-02 05:33:29.312643+00:00 //// 6:28:15.343678
2024-04-03 22:31:28.082 ERROR (MainThread) [custom_components.adaptive_lighting.color_and_brightness] AAA 2024-04-03 12:00:51.517689+00:00 ////// 2024-04-03 00:00:51.517689+00:00 ------- 2024-04-03 18:30:00+00:00 /////// 2024-04-03 05:31:43.035377+00:00 //// 6:29:08.482312
2024-04-03 22:31:28.084 ERROR (MainThread) [custom_components.adaptive_lighting.color_and_brightness] AAA 2024-04-04 11:59:58.549727+00:00 ////// 2024-04-04 23:59:58.549727+00:00 ------- 2024-04-04 18:30:00+00:00 /////// 2024-04-04 05:29:57.099455+00:00 //// 6:30:01.450272
2024-04-03 22:31:28.086 ERROR (MainThread) [custom_components.adaptive_lighting.color_and_brightness] AAA 2024-04-02 12:01:44.656321+00:00 ////// 2024-04-02 00:01:44.656321+00:00 ------- 2024-04-02 18:30:00+00:00 /////// 2024-04-02 05:33:29.312643+00:00 //// 6:28:15.343678
2024-04-03 22:31:28.088 ERROR (MainThread) [custom_components.adaptive_lighting.color_and_brightness] AAA 2024-04-03 12:00:51.517689+00:00 ////// 2024-04-03 00:00:51.517689+00:00 ------- 2024-04-03 18:30:00+00:00 /////// 2024-04-03 05:31:43.035377+00:00 //// 6:29:08.482312
2024-04-03 22:31:28.090 ERROR (MainThread) [custom_components.adaptive_lighting.color_and_brightness] AAA 2024-04-04 11:59:58.549727+00:00 ////// 2024-04-04 23:59:58.549727+00:00 ------- 2024-04-04 18:30:00+00:00 /////// 2024-04-04 05:29:57.099455+00:00 //// 6:30:01.450272
Notice how the computation for the last sunset is just shy of 48h after the sunset of the day before.
To fix the issue in my HA I changed (1 if midnight.hour < 12 else -1)
to just -1
. This is probably not a proper fix (this code probably fixed another corner case?) but the fact that it works with it confirms the source of the issue.
from adaptive-lighting.
More info
I have been using Adaptive Lighting for about 4 months and up to now it has worked great. I even worked with the comunity ot get parameters added.
I am using
Home Assistant Operating System 11.4
HA 2024.1.3
Adaptive Lighting 1.20.0
I am getting an error when I go at the top of the HACKS page.
Not sure exactly when this happened. Think it was a couple of days ago. I have kept things up to date but dont think it was one of these updates that caused the problem, but guess it probably was.
Basically all the lights are set to their lowest all the time. Running the date command in ther terminal indicates the date and timezone are correct.
from adaptive-lighting.
Also experiencing that. Used to work before.
Also mentioned in this issue:
#893
from adaptive-lighting.
Will check but it seems to only be a problem with zigbee bulbs.
from adaptive-lighting.
I should have looked for this thread last week when the problem started :D.
Fiddling with the settings, only altering the integration's sleep mode brightness would address the issue. @WatsCo's suggestion to simply toggle sleep mode was on point! Though I'm not sure why it was enabled, assuming this controls whether the lights are currently in sleep mode (and not the sleep mode feature altogether) it's not clear to me how it got turned on in the first place. Or why it wouldn't have reset at sunrise anyhow.
I have automation that turns on/off the light and more importantly changes the lights colors during the day, so I'll report back if those trip sleep mode again. It's very possible there's an interaction here.
from adaptive-lighting.
When I turn off sleep_brightness and Update it does not turn it off. When I go back in it is still checked. I have tried several times with different Inntergration Entries.
The odd thing is I have 2 entries and one works and one does not. I have double checked they are the same. You can not turn off sleep mode on either, they are the same (except the lights) and one works and the other does not.
Has anyone tried trying previous versions? Feels if this does not fix it the problem is related to code outside AL.
from adaptive-lighting.
Relating to the above the one that worked was a new Integration Entry I created to troubleshoot the problem. The original one and the new one are both identical, and sleep mode can not be turned off for either but the old one has the problem and the new one does not.
Where are the config files can I look to see if there is something there that is not reflected in the UI?
So the workaround seems to be to create new entries and move lights over.
from adaptive-lighting.
Could it be that your light doesn't correctly define min and max brightness, like:
min_color_temp_kelvin: 2202
max_color_temp_kelvin: 4000
as can be seen in homeassistant.local/developer-tools/state:
![image](https://private-user-images.githubusercontent.com/6897215/309575088-d32a05ee-d52e-4a30-9f13-13c5f93b0399.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg2OTA4NzEsIm5iZiI6MTcxODY5MDU3MSwicGF0aCI6Ii82ODk3MjE1LzMwOTU3NTA4OC1kMzJhMDVlZS1kNTJlLTRhMzAtOWYxMy0xM2M1ZjkzYjAzOTkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MThUMDYwMjUxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmNiMDBlOGM3YTQzN2YxZGFkMmRhNGE1ODZjNDAwZThhZTUxYmVjMjdiZTc2MTkxMGI5YTYyYzVlN2QyYWZlMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.vDuveE4oLfa_eeH8D_2AqZxXSgLPVg323aac5DnaxU4)
from adaptive-lighting.
Related Issues (20)
- Changed group members not adjusted by adaptive lighting HOT 3
- Light entities created by `Change device type of a switch` are not in the list of light entities to pick from HOT 2
- [Feature Request] Similar brightness graph as color temp graph
- Sleep Mode Doesn't Support RGBW
- Possible race condition in 1.22.0 HOT 2
- Monitor events in addition to interception HOT 1
- Meross MSL100 Dimmable Light Not Appearing
- Unresponsive light with adaptative lightning HOT 1
- Lights not being continuously updated/adapted HOT 4
- Adaptive lighting configuration using YAML broken in 1.21.0 HOT 1
- Problems with zigbee2mqtt 1.34.0 and above HOT 4
- Apply "Prefer RGB" reverts after a minute or so HOT 3
- Adaptive lighting does not adjust brightness of Lightener group correctly HOT 9
- Manage request for full brightness by double press switch on/off
- Deprecation warning in 2024.5.0b1 HOT 1
- Light stuck / not adapting HOT 5
- Integration fails to load if sleep/brightness/color switch is disabled
- Feature Request: Cap color temp
- Sun Events Order Error HOT 2
- Zigbee2mqtt to fast for adapt HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adaptive-lighting.