danobot / entity-controller

Home Assistant Entity and lighting controller for managing devices with timers, scripts, and sun-based time restrictions.
https://danobot.github.io/ec-docs/
GNU General Public License v3.0
294 stars 40 forks source link

Controller entity always entering `blocked` state - why? #307

Closed nickdos closed 1 year ago

nickdos commented 1 year ago

My controller entity is always going into the blocked state and I can't workout why this happens.

My YAML code:

entity_controller:
  motion_garage_lights:
    sensor: 
      - binary_sensor.openclose_21
      - binary_sensor.motion_sensor_1
    entity: 
      - light.garage_light_1
      - light.garage_light_2
    delay: 300
    grace_period: 5
    start_time: '05:30:00'
    end_time: '22:30:00'

Here is the timeline of events:

At 13:05 entity_controller.motion_garage_lights is still in "blocked" state.

Note: binary_sensor.openclose_21 has no activity during this time (remained in a "closed" state). The light entities only had state changed to ON once by the controller entity - no other changes of state occurred. I previously added the grace_period as per another issue, which suggested this change and a full HA restart was applied (one day ago).

nickdos commented 1 year ago

Here are DEBUG level logs for a similar set of events, after I changed the grace_period to 15 to see if it made a difference but still goes into blocked state:

2023-08-22 13:32:23.640 INFO (MainThread) [custom_components.entity_controller] If you have ANY issues with EntityController (v9.6.1), please enable DEBUG logging under the logger component and kindly report the issue on Github. https://github.com/danobot/entity-controller/issues 2023-08-22 13:32:23.640 DEBUG (MainThread) [custom_components.entity_controller] Setting up entity services 2023-08-22 13:32:23.649 INFO (MainThread) [custom_components.entity_controller] Domain Configuration: {'motion_garage_lights': {'sensor': ['binary_sensor.openclose_21', 'binary_sensor.motion_sensor_1'], 'entity': ['light.garage_light_1', 'light.garage_light_2'], 'delay': 300, 'grace_period': 15, 'start_time': '05:30:00', 'end_time': '22:30:00'}} 2023-08-22 13:32:23.649 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Initialising EntityController entity with this configuration: 2023-08-22 13:32:23.649 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] {'delay': 300, 2023-08-22 13:32:23.650 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Control Entities: ['light.garage_light_1', 'light.garage_light_2'] 2023-08-22 13:32:23.650 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Added Control Entities as state entities (default): ['light.garage_light_1', 'light.garage_light_2'] 2023-08-22 13:32:23.650 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Sensor Entities: ['binary_sensor.openclose_21', 'binary_sensor.motion_sensor_1'] 2023-08-22 13:32:23.651 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] config_transition_behaviours :: Transition Behaviours: {'on_enter_active': 'on', 2023-08-22 13:32:23.651 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] Service data set up 2023-08-22 13:32:23.651 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Ignoring events (state changes) caused by the following entities): [] 2023-08-22 13:32:23.651 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Ignoring state changes on the following attributes: [] 2023-08-22 13:32:23.652 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] start_time_parsed: 05:30:00 2023-08-22 13:32:23.654 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] futurize outputs 2023-08-23 05:30:00 2023-08-22 13:32:23.662 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Setting FIRST START callback for 2023-08-23 05:30:00 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Setting FIRST END callback for 2023-08-22 22:30:00 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] now_is_between start time 2023-08-22 05:30:00.663374+10:00 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] now_is_between end time 2023-08-22 22:30:00.663374+10:00 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] -------------------------------------------------- 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] C O N F I G U R A T I O N D U M P
2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] -------------------------------------------------- 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Entity Controller motion_garage_lights 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Sensor Entities ['binary_sensor.openclose_21', 'binary_sensor.motion_sensor_1'] 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Control Entities: ['light.garage_light_1', 'light.garage_light_2'] 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State Entities: ['light.garage_light_1', 'light.garage_light_2'] 2023-08-22 13:32:23.663 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Activate Trigger E.: [] 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Deactivate Trigger E.: [] 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Ignored state attrs: [] 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Light params: {} 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] ------- Time -------
2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Start time: 05:30:00 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] End time: 22:30:00 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] DT Now: 2023-08-22 13:32:23.664330+10:00 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] datetime Now: 2023-08-22 13:32:23.664399 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Next Sunrise: 2023-08-23 06:34:02.464825+10:00 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Next Sunset: 2023-08-23 17:39:15.052771+10:00 2023-08-22 13:32:23.664 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] ------- Sun -------
2023-08-22 13:32:23.665 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Sunrise: 2023-08-22 06:34:02.464825+10:00 2023-08-22 13:32:23.665 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Sunset: 2023-08-22 17:39:15.052771+10:00 2023-08-22 13:32:23.665 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Sunset Diff (to now): 4:06:51.387230 2023-08-22 13:32:23.667 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Sunrise Diff(to now): 4:06:51.385800 2023-08-22 13:32:23.667 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Transition Behaviours: {'on_enter_idle': 'off', 'on_exit_idle': 'ignore', 'on_enter_active': 'on', 'on_exit_active': 'ignore', 'on_enter_overridden': 'ignore', 'on_exit_overridden': 'ignore', 'on_enter_constrained': 'ignore', 'on_exit_constrained': 'ignore', 'on_enter_blocked': 'ignore', 'on_exit_blocked': 'ignore'} 2023-08-22 13:32:23.667 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] -------------------------------------------------- 2023-08-22 13:32:23.667 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Using DAY MODE parameters: {'delay': 300, 'service_data': None, 'service_data_off': None} 2023-08-22 13:32:23.691 INFO (MainThread) [custom_components.entity_controller] The entity_controller component is ready! 2023-08-22 13:32:25.319 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: 'binary_sensor.motion_sensor_1' Sensor state change to: off 2023-08-22 13:32:25.319 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: state: 'idle' 2023-08-22 13:32:25.319 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: old NoneType 2023-08-22 13:32:25.319 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: 'binary_sensor.openclose_21' Sensor state change to: on 2023-08-22 13:32:25.319 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: state: 'idle' 2023-08-22 13:32:25.319 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: old NoneType 2023-08-22 13:32:25.320 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] None 2023-08-22 13:32:25.320 ERROR (MainThread) [custom_components.entity_controller.motion_garage_lights] Potential configuration error: State Entity (light.garage_light_1) does not exist (yet). Please check for spelling and typos. 'NoneType' object has no attribute 'state' 2023-08-22 13:32:25.328 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Exiting idle 2023-08-22 13:32:25.329 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_idle | Performing Transition Behaviour 2023-08-22 13:32:25.329 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_idle | Action - ignore 2023-08-22 13:32:25.329 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Entering active 2023-08-22 13:32:25.329 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Using DAY MODE parameters: {'delay': 300, 'service_data': None, 'service_data_off': None} 2023-08-22 13:32:25.329 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] _start_timer :: Light params: {'delay': 300, 'service_data': None, 'service_data_off': None} 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active :: light params before turning on: {'delay': 300, 'service_data': None, 'service_data_off': None} 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active | Performing Transition Behaviour 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active | Action - on 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active | Performing Action - Turning on 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] turn_on_control_entities :: Turning on light.garage_light_1 (no parameters passed to service call) 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] call_service :: Calling service turn_on on light.garage_light_1 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] turn_on_control_entities :: Turning on light.garage_light_2 (no parameters passed to service call) 2023-08-22 13:32:25.333 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] call_service :: Calling service turn_on on light.garage_light_2 2023-08-22 13:32:25.452 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_1, Context: <homeassistant.core.Context object at 0x7fa70fa06d90> ] 2023-08-22 13:32:25.452 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: We are in active timer and the state of observed state entities changed. 2023-08-22 13:32:25.453 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_1=unavailable; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], friendly_name=garage light 1, supported_features=7 @ 2023-08-22T13:32:25.447850+10:00> 2023-08-22 13:32:25.453 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_2=unavailable; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], friendly_name=garage light 2, supported_features=7 @ 2023-08-22T13:32:25.448601+10:00> 2023-08-22 13:32:25.453 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State entities are OFF. 2023-08-22 13:32:25.453 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Exiting active 2023-08-22 13:32:25.453 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_active :: Turning off entities, cancelling timer 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_active | Performing Transition Behaviour 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_active | Action - ignore 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Entering idle 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_idle | Performing Transition Behaviour 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_idle | Action - off 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_idle | Performing Action - Turning off 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] turn_off_control_entities :: Turning off light.garage_light_1 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] call_service :: Calling service turn_off on light.garage_light_1 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] turn_off_control_entities :: Turning off light.garage_light_2 2023-08-22 13:32:25.454 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] call_service :: Calling service turn_off on light.garage_light_2 2023-08-22 13:32:25.455 DEBUG (MainThread) [custom_components.entity_controller] Resetting state 2023-08-22 13:32:25.455 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_2, Context: <homeassistant.core.Context object at 0x7fa70fa07470> ] 2023-08-22 13:32:25.477 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_1, Context: <homeassistant.core.Context object at 0x7fa70fa16ca0> ] 2023-08-22 13:32:25.478 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_2, Context: <homeassistant.core.Context object at 0x7fa70f9efbf0> ] 2023-08-22 13:37:58.115 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: 'binary_sensor.motion_sensor_1' Sensor state change to: on 2023-08-22 13:37:58.115 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: state: 'idle' 2023-08-22 13:37:58.116 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_1=off; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], raw_state=False, friendly_name=garage light 1, supported_features=7 @ 2023-08-22T13:32:25.469077+10:00> 2023-08-22 13:37:58.117 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_2=off; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], raw_state=False, friendly_name=garage light 2, supported_features=7 @ 2023-08-22T13:32:25.469460+10:00> 2023-08-22 13:37:58.117 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State entities are OFF. 2023-08-22 13:37:58.118 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Exiting idle 2023-08-22 13:37:58.118 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_idle | Performing Transition Behaviour 2023-08-22 13:37:58.118 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_idle | Action - ignore 2023-08-22 13:37:58.118 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Entering active 2023-08-22 13:37:58.119 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Using DAY MODE parameters: {'delay': 300, 'service_data': None, 'service_data_off': None} 2023-08-22 13:37:58.119 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] _start_timer :: Light params: {'delay': 300, 'service_data': None, 'service_data_off': None} 2023-08-22 13:37:58.134 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active :: light params before turning on: {'delay': 300, 'service_data': None, 'service_data_off': None} 2023-08-22 13:37:58.134 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active | Performing Transition Behaviour 2023-08-22 13:37:58.134 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active | Action - on 2023-08-22 13:37:58.134 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_active | Performing Action - Turning on 2023-08-22 13:37:58.134 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] turn_on_control_entities :: Turning on light.garage_light_1 (no parameters passed to service call) 2023-08-22 13:37:58.134 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] call_service :: Calling service turn_on on light.garage_light_1 2023-08-22 13:37:58.135 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] turn_on_control_entities :: Turning on light.garage_light_2 (no parameters passed to service call) 2023-08-22 13:37:58.135 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] call_service :: Calling service turn_on on light.garage_light_2 2023-08-22 13:37:58.287 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_1, Context: <homeassistant.core.Context object at 0x7fa70239fe20> ] 2023-08-22 13:37:58.288 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: Ignoring this state change because it came from ec_6e3e61_a9bcc176b650348c 2023-08-22 13:37:58.310 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_2, Context: <homeassistant.core.Context object at 0x7fa70239fe20> ] 2023-08-22 13:37:58.310 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: Ignoring this state change because it came from ec_6e3e61_a9bcc176b650348c 2023-08-22 13:37:58.323 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_1, Context: <homeassistant.core.Context object at 0x7fa70239fe20> ] 2023-08-22 13:37:58.323 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: Ignoring this state change because it came from ec_6e3e61_a9bcc176b650348c 2023-08-22 13:37:58.346 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_2, Context: <homeassistant.core.Context object at 0x7fa70239fe20> ] 2023-08-22 13:37:58.347 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: Ignoring this state change because it came from ec_6e3e61_a9bcc176b650348c 2023-08-22 13:40:00.238 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: 'binary_sensor.motion_sensor_1' Sensor state change to: off 2023-08-22 13:40:00.238 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] sensor_state_change :: state: 'active_timer' 2023-08-22 13:41:37.042 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_2, Context: <homeassistant.core.Context object at 0x7fa70af664d0> ] 2023-08-22 13:41:37.042 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: A significant attribute changed and will be handled 2023-08-22 13:41:37.042 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: We are in active timer and the state of observed state entities changed. 2023-08-22 13:41:37.043 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_1=on; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=255, color_temp_kelvin=5235, color_temp=191, hs_color=(27.321, 16.142), rgb_color=(255, 232, 213), xy_color=(0.364, 0.347), raw_state=True, friendly_name=garage light 1, supported_features=7 @ 2023-08-22T13:37:58.278463+10:00> 2023-08-22 13:41:37.044 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State entities are ON. [light.garage_light_1] 2023-08-22 13:41:37.044 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_1=on; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=255, color_temp_kelvin=5235, color_temp=191, hs_color=(27.321, 16.142), rgb_color=(255, 232, 213), xy_color=(0.364, 0.347), raw_state=True, friendly_name=garage light 1, supported_features=7 @ 2023-08-22T13:37:58.278463+10:00> 2023-08-22 13:41:37.044 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State entities are ON. [light.garage_light_1] 2023-08-22 13:41:37.045 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Exiting active 2023-08-22 13:41:37.045 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_active :: Turning off entities, cancelling timer 2023-08-22 13:41:37.045 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_active | Performing Transition Behaviour 2023-08-22 13:41:37.045 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_exit_active | Action - ignore 2023-08-22 13:41:37.046 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] Entering blocked 2023-08-22 13:41:37.046 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_1=on; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=255, color_temp_kelvin=5235, color_temp=191, hs_color=(27.321, 16.142), rgb_color=(255, 232, 213), xy_color=(0.364, 0.347), raw_state=True, friendly_name=garage light 1, supported_features=7 @ 2023-08-22T13:37:58.278463+10:00> 2023-08-22 13:41:37.046 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State entities are ON. [light.garage_light_1] 2023-08-22 13:41:37.047 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_blocked | Performing Transition Behaviour 2023-08-22 13:41:37.047 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] on_enter_blocked | Action - ignore 2023-08-22 13:41:37.051 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_1=on; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=255, color_temp_kelvin=5235, color_temp=191, hs_color=(27.321, 16.142), rgb_color=(255, 232, 213), xy_color=(0.364, 0.347), raw_state=True, friendly_name=garage light 1, supported_features=7 @ 2023-08-22T13:37:58.278463+10:00> 2023-08-22 13:41:37.051 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State entities are ON. [light.garage_light_1] 2023-08-22 13:41:37.109 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: [ Entity: light.garage_light_1, Context: <homeassistant.core.Context object at 0x7fa70af664d0> ] 2023-08-22 13:41:37.109 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] state_entity_state_change :: A significant attribute changed and will be handled 2023-08-22 13:41:37.110 INFO (MainThread) [custom_components.entity_controller.motion_garage_lights] <state light.garage_light_1=on; min_color_temp_kelvin=2702, max_color_temp_kelvin=6535, min_mireds=153, max_mireds=370, effect_list=[], supported_color_modes=[<ColorMode.COLOR_TEMP: 'color_temp'>], color_mode=color_temp, brightness=255, color_temp_kelvin=5208, color_temp=192, hs_color=(27.275, 16.489), rgb_color=(255, 232, 212), xy_color=(0.364, 0.348), raw_state=True, friendly_name=garage light 1, supported_features=7 @ 2023-08-22T13:37:58.278463+10:00> 2023-08-22 13:41:37.110 DEBUG (MainThread) [custom_components.entity_controller.motion_garage_lights] State entities are ON. [light.garage_light_1]

nickdos commented 1 year ago

I think I've solved it. I forgot the lights were already added to Adaptive Lighting before installing and configuring EC.

I've since found https://danobot.github.io/ec-docs/special/ignore-state-attributes/ for anyone else experiencing this.

arsenicks commented 8 months ago

Just wanted to add to this in case someone else like me is experiencing this issue.

I had the same problem and it was caused by the dimmer I used that have other attribute that was changing:

This is what I added:

    state_attributes_ignore:
      - brightness
      - color_mode
      - power
      - energy
      - linkquality

You can use the developer tools under state tab to see which states might change, trial and error for the rest.