basnijholt / adaptive-lighting

Adaptive Lighting custom component for Home Assistant
https://basnijholt.github.io/adaptive-lighting/
Apache License 2.0
1.7k stars 126 forks source link

Light not adapting #1015

Open sstarcher opened 1 week ago

sstarcher commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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