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

Light not adapting #1015

Open
4 tasks done
sstarcher opened this issue Jun 20, 2024 · 4 comments
Open
4 tasks done

Light not adapting #1015

sstarcher opened this issue Jun 20, 2024 · 4 comments

Comments

@sstarcher
Copy link

Home Assistant Adaptive Lighting Issue Template

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-06-19 22:08:03.946 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.toggle('['light.upstairs_bathroom_light']')' event with context.id='01J0SSV5FA1YAX39ZJQDHJD0T6'
2024-06-19 22:08:03.947 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01J0SSV5FA1YAX39ZJQDHJD0T6', is_skipped_hash='False'
2024-06-19 22:08:03.947 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.toggle (c:01J0SSV5FA1YAX39ZJQDHJD0T6): entity_id=['light.upstairs_bathroom_light'], params=>', service_data='{'entity_id': ['light.upstairs_bathroom_light'], 'params': {}}'
2024-06-19 22:08:03.947 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Switch is off or light is already on for entity_id='light.upstairs_bathroom_light', skipped='[]' (is_on='False', is_state='True', manual_control='False', switch._intercept='True')
2024-06-19 22:08:03.947 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.upstairs_bathroom_light']'
2024-06-19 22:08:04.103 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'on' → 'off' event for 'light.upstairs_bathroom_light' with context.id='01J0SSV5FA1YAX39ZJQDHJD0T6'



2024-06-19 22:08:07.501 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.toggle('['light.upstairs_bathroom_light']')' event with context.id='01J0SSV8YCQPYZFV3RDKSHWWK7'
2024-06-19 22:08:07.501 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01J0SSV8YCQPYZFV3RDKSHWWK7', is_skipped_hash='False'
2024-06-19 22:08:07.501 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.toggle (c:01J0SSV8YCQPYZFV3RDKSHWWK7): entity_id=['light.upstairs_bathroom_light'], params=>', service_data='{'entity_id': ['light.upstairs_bathroom_light'], 'params': {}}'
2024-06-19 22:08:07.502 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Switch is off or light is already on for entity_id='light.upstairs_bathroom_light', skipped='[]' (is_on='False', is_state='False', manual_control='False', switch._intercept='True')
2024-06-19 22:08:07.502 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.upstairs_bathroom_light']'
2024-06-19 22:08:07.657 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.upstairs_bathroom_light' 'state_changed' event: '{'supported_color_modes': [<ColorMode.BRIGHTNESS: 'brightness'>], 'color_mode': None, 'brightness': None, 'icon': 'mdi:ceiling-light', 'friendly_name': 'Upstairs Bathroom Light', 'supported_features': <LightEntityFeature.TRANSITION: 32>}' with context.id='01J0SSV8YCQPYZFV3RDKSHWWK7'
2024-06-19 22:08:07.657 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.upstairs_bathroom_light' with context.id='01J0SSV8YCQPYZFV3RDKSHWWK7'
2024-06-19 22:08:07.658 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01J0SSV8YCQPYZFV3RDKSHWWK7'
2024-06-19 22:08:07.658 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: State change 'off' → 'on' triggered by 'light.turn_on'
  1. Your Adaptive Lighting configuration:

configed in UI I don't see a way to copy that here. Mainly defaults, but also tried alot of options

adapt only once = off
adapt_only_on_bare_turn_on= off
separate_turn_on_commands = off
skip_redundant_commands = off
intercept = on
multi_light_intercept = off
include_config_in_attributes = off

  1. (If using Zigbee2MQTT), provide your configuration files (remove all personal information before posting):
    Zwave Inovelli switch

  2. Describe the bug and how to reproduce it:

The light does not adapt at all

  1. Steps to reproduce the behavior:
    Turn light on - no adaption
@danielbrunt57
Copy link

danielbrunt57 commented Jun 20, 2024

3. (If using Zigbee2MQTT), provide your configuration files (remove all personal information before posting):
Zwave Inovelli switch

Which model is your Inovelli light dimmer?

Upon reviewing your debug logs, I am puzzled by this...

2024-06-19 22:08:03.947 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] >>> Switch is off <<< or light is already on for entity_id='light.upstairs_bathroom_light', skipped='[]' (is_on='False', is_state='True', manual_control='False', switch._intercept='True')
2024-06-19 22:08:03.947 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.upstairs_bathroom_light']'
2024-06-19 22:08:04.103 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'on' → 'off' event for 'light.upstairs_bathroom_light' with context.id='01J0SSV5FA1YAX39ZJQDHJD0T6'

and
2024-06-19 22:08:07.502 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] >>> Switch is off <<< or light is already on for entity_id='light.upstairs_bathroom_light', skipped='[]' (is_on='False', is_state='False', manual_control='False', switch._intercept='True')
2024-06-19 22:08:07.502 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.upstairs_bathroom_light']'
2024-06-19 22:08:07.657 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.upstairs_bathroom_light' 'state_changed' event: '{'supported_color_modes': [<ColorMode.BRIGHTNESS: 'brightness'>], 'color_mode': None, 'brightness': None, 'icon': 'mdi:ceiling-light', 'friendly_name': 'Upstairs Bathroom Light', 'supported_features': <LightEntityFeature.TRANSITION: 32>}' with context.id='01J0SSV8YCQPYZFV3RDKSHWWK7'
2024-06-19 22:08:07.657 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.upstairs_bathroom_light' with context.id='01J0SSV8YCQPYZFV3RDKSHWWK7'

This is my first time reviewing AL's debug logs but those two Switch is off's (one for the on->off and the 2nd for the off->on) are making me wonder if your Adaptive Lighting and Adaptive Lighting Adapt Brightness switches are on?

@sstarcher
Copy link
Author

This would be a LZW31-SN from Inovelli with firmware 1.57.

@lennon101
Copy link

I can't tell if this is an Adaptive Lighting problem or the result of the Color Mixer Integration. But I am experiencing the same problem. Here's my debug output for AL. Of note is the error No switch found for entity_id='light.ensuite_vanity_led_lights' which doesn't make any sense to me. The light.ensuite_vanity_led_lights definitely has a "switch" and I can toggle it on and off and change the color/temp using the normal HA way in the UI and the service calls. But AL seems to be having problems?

2024-07-11 12:11:02.128 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.ensuite_vanity_led_lights', skipped='['light.ensuite_vanity_led_lights']'
2024-07-11 12:11:02.128 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.ensuite_vanity_led_lights']'
2024-07-11 12:11:02.128 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.ensuite_vanity_led_lights_channel_2']')' event with context.id='01J2FRXTVFVBKVJGAHRVTMJTHJ'
2024-07-11 12:11:02.129 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01J2FRXTVFVBKVJGAHRVTMJTHJ', is_skipped_hash='False'
2024-07-11 12:11:02.129 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01J2FRXTVFVBKVJGAHRVTMJTHJ): entity_id=['light.ensuite_vanity_led_lights_channel_2'], params=brightness=128>', service_data='{'entity_id': ['light.ensuite_vanity_led_lights_channel_2'], 'params': {'brightness': 128}}'
2024-07-11 12:11:02.129 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.ensuite_vanity_led_lights_channel_2', skipped='['light.ensuite_vanity_led_lights_channel_2']'
2024-07-11 12:11:02.129 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.ensuite_vanity_led_lights_channel_2']'
2024-07-11 12:11:02.131 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'light.turn_on('['light.ensuite_vanity_led_lights_channel_1']')' event with context.id='01J2FRXTVFVBKVJGAHRVTMJTHJ'
2024-07-11 12:11:02.131 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (0) _service_interceptor_turn_on_handler: call.context.id='01J2FRXTVFVBKVJGAHRVTMJTHJ', is_skipped_hash='False'
2024-07-11 12:11:02.131 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (1) _service_interceptor_turn_on_handler: call='<ServiceCall light.turn_on (c:01J2FRXTVFVBKVJGAHRVTMJTHJ): entity_id=['light.ensuite_vanity_led_lights_channel_1'], params=brightness=0>', service_data='{'entity_id': ['light.ensuite_vanity_led_lights_channel_1'], 'params': {'brightness': 0}}'
2024-07-11 12:11:02.132 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] No switch found for entity_id='light.ensuite_vanity_led_lights_channel_1', skipped='['light.ensuite_vanity_led_lights_channel_1']'
2024-07-11 12:11:02.132 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] (2) _service_interceptor_turn_on_handler: switch_to_eids='{}', skipped='['light.ensuite_vanity_led_lights_channel_1']'
2024-07-11 12:11:02.230 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.ensuite_vanity_led_lights_channel_2' 'state_changed' event: '{'supported_color_modes': [<ColorMode.BRIGHTNESS: 'brightness'>], 'color_mode': <ColorMode.BRIGHTNESS: 'brightness'>, 'brightness': 128, 'friendly_name': 'Ensuite Vanity LED Lights channel 2', 'supported_features': <LightEntityFeature.TRANSITION: 32>}' with context.id='01J2FRXTVFVBKVJGAHRVTMJTHJ'
2024-07-11 12:11:02.231 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected an 'off' → 'on' event for 'light.ensuite_vanity_led_lights_channel_2' with context.id='01J2FRXTVFVBKVJGAHRVTMJTHJ'
2024-07-11 12:11:02.231 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] is_proactively_adapting_context='False', context_id='01J2FRXTVFVBKVJGAHRVTMJTHJ'
2024-07-11 12:11:02.231 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] just_turned_off: State change 'off' → 'on' triggered by 'light.turn_on'

@pretenda
Copy link

pretenda commented Aug 7, 2024

I'm having the same issue - my lights aren't adapting, and I'm using the Color Mixer Integration same as @lennon101. I noted in my logs I had the following:
2024-08-07 20:57:41.782 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kitchen_island_led_strips_cool' 'state_changed' event: '{'supported_color_modes': [<ColorMode.BRIGHTNESS: 'brightness'>], 'color_mode': <ColorMode.BRIGHTNESS: 'brightness'>, 'brightness': 13, 'friendly_name': 'Kitchen Island LED Strip Cool', 'supported_features': <LightEntityFeature.TRANSITION: 32>}' with context.id='01J4P7SJTZ:al:JNUX:0slp:03' 2024-08-07 20:57:41.782 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.kitchen_island_led_strips_cool=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=13, friendly_name=Kitchen Island LED Strip Cool, supported_features=32 @ 2024-08-07T20:08:14.734791+10:00>' found for light.kitchen_island_led_strips_cool 2024-08-07 20:57:41.782 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Start transition timer of 1.0 seconds for light light.kitchen_island_led_strips_cool 2024-08-07 20:57:41.811 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Detected a 'light.kitchen_island_strips_warm' 'state_changed' event: '{'supported_color_modes': [<ColorMode.BRIGHTNESS: 'brightness'>], 'color_mode': <ColorMode.BRIGHTNESS: 'brightness'>, 'brightness': 13, 'friendly_name': 'Kitchen Island LED Strip Warm', 'supported_features': <LightEntityFeature.TRANSITION: 32>}' with context.id='01J4P7SJTZ:al:JNUX:0slp:03' 2024-08-07 20:57:41.812 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] AdaptiveLightingManager: New adapt '<state light.kitchen_island_strips_warm=on; supported_color_modes=[<ColorMode.BRIGHTNESS: 'brightness'>], color_mode=brightness, brightness=13, friendly_name=Kitchen Island LED Strip Warm, supported_features=32 @ 2024-08-07T20:08:14.736337+10:00>' found for light.kitchen_island_strips_warm

2024-08-07 20:57:42.784 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.kitchen_island_led_strips_cool 2024-08-07 20:57:42.813 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.kitchen_island_strips_warm 2024-08-07 20:57:42.827 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.pantry_led_strips_right_cool 2024-08-07 20:57:42.855 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.pantry_led_strips_right_warm 2024-08-07 20:57:42.910 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.kitchen_led_strip_main_cool 2024-08-07 20:57:42.934 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.kitchen_led_strip_main_warm 2024-08-07 20:57:42.950 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.pantry_led_strip_left_cool 2024-08-07 20:57:42.971 DEBUG (MainThread) [custom_components.adaptive_lighting.switch] Transition finished for light light.pantry_led_strip_left_warm

This is a bit bizarre, as I don't specifically select those entities. I have the Color Mixer Integration entities selected instead:
image

I'm guessing that the two integrations are messing with each other in some way. I'm assuming that Adaptive Lighting should not be interacting directly with the individual channels, rather just the aggregated 'light group' (for want of a better term) provided by the Color Mixer Integration. Not sure if this helps narrow things down or just adds to the noise!

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

4 participants