danobot/entity-controller

EC stuck in Active status

Closed this issue · 3 comments

Description

I have created an EC instance.
once the sensor triggered, the EC remain stuck in "active" status.

Configuration

entity_controller: #https://github.com/danobot/entity-controller
  detection_jardin:                               # serves as a name
    sensor:
      - binary_sensor.jardin_detecteurentree_occupancy
      - binary_sensor.jardin_detecteurportillon_occupancy
      - binary_sensor.garage_detecteur_occupancy
    entities:
      - light.jardin_applique1
      - light.jardin_applique2
      - light.jardin_applique3
      - light.jardin_applique4
      - light.jardin_applique6
      - light.jardin_potelet1
      - light.jardin_potelet2
      - light.jardin_potelet3
      - light.jardin_projecteur
      - light.jardin_spot1
      - light.jardin_spot2
      - light.jardin_spot3
      - light.jardin_spot4
      - light.jardin_spot5
    state_entities:
      - light.jardin_applique6
    delay: 300s                                  # optional, overwrites default delay of 180s
    start_time: sunset - 00:30:00 
    end_time: sunrise + 00:30:00 
    end_time_action: "off"

Logs

2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] state_entity_state_change :: [ Entity: light.jardin_applique6, Context: Context(user_id=None, parent_id=None, id='5a4779c9dd2950ac09e88dec4f99a33d') ]
Old state: <state light.jardin_applique6=off; min_mireds=153, max_mireds=526, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect'], supported_color_modes=['color_temp', 'hs'], friendly_name=Jardin/Applique6, supported_features=63 @ 2021-11-10T20:18:51.779138+01:00>
New State: <state light.jardin_applique6=off; min_mireds=153, max_mireds=526, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect'], supported_color_modes=['color_temp', 'hs'], color=h=205, hue=205, s=6, saturation=6, x=0.3164, y=0.3264, linkquality=234, update=state=idle, update_available=False, friendly_name=Jardin/Applique6, supported_features=63 @ 2021-11-10T20:18:51.779138+01:00>
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] state_entity_state_change :: A significant attribute changed and will be handled
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurportillon_occupancy' Sensor state change to: off
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'idle'
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: Ignore attribute only change
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurentree_occupancy' Sensor state change to: off
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'idle'
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: Ignore attribute only change
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.garage_detecteur_occupancy' Sensor state change to: off
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'idle'
2021-11-10 20:20:16 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: Ignore attribute only change
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurentree_occupancy' Sensor state change to: off
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'idle'
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: Ignore attribute only change
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurentree_occupancy' Sensor state change to: on
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'idle'
2021-11-10 20:22:15 INFO (MainThread) [custom_components.entity_controller.detection_jardin] <state light.jardin_applique6=off; min_mireds=153, max_mireds=526, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect'], supported_color_modes=['color_temp', 'hs'], color=h=205, hue=205, s=6, saturation=6, x=0.3164, y=0.3264, linkquality=234, update=state=idle, update_available=False, friendly_name=Jardin/Applique6, supported_features=63 @ 2021-11-10T20:18:51.779138+01:00>
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] State entities are OFF.
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] Exiting idle
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] on_exit_idle | Performing Transition Behaviour
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] on_exit_idle | Action - ignore
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] Entering active
2021-11-10 20:22:15 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] Using DAY MODE parameters: {'delay': '300s', 'service_data': None, 'service_data_off': None}
2021-11-10 20:22:15 INFO (MainThread) [custom_components.entity_controller.detection_jardin] _start_timer :: Light params: {'delay': '300s', 'service_data': None, 'service_data_off': None}
2021-11-10 20:23:45 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurentree_occupancy' Sensor state change to: on
2021-11-10 20:23:45 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'active'
2021-11-10 20:23:45 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: Ignore attribute only change
2021-11-10 20:23:45 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurentree_occupancy' Sensor state change to: off
2021-11-10 20:23:45 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'active'

Version

HACS version. up to date.

I would suggest starting with one entity and adding the other ones over time. By adding one at a time you can see where the problems occur

Here is an over simplified version:

entity_controller: #https://github.com/danobot/entity-controller
  detection_jardin:                               # serves as a name
    sensor:
      - binary_sensor.jardin_detecteurentree_occupancy
#      - binary_sensor.jardin_detecteurportillon_occupancy
#      - binary_sensor.garage_detecteur_occupancy
    entities:
      - light.jardin_applique1
#      - light.jardin_applique2
#      - light.jardin_applique3
#      - light.jardin_applique4
#      - light.jardin_applique5
#      - light.jardin_applique6
#      - light.jardin_potelet1
#      - light.jardin_potelet2
#      - light.jardin_potelet3
#      - light.jardin_projecteur
#      - light.jardin_spot1
#      - light.jardin_spot2
#      - light.jardin_spot3
#      - light.jardin_spot4
#      - light.jardin_spot5
#    state_entities:
#      - light.jardin_applique6
    delay: 300s                                  # optional, overwrites default delay of 180s
#    start_time: sunset - 00:30:00               # required
#    end_time: sunrise + 00:30:00                # required
#    end_time_action: "off"
#    block_timeout: 300s

Same isssue: It remain stuck in "Active" status and doesn't trigger the light.

2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurentree_occupancy' Sensor state change to: off
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'idle'
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: Ignore attribute only change
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: 'binary_sensor.jardin_detecteurentree_occupancy' Sensor state change to: on
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] sensor_state_change :: state: 'idle'
2021-11-11 18:20:38 INFO (MainThread) [custom_components.entity_controller.detection_jardin] <state light.jardin_applique1=off; min_mireds=153, max_mireds=526, effect_list=['blink', 'breathe', 'okay', 'channel_change', 'finish_effect', 'stop_effect'], supported_color_modes=['color_temp', 'hs'], color=h=205, hue=205, s=6, saturation=6, x=0.3164, y=0.3264, linkquality=30, update=state=idle, update_available=False, friendly_name=Jardin/Applique1, supported_features=63 @ 2021-11-11T18:08:43.242826+01:00>
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] State entities are OFF.
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] Exiting idle
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] on_exit_idle | Performing Transition Behaviour
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] on_exit_idle | Action - ignore
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] Entering active
2021-11-11 18:20:38 DEBUG (MainThread) [custom_components.entity_controller.detection_jardin] Using DAY MODE parameters: {'delay': '300s', 'service_data': None, 'service_data_off': None}
2021-11-11 18:20:38 INFO (MainThread) [custom_components.entity_controller.detection_jardin] _start_timer :: Light params: {'delay': '300s', 'service_data': None, 'service_data_off': None}

Does it work with other entities? Say a different light and sensor?