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
289 stars 41 forks source link

EC configurations do not load properly in 2024.2.0 - may be Python 3.12 #320

Closed robchandhok closed 5 months ago

robchandhok commented 5 months ago

Description

The latest version of EntityController, and the latest (beta) HA release seems to trigger a behavior that makes config file parsing fail when DEBUG is off for the EntityController component.

Configuration

Entity Controller: 9.7.1

Version | core-2024.2.0b8
Installation Type | Home Assistant OS

Steps to reproduce

Steps to reproduce the behavior:

  1. Restart HA
  2. Errors parsing the config because of type checking that fails.
  3. Set custom_components.entity_controller: debug
  4. Entity Controller loads properly (and verbosely)

Expected behavior

This is how the component should work:

  1. Restart HA
  2. Component loads it's config as it has done for years :-)

Actual Behaviour

This is what actually happened:

  1. see above? My quick glance at the code didn't reveal anything obvious except that the YamlObjects typechecking is failing when debug is false. I looked for something being changed, the biggest change is this HA build uses Python 3.12.

Logs

debugging off:

2024-02-06 10:25:24.063 ERROR (SyncWorker_27) [custom_components.entity_controller.front_walk_controller] Cannot determine type of provided config value. Key: entities, Type: <class 'list'>, Value: ['light.front_door_light']
2024-02-06 10:25:24.063 ERROR (SyncWorker_27) [custom_components.entity_controller.front_walk_controller] Cannot determine type of provided config value. Key: sensors, Type: <class 'list'>, Value: ['input_boolean.front_door_person_detected', 'binary_sensor.front_door_open']
2024-02-06 10:25:24.063 ERROR (SyncWorker_27) [custom_components.entity_controller.front_walk_controller] No sensor entities defined. You must define at least one sensor entity.
2024-02-06 10:25:24.063 ERROR (SyncWorker_27) [custom_components.entity_controller.front_walk_controller] Cannot determine type of provided config value. Key: overrides, Type: <class 'list'>, Value: ['binary_sensor.light_enough']

with debugging on:

2024-02-06 10:29:34.666 INFO (MainThread) [custom_components.entity_controller] If you have ANY issues with EntityController (v9.7.1), please enable DEBUG logging under the logger component and kindly report the issue on Github. https://github.com/danobot/entity-controller/issues
2024-02-06 10:29:34.667 DEBUG (MainThread) [custom_components.entity_controller] Setting up entity services
2024-02-06 10:29:34.668 INFO (MainThread) [custom_components.entity_controller] Domain Configuration: {'front_walk_controller': {'friendly_name': 'Front Walk Controller', 'sensors': ['input_boolean.front_door_person_detected', 'binary_sensor.front_door_open'], 'entities': ['light.front_door_light'], 'delay': 600, 'overrides': ['binary_sensor.light_enough'], 'sensor_resets_timer': True}

...

2024-02-06 10:29:34.668 DEBUG (MainThread) [custom_components.entity_controller.front_walk_controller] Initialising EntityController entity with this configuration:
2024-02-06 10:29:34.668 DEBUG (MainThread) [custom_components.entity_controller.front_walk_controller] {'delay': 600,
'entities': ['light.front_door_light'],
'friendly_name': 'Front Walk Controller',
'name': 'front_walk_controller',
'overrides': ['binary_sensor.light_enough'],
'sensor_resets_timer': True,
'sensors': ['input_boolean.front_door_person_detected',
'binary_sensor.front_door_open']}

...

2024-02-06 10:29:34.672 INFO (MainThread) [custom_components.entity_controller] The entity_controller component is ready!

Version

9.7.1
m90att commented 5 months ago

Hi, I've added the debug line to configuration.yaml for each entity controller but it's not working, yet I still see lots of debug records in the log. Have I entered the debug line incorrectly?

logger:
  logs:
    custom_components.entity_controller.motion_light_landing: debug
    custom_components.entity_controller.motion_light_hall: debug
    custom_components.entity_controller.motion_light_kitchen_lamp: debug
2024-02-06 19:44:43.090 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] add :: Adding config key `trigger_on_deactivate` to the config list
2024-02-06 19:44:43.090 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Config key trigger_on_deactivate not provided by user. Skipping.
2024-02-06 19:44:43.090 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] add :: Adding config key `trigger_on_activate` to the config list
2024-02-06 19:44:43.090 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Config key trigger_on_activate not provided by user. Skipping.
2024-02-06 19:44:43.090 INFO (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Service data set up
2024-02-06 19:44:43.090 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] add :: Adding config key `ignored_event_sources` to the config list
2024-02-06 19:44:43.090 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Config key ignored_event_sources not provided by user. Skipping.
2024-02-06 19:44:43.090 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] add :: Adding config key `state_attributes_ignore` to the config list
2024-02-06 19:44:43.091 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Config key state_attributes_ignore not provided by user. Skipping.
2024-02-06 19:44:43.091 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Ignoring events (state changes) caused by the following entities): []
2024-02-06 19:44:43.091 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Ignoring state changes on the following attributes: []
2024-02-06 19:44:43.091 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] NIGHT MODE ENABLED: {'delay': 30, 'start_time': '22:15:00', 'end_time': '07:00:00'}
2024-02-06 19:44:43.091 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] now_is_between start time 2024-02-06 22:15:00.091828+00:00
2024-02-06 19:44:43.092 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] now_is_between end time 2024-02-07 07:00:00.091828+00:00
2024-02-06 19:44:43.092 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] Using DAY MODE parameters: {'delay': 180, 'service_data': None, 'service_data_off': None}
2024-02-06 19:44:43.093 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] Entering idle
2024-02-06 19:44:43.093 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] set_context :: name_hash: 7c0687
2024-02-06 19:44:43.093 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] set_context :: context_id: ec_7c0687_78300618ffd67b01
2024-02-06 19:44:43.093 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] on_enter_idle | Performing Transition Behaviour
2024-02-06 19:44:43.093 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] on_enter_idle | Action - off
2024-02-06 19:44:43.093 DEBUG (SyncWorker_5) [custom_components.entity_controller.motion_light_landing] on_enter_idle | Performing Action - Turning off
2024-02-06 19:44:43.094 ERROR (SyncWorker_12) [custom_components.entity_controller.motion_light_dining] Cannot determine type of provided config value. Key: entity, Type: <class 'list'>, Value: ['light.kitchen_double_light_switch_right']
2024-02-06 19:44:43.095 ERROR (SyncWorker_12) [custom_components.entity_controller.motion_light_dining] Cannot determine type of provided config value. Key: sensor, Type: <class 'list'>, Value: ['binary_sensor.dining_area_sensor_occupancy']
2024-02-06 19:44:43.095 ERROR (SyncWorker_12) [custom_components.entity_controller.motion_light_dining] No sensor entities defined. You must define at least one sensor entity.
2024-02-06 19:44:43.095 ERROR (SyncWorker_12) [custom_components.entity_controller.motion_light_dining] Cannot determine type of provided config value. Key: overrides, Type: <class 'list'>, Value: ['input_boolean.kitchen_lamp_motion_controller']
2024-02-06 19:44:43.101 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] start_time_parsed: 17:03:01.055195
2024-02-06 19:44:43.101 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] futurize outputs 2024-02-07 17:03:01.055195
2024-02-06 19:44:43.102 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Setting FIRST START callback for 2024-02-07 17:03:01.055195
2024-02-06 19:44:43.102 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Setting FIRST END callback for 2024-02-07 07:38:07.746249
2024-02-06 19:44:43.103 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] now_is_between start time 2024-02-06 17:03:01.103446+00:00
2024-02-06 19:44:43.103 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] now_is_between end time 2024-02-07 07:38:07.103446+00:00
2024-02-06 19:44:43.103 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] --------------------------------------------------
2024-02-06 19:44:43.103 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp]        C O N F I G U R A T I O N   D U M P        
2024-02-06 19:44:43.103 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] --------------------------------------------------
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Entity Controller       motion_light_kitchen_lamp
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Sensor Entities         []
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Control Entities:       []
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] State Entities:         []
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Activate Trigger E.:    []
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Deactivate Trigger E.:  []
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Ignored state attrs:    []
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Light params:           {}
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp]         -------        Time        -------        
2024-02-06 19:44:43.104 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Start time:             sunset
2024-02-06 19:44:43.105 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] End time:               sunrise
2024-02-06 19:44:43.105 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] DT Now:                 2024-02-06 19:44:43.105164+00:00
2024-02-06 19:44:43.105 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] datetime Now:           2024-02-06 19:44:43.105288
2024-02-06 19:44:43.105 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Next Sunrise:           2024-02-07 07:38:07.746249+00:00
2024-02-06 19:44:43.105 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Next Sunset:            2024-02-07 17:03:01.055195+00:00
2024-02-06 19:44:43.106 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp]         -------        Sun         -------        
2024-02-06 19:44:43.106 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Sunrise:                2024-02-06 07:38:07.746249+00:00
2024-02-06 19:44:43.106 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Sunset:                 2024-02-06 17:03:01.055195+00:00
2024-02-06 19:44:43.109 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Ignoring events (state changes) caused by the following entities): []
2024-02-06 19:44:43.109 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Ignoring state changes on the following attributes: []
2024-02-06 19:44:43.109 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] start_time_parsed: 17:03:01.055195
2024-02-06 19:44:43.109 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] futurize outputs 2024-02-07 17:03:01.055195
2024-02-06 19:44:43.110 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Setting FIRST START callback for 2024-02-07 17:03:01.055195
2024-02-06 19:44:43.110 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Setting FIRST END callback for 2024-02-07 07:38:07.746249
2024-02-06 19:44:43.111 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] now_is_between start time 2024-02-06 17:03:01.111396+00:00
2024-02-06 19:44:43.111 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] now_is_between end time 2024-02-07 07:38:07.111396+00:00
2024-02-06 19:44:43.111 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] --------------------------------------------------
2024-02-06 19:44:43.111 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall]        C O N F I G U R A T I O N   D U M P        
2024-02-06 19:44:43.111 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] --------------------------------------------------
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Entity Controller       motion_light_hall
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Sensor Entities         []
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Control Entities:       []
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] State Entities:         []
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Activate Trigger E.:    []
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Deactivate Trigger E.:  []
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Ignored state attrs:    []
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Light params:           {}
2024-02-06 19:44:43.112 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall]         -------        Time        -------        
2024-02-06 19:44:43.113 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Start time:             sunset
2024-02-06 19:44:43.113 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] End time:               sunrise
2024-02-06 19:44:43.113 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] DT Now:                 2024-02-06 19:44:43.113249+00:00
2024-02-06 19:44:43.113 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] datetime Now:           2024-02-06 19:44:43.113394
2024-02-06 19:44:43.113 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Next Sunrise:           2024-02-07 07:38:07.746249+00:00
2024-02-06 19:44:43.114 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Next Sunset:            2024-02-07 17:03:01.055195+00:00
2024-02-06 19:44:43.114 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall]         -------        Sun         -------        
2024-02-06 19:44:43.115 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Sunrise:                2024-02-06 07:38:07.746249+00:00
2024-02-06 19:44:43.115 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Sunset:                 2024-02-06 17:03:01.055195+00:00
2024-02-06 19:44:43.116 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Sunset Diff (to now): 21:18:17.939087
2024-02-06 19:44:43.116 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Sunrise Diff(to now): 21:18:17.938459
2024-02-06 19:44:43.116 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] 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'}
2024-02-06 19:44:43.119 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] --------------------------------------------------
2024-02-06 19:44:43.119 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Using DAY MODE parameters: {'delay': 120, 'service_data': None, 'service_data_off': None}
2024-02-06 19:44:43.120 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] Entering idle
2024-02-06 19:44:43.120 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] set_context :: name_hash: df8812
2024-02-06 19:44:43.120 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] set_context :: context_id: ec_df8812_b1073cd1bf34adf3
2024-02-06 19:44:43.120 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] on_enter_idle | Performing Transition Behaviour
2024-02-06 19:44:43.121 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] on_enter_idle | Action - off
2024-02-06 19:44:43.121 DEBUG (SyncWorker_6) [custom_components.entity_controller.motion_light_hall] on_enter_idle | Performing Action - Turning off
2024-02-06 19:44:43.122 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Sunset Diff (to now): 21:18:17.933236
2024-02-06 19:44:43.122 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Sunrise Diff(to now): 21:18:17.932583
2024-02-06 19:44:43.122 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] 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'}
2024-02-06 19:44:43.122 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] --------------------------------------------------
2024-02-06 19:44:43.123 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Using DAY MODE parameters: {'delay': 60, 'service_data': {'brightness_pct': 100}, 'service_data_off': None}
2024-02-06 19:44:43.123 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] Entering idle
2024-02-06 19:44:43.123 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] set_context :: name_hash: a8f09e
2024-02-06 19:44:43.124 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] set_context :: context_id: ec_a8f09e_26ea1fd7385cd5dc
2024-02-06 19:44:43.124 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] on_enter_idle | Performing Transition Behaviour
2024-02-06 19:44:43.124 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] on_enter_idle | Action - off
2024-02-06 19:44:43.124 DEBUG (SyncWorker_8) [custom_components.entity_controller.motion_light_kitchen_lamp] on_enter_idle | Performing Action - Turning off
robchandhok commented 5 months ago

I'm not sure what you are talking about, @m90att ?

In my case, "debug on" means this line in configuration.yaml

custom_components.entity_controller: debug

I can't tell what behavior you are experiencing. Are you saying it stopped working for you as well? did you see the errors like this?

Cannot determine type of provided config value. Key: entities, Type: <class 'list'>, Value: ['light.front_door_light']

m90att commented 5 months ago

@robchandhok yes, it stopped working for me when I upgraded to 2024.2 beta. I came to the EC github page to see if an issue had been raised and that's how I got here. Reading your issue I understand that the config isn't loading if debug is off and that the workaround to get it to work is to "set custom_components.entity_controller: debug".

Having never set debug I referred to the HA Logger page and it suggested adding lines according to this format

logger:
  default: info
  logs:
    homeassistant.components.yamaha: critical
    custom_components.my_integration: critical

...so that's what I did. I expected this to fix the issue as yours did but it hasn't, so I pasted the logs I saw showing that the errors are still seen. I was just seeking clarification that what I had added to my configuration.yaml was correct.

robchandhok commented 5 months ago

Unfortunately I have re-tested, include a full hard restart of my entire PC running Home Assistant (HAOS) and even with debug on, it doesn't do the right thing. I misunderstood that the debug message about "initializing with this configuration" showing the correct config did NOT mean it was parsed correctly. There are still errors later in the log file (shown below). The controller that is created is basically empty. I'm back to thinking it's a Python update related bug where the type name has somehow changed.

2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `entity` to the config list
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key entity not provided by user. Skipping.
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `entities` to the config list
2024-02-06 12:41:54.223 ERROR (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Cannot determine type of provided config value. Key: entities, Type: <class 'list'>, Value: ['light.front_door_light']
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Control Entities: []
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `state_entities` to the config list
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key state_entities not provided by user. Skipping.
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Added Control Entities as state entities (default): []
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `sensor` to the config list
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key sensor not provided by user. Skipping.
2024-02-06 12:41:54.223 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `sensors` to the config list
2024-02-06 12:41:54.223 ERROR (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Cannot determine type of provided config value. Key: sensors, Type: <class 'list'>, Value: ['input_boolean.front_door_person_detected', 'binary_sensor.front_door_open']
2024-02-06 12:41:54.223 ERROR (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] No sensor entities defined. You must define at least one sensor entity.
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Sensor Entities: []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `override` to the config list
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key override not provided by user. Skipping.
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `overrides` to the config list
2024-02-06 12:41:54.224 ERROR (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Cannot determine type of provided config value. Key: overrides, Type: <class 'list'>, Value: ['binary_sensor.light_enough']
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] config_transition_behaviours :: Transition Behaviours: {'on_enter_active': 'on',
 'on_enter_blocked': 'ignore',
 'on_enter_constrained': 'ignore',
 'on_enter_idle': 'off',
 'on_enter_overridden': 'ignore',
 'on_exit_active': 'ignore',
 'on_exit_blocked': 'ignore',
 'on_exit_constrained': 'ignore',
 'on_exit_idle': 'ignore',
 'on_exit_overridden': 'ignore'}
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `trigger_on_deactivate` to the config list
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key trigger_on_deactivate not provided by user. Skipping.
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `trigger_on_activate` to the config list
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key trigger_on_activate not provided by user. Skipping.
2024-02-06 12:41:54.224 INFO (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Service data set up
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `ignored_event_sources` to the config list
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key ignored_event_sources not provided by user. Skipping.
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] add :: Adding config key `state_attributes_ignore` to the config list
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Config key state_attributes_ignore not provided by user. Skipping.
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Ignoring events (state changes) caused by the following entities): []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Ignoring state changes on the following attributes: []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] --------------------------------------------------
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller]        C O N F I G U R A T I O N   D U M P        
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] --------------------------------------------------
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Entity Controller       front_walk_controller
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Sensor Entities         []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Control Entities:       []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] State Entities:         []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Activate Trigger E.:    []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Deactivate Trigger E.:  []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Ignored state attrs:    []
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Light params:           {}
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller]         -------        Time        -------        
2024-02-06 12:41:54.224 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Start time:             None
2024-02-06 12:41:54.225 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] End time:               None
2024-02-06 12:41:54.225 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] DT Now:                 2024-02-06 12:41:54.225027-08:00
2024-02-06 12:41:54.226 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] datetime Now:           2024-02-06 12:41:54.226567
2024-02-06 12:41:54.226 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Next Sunrise:           2024-02-07 07:06:31.745820-08:00
2024-02-06 12:41:54.226 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Next Sunset:            2024-02-07 17:38:41.144275-08:00
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller]         -------        Sun         -------        
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Sunrise:                2024-02-06 07:06:31.745820-08:00
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Sunset:                 2024-02-06 17:38:41.144275-08:00
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Sunset Diff (to now): 4:56:46.917040
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Sunrise Diff(to now): 4:56:46.916960
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] 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'}
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] --------------------------------------------------
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Using DAY MODE parameters: {'delay': 600, 'service_data': None, 'service_data_off': None}
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] Entering idle
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] set_context :: name_hash: bfab6b
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] set_context :: context_id: ec_bfab6b_eeeb4885ec950f5d
2024-02-06 12:41:54.227 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] on_enter_idle | Performing Transition Behaviour
2024-02-06 12:41:54.228 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] on_enter_idle | Action - off
2024-02-06 12:41:54.228 DEBUG (SyncWorker_54) [custom_components.entity_controller.front_walk_controller] on_enter_idle | Performing Action - Turning off
robchandhok commented 5 months ago

Just reverted to 9.6.1, and the problem goes away. The big difference is that 9.7.1 has the YamlObjects checks, which fail in the beta.

@m90att if you want a workaround, you can use this call in the developer tools/services to revert to 9.6.1 (you have to use the hash of the version, not the tag, for some reason). And of course restart after.

service: update.install
data:
  version: 67c4158
target:
  entity_id: update.entity_controller_update
pageb018 commented 5 months ago

Having similar issue. Had to downgrade Home Assistant. Using the update.install service did not work to resolve the issue.

Does adding the custom_components.entity_controller: debug to config work? I did not try that.

robchandhok commented 5 months ago

@pageb018 Sorry but upon further review I realized I made a mistake - the debug setting has no impact on it working. When 2024.2 comes out (today I think) I will try and re-check with 9.7.1 of EC. I did mention the issue in the HA Discord for the beta, but no one had seen anything.

robchandhok commented 5 months ago

I am sorry to report the problem still exists in 2024.2.0 :-(

A quick fix would be to remove the type checking using YamlObject, which I'm happy to do, but hopefully @danobot can weigh in as this will affect everyone.

m90att commented 5 months ago

Thank you for your efforts @robchandhok I'll continue to use my back up HA automations until I hear more.

stefanoferrario commented 5 months ago

I am sorry to report the problem still exists in 2024.2.0 :-(

A quick fix would be to remove the type checking using YamlObject, which I'm happy to do, but hopefully @danobot can weigh in as this will affect everyone.

@robchandhok please could you tell me more about the quick fix?

robchandhok commented 5 months ago

Hi @stefanoferrario .

My read of the bug/failure is this line, the type comparison fails:

https://github.com/danobot/entity-controller/blob/f267df866f2db5dece44f1dd9d7c62c85bbd81cb/custom_components/entity_controller/__init__.py#L1657

This code was introduced in the fix for #316/#317, but I suspect that since the update to python in this release, something changed that makes the Type comparison incorrect. It could be a defect in YamlObjects() or something just changed. You can see in my earlier logs I posted that it falls through the if/elif... and reports that it doesn't think a list is a list :-)

Cannot determine type of provided config value. Key: entities, Type: <class 'list'>, Value: ['light.front_door_light']

If <class 'list'> isn't the same as YamlObjects.NodeListClass anymore, this would cause the issue.

Hope this is clear?

stefanoferrario commented 5 months ago

Thanks! As workaround I try downgrade to 9.4.0 version and the problem goes away

robchandhok commented 5 months ago

Yes, that code is not in 9.4.0

pageb018 commented 5 months ago

Thanks! As workaround I try downgrade to 9.4.0 version and the problem goes away

Can you outline the steps for downgrading?

stefanoferrario commented 5 months ago

@pageb018 as suggested by @robchandhok you can use this call in the developer tools/services to revert to previous version. And of course restart after.

service: update.install
data:
  version: 9f67d63
target:
  entity_id: update.entity_controller_update

As version you have to use 9f67d63 for 9.4.0 version.

m90att commented 5 months ago

Hi, how do I check what version is installed. I ran the update.intall service to downgrade and then restarted but I'm not seeing any difference. I'd like to check that it downgraded properly.

stefanoferrario commented 5 months ago

You can see installed version in HACS looking for Entity controller you will find out the hash code of the installed version

Screenshot 2024-02-08 alle 23 01 26

If downgrade is done you will receive also a notification of update available to ignore in setting section on HA.

kzaoaai commented 5 months ago

The Developer tools service call will not work unless you have experimental features enabled in HACS. As an alternative, change the setting "Number of releases to show" in HACS to more than 5, and version 9.4.0 will be available to re-download from HACS.

robchandhok commented 5 months ago

I have a fix BTW. Just putting the PR together.

robchandhok commented 5 months ago

If you are technical enough, you can grab the single changed file in this PR and test, but it fixes it cleanly for me.

https://github.com/danobot/entity-controller/pull/321

m90att commented 5 months ago

Thank you @stefanoferrario and @kzaoaai, I've learned something new 😃

robchandhok commented 5 months ago

If it is useful to anyone else or you want to TEST the fix, you can point HACS at this custom repository: https://github.com/robchandhok/entity-controller and use that.

ONLY DO THIS IF YOU ARE COMFORTABLE DOING IT

Steps are:

  1. Delete the current Entity Controller integration in HACS
  2. Add the custom repository new https://github.com/robchandhok/entity-controller
  3. Add Entity Controller again from the new repository (Should be at the top)
  4. Restart Home Assistant
  5. Your downloaded version in HACS should now show as 9.7.1-fork.1

It has the fixes merged so until the author has time to merge, this will work. After that you should delete the custom repository as I am not promising it will stick around forever.

Cheers!

M-Armen commented 5 months ago

If it is useful to anyone else or you want to TEST the fix, you can point HACS at this custom repository: https://github.com/robchandhok/entity-controller and use that.

ONLY DO THIS IF YOU ARE COMFORTABLE DOING IT

Steps are:

  1. Delete the current Entity Controller integration in HACS
  2. Add the custom repository new https://github.com/robchandhok/entity-controller
  3. Add Entity Controller again from the new repository (Should be at the top)
  4. Restart Home Assistant
  5. Your downloaded version in HACS should now show as 9.7.1-fork.1

It has the fixes merged so until the author has time to merge, this will work. After that you should delete the custom repository as I am not promising it will stick around forever.

Cheers!

Thank you for this, it is working for me again.

danobot commented 5 months ago

You can update to the latest version, I merged @robchandhok 's PR :)

M-Armen commented 5 months ago

ok now I am getting repository not found @robchandhok in HACS, want to delete your and install the master one again, any idea how?

robchandhok commented 5 months ago

Hi. Yes I delete my temporary release so there wasn't any confusion going forward. If you delete my repository from your "custom repositories " in HACS you will be able to see the main repository release again. Make sure you see 9.7.2!