Skip to content

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

Closed
@robchandhok

Description

@robchandhok

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions