Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration adaptive_lighting #1058

Open
9dnsb opened this issue Oct 22, 2024 · 1 comment

Comments

@9dnsb
Copy link

9dnsb commented Oct 22, 2024

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:

2024-10-22 09:44:04.998 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration adaptive_lighting with title: kitchen phillips and entry_id: 01JAQM9X1E76NVP3QT4HBRXVAA, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
Stack (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2223, in async_forward_entry_setup
_report_non_awaited_platform_forwards(entry, "async_forward_entry_setup")
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1192, in _report_non_awaited_platform_forwards
report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 155, in report
_LOGGER.warning(msg, stack_info=True)

  1. Your Adaptive Lighting configuration:
Variable name | Description | Default | Type

interval | Frequency to adapt the lights, in seconds. 🔄 | 90 | int > 0
transition | Duration of transition when lights change, in seconds. 🕑 | 1| float 0-6553
initial_transition | Duration of the first transition when lights turn from off to on in seconds. ⏲️ | 1 | float 0-6553
min_brightness | Minimum brightness percentage. 💡 | 1 | int 1-100
max_brightness | Maximum brightness percentage. 💡 | 100 | int 1-100
min_color_temp | Warmest color temperature in Kelvin. 🔥 | 2000 | int 1000-10000
max_color_temp | Coldest color temperature in Kelvin. ❄️ | 5500 | int 1000-10000
prefer_rgb_color | Whether to prefer RGB color adjustment over light color temperature when possible. 🌈 | False | bool
sleep_brightness | Brightness percentage of lights in sleep mode. 😴 | 1 | int 1-100
sleep_rgb_or_color_temp | Use either "rgb_color" or "color_temp" in sleep mode. 🌙 | color_temp | one of ['color_temp', 'rgb_color']
sleep_color_temp | Color temperature in sleep mode (used when sleep_rgb_or_color_temp is color_temp) in Kelvin. 😴 | 1000 | int 1000-10000
sleep_rgb_color | RGB color in sleep mode (used when sleep_rgb_or_color_temp is "rgb_color"). 🌈 | [255, 56, 0] | RGB color
sleep_transition | Duration of transition when "sleep mode" is toggled in seconds. 😴 | 1 | float 0-6553
transition_until_sleep | When enabled, Adaptive Lighting will treat sleep settings as the minimum, transitioning to these values after sunset. 🌙 | False | bool
sunrise_time | Set a fixed time (HH:MM:SS) for sunrise. 🌅 | None | str
min_sunrise_time | Set the earliest virtual sunrise time (HH:MM:SS), allowing for later sunrises. 🌅 | None | str
max_sunrise_time | Set the latest virtual sunrise time (HH:MM:SS), allowing for earlier sunrises. 🌅 | None | str
sunrise_offset | Adjust sunrise time with a positive or negative offset in seconds. ⏰ | 0 | int
sunset_time | Set a fixed time (HH:MM:SS) for sunset. 🌇 | None | str
min_sunset_time | Set the earliest virtual sunset time (HH:MM:SS), allowing for later sunsets. 🌇 | None | str
max_sunset_time | Set the latest virtual sunset time (HH:MM:SS), allowing for earlier sunsets. 🌇 | None | str
sunset_offset | Adjust sunset time with a positive or negative offset in seconds. ⏰ | 0 | int
brightness_mode | Brightness mode to use. Possible values are default, linear, and tanh (uses brightness_mode_time_dark and brightness_mode_time_light). 📈 | default | one of ['default', 'linear', 'tanh']
brightness_mode_time_dark | (Ignored if brightness_mode='default') The duration in seconds to ramp up/down the brightness before/after sunrise/sunset. 📈📉 | 900 | int
brightness_mode_time_light | (Ignored if brightness_mode='default') The duration in seconds to ramp up/down the brightness after/before sunrise/sunset. 📈📉. | 3600 | int
take_over_control | Disable Adaptive Lighting if another source calls light.turn_on while lights are on and being adapted. Note that this calls homeassistant.update_entity every interval! 🔒 | True | bool
detect_non_ha_changes | Detects and halts adaptations for non-light.turn_on state changes. Needs take_over_control enabled. 🕵️ Caution: ⚠️ Some lights might falsely indicate an 'on' state, which could result in lights turning on unexpectedly. Disable this feature if you encounter such issues. | True | bool
autoreset_control_seconds | Automatically reset the manual control after a number of seconds. Set to 0 to disable. ⏲️ | 0 | int 0-31536000
only_once | Adapt lights only when they are turned on (true) or keep adapting them (false). 🔄 | False | bool
adapt_only_on_bare_turn_on | When turning lights on initially. If set to true, AL adapts only if light.turn_on is invoked without specifying color or brightness. ❌🌈 This e.g., prevents adaptation when activating a scene. If false, AL adapts regardless of the presence of color or brightness in the initial service_data. Needs take_over_control enabled. 🕵️ | False | bool
separate_turn_on_commands | Use separate light.turn_on calls for color and brightness, needed for some light types. 🔀 | False | bool
send_split_delay | Delay (ms) between separate_turn_on_commands for lights that don't support simultaneous brightness and color setting. ⏲️ | 0 | int 0-10000
adapt_delay | Wait time (seconds) between light turn on and Adaptive Lighting applying changes. Might help to avoid flickering. ⏲️ | 0 | float > 0
skip_redundant_commands | Skip sending adaptation commands whose target state already equals the light's known state. Minimizes network traffic and improves the adaptation responsivity in some situations. 📉Disable if physical light states get out of sync with HA's recorded state. | False | bool
intercept | Intercept and adapt light.turn_on calls to enabling instantaneous color and brightness adaptation. 🏎️ Disable for lights that do not support light.turn_on with color and brightness. | False | bool
multi_light_intercept | Intercept and adapt light.turn_on calls that target multiple lights. ➗⚠️ This might result in splitting up a single light.turn_on call into multiple calls, e.g., when lights are in different switches. Requires intercept to be enabled. | False| bool
include_config_in_attributes | Show all options as attributes on the switch in Home Assistant when set to true. 📝 | False | bool

  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)
      Not using Zigbee2MQTT
  2. Describe the bug and how to reproduce it:

Getting this error log. Can't find anything online about it

  1. Steps to reproduce the behavior:

Happens all the time. No matter what settings I change I cannot get rid of the warning

@TermeHansen
Copy link

duplicate of #1020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants