adaptive-lighting: Broken in 2025.5

Home Assistant Adaptive Lighting Issue Template

Bug Reports

If you need help with using or configuring Adaptive Lighting, please open a Q&A discussion thread here instead.

Before submitting a bug report, please follow these troubleshooting steps:

Please confirm that you have completed the following steps:

Required information for bug reports:

Please include the following information in your issue.

Issues missing this information may not be addressed.

  1. Debug logs captured while the issue occurred. See here for instructions on enabling debug logging:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/adaptive_lighting/color_and_brightness.py:197
integration: Adaptive Lighting (documentation, issues)
First occurred: 6:13:41 PM (352 occurrences)
Last logged: 9:09:57 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/adaptive_lighting/switch.py", line 1157, in _async_update_at_interval_action
    await self._update_attrs_and_maybe_adapt_lights(
    ...<3 lines>...
    )
  File "/config/custom_components/adaptive_lighting/switch.py", line 1388, in _update_attrs_and_maybe_adapt_lights
    self._sun_light_settings.get_settings(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        self.sleep_mode_switch.is_on,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        transition,
        ^^^^^^^^^^^
    ),
    ^
  File "/config/custom_components/adaptive_lighting/color_and_brightness.py", line 390, in get_settings
    return self.brightness_and_color(dt, is_sleep)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/config/custom_components/adaptive_lighting/color_and_brightness.py", line 341, in brightness_and_color
    brightness_pct = self.brightness_pct(dt, is_sleep)
  File "/config/custom_components/adaptive_lighting/color_and_brightness.py", line 313, in brightness_pct
    return self._brightness_pct_tanh(dt)
           ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/config/custom_components/adaptive_lighting/color_and_brightness.py", line 254, in _brightness_pct_tanh
    event, ts_event = self.sun.closest_event(dt)
                      ~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/config/custom_components/adaptive_lighting/color_and_brightness.py", line 197, in closest_event
    raise ValueError(msg)
ValueError: No sunrise or sunset event found.

  1. Your Adaptive Lighting configuration:
Configured in gui, but all my configs have this error 
  1. (If using Zigbee2MQTT), provide your configuration files (remove all personal information before posting):
    • devices.yaml
    • groups.yaml
    • configuration.yaml ⚠️; Warning REMOVE ALL of the PERSONAL INFORMATION BELOW before posting ⚠️;
      • mqtt: server:
      • mqtt: user:
      • mqtt: password:
      • advanced: pan_id:
      • advanced: network_key:
      • anything in log_syslog if you use this
    • Brand and model number of problematic light(s)

  1. Describe the bug and how to reproduce it: AL just doesn’t function. If I try to turn on an AL switch entity, I get this error

  2. Steps to reproduce the behavior: run 2025.5 Turn on AL switch entity Error

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 18 (3 by maintainers)

Most upvoted comments

I have the following error since 2025.5

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/adaptive_lighting/switch.py:2471
integration: Adaptive Lighting (documentation, issues)
First occurred: May 18, 2025 at 22:05:47 (1338 occurrences)
Last logged: 21:57:56

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/adaptive_lighting/switch.py", line 1141, in _async_update_at_interval_action
    await self._update_attrs_and_maybe_adapt_lights(
    ...<3 lines>...
    )
  File "/config/custom_components/adaptive_lighting/switch.py", line 1454, in _update_attrs_and_maybe_adapt_lights
    and await self.manager.significant_change(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/config/custom_components/adaptive_lighting/switch.py", line 2471, in significant_change
    await self.hass.helpers.entity_component.async_update_entity(light)
          ^^^^^^^^^^^^^^^^^
AttributeError: 'HomeAssistant' object has no attribute 'helpers'

Edit: This has been fixed by upgrading to the latest version. I was still on 1.21