Integration fails to set up on 2024.1 #140

Open
opened 2024-01-03 22:55:16 +01:00 by finalbillybong · 4 comments
finalbillybong commented 2024-01-03 22:55:16 +01:00 (Migrated from github.com)

Logs below:

Logger: homeassistant.loader
Source: loader.py:842 
First occurred: 21:52:43 (2 occurrences) 
Last logged: 21:52:43

Unexpected exception importing platform custom_components.haier_hon.switch
Unexpected exception importing platform custom_components.haier_hon.binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/config/custom_components/haier_hon/switch.py", line 25, in <module>
    @dataclass
     ^^^^^^^^^
  File "/usr/local/lib/python3.11/dataclasses.py", line 1230, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/usr/local/lib/python3.11/dataclasses.py", line 1220, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dataclasses.py", line 1027, in _process_class
    _init_fn(all_init_fields,
  File "/usr/local/lib/python3.11/dataclasses.py", line 545, in _init_fn
    raise TypeError(f'non-default argument {f.name!r} '
TypeError: non-default argument 'key' follows default argument
Logger: homeassistant.setup
Source: setup.py:403 
First occurred: 21:52:43 (2 occurrences) 
Last logged: 21:52:43

Unable to prepare setup for platform 'hon.switch': Platform not found (Exception importing custom_components.haier_hon.switch).
Unable to prepare setup for platform 'hon.binary_sensor': Platform not found (Exception importing custom_components.haier_hon.binary_sensor).
Logs below: ``` Logger: homeassistant.loader Source: loader.py:842 First occurred: 21:52:43 (2 occurrences) Last logged: 21:52:43 Unexpected exception importing platform custom_components.haier_hon.switch Unexpected exception importing platform custom_components.haier_hon.binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 842, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 859, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1204, in _gcd_import File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/config/custom_components/haier_hon/switch.py", line 25, in <module> @dataclass ^^^^^^^^^ File "/usr/local/lib/python3.11/dataclasses.py", line 1230, in dataclass return wrap(cls) ^^^^^^^^^ File "/usr/local/lib/python3.11/dataclasses.py", line 1220, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dataclasses.py", line 1027, in _process_class _init_fn(all_init_fields, File "/usr/local/lib/python3.11/dataclasses.py", line 545, in _init_fn raise TypeError(f'non-default argument {f.name!r} ' TypeError: non-default argument 'key' follows default argument ``` ``` Logger: homeassistant.setup Source: setup.py:403 First occurred: 21:52:43 (2 occurrences) Last logged: 21:52:43 Unable to prepare setup for platform 'hon.switch': Platform not found (Exception importing custom_components.haier_hon.switch). Unable to prepare setup for platform 'hon.binary_sensor': Platform not found (Exception importing custom_components.haier_hon.binary_sensor). ```
willhaggan commented 2024-01-06 16:06:05 +01:00 (Migrated from github.com)

Same issue on 2024.1.1

Same issue on 2024.1.1
Andre0512 commented 2024-01-11 00:19:02 +01:00 (Migrated from github.com)

Hi, do you use the recent version? The error message makes no sense 🤔

Hi, do you use the recent version? The error message makes no sense :thinking:
Andre0512 commented 2024-01-11 02:14:26 +01:00 (Migrated from github.com)

Please check out v0.11.0-beta.1, maybe you can profit from another fix

Please check out `v0.11.0-beta.1`, maybe you can profit from another fix
finalbillybong commented 2024-01-11 11:21:12 +01:00 (Migrated from github.com)

Please check out v0.11.0-beta.1, maybe you can profit from another fix

Thank you but I’m getting same error with this version I am afraid.

Logger: homeassistant.config_entries
Source: config_entries.py:561
First occurred: 10:21:31 (2 occurrences)
Last logged: 10:21:31

Error unloading entry xxx@xxx.com for switch
Error unloading entry xxx@xxx.com for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 561, in async_unload
    result = await component.async_unload_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 105, in async_unload_entry
    return await component.async_unload_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 203, in async_unload_entry
    raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:507
Integration: Sensor (documentation, issues)
First occurred: 10:19:36 (1 occurrences)
Last logged: 10:19:36

Error adding entities for domain sensor with platform hon
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1276, in add_to_platform_finish
    await self.async_internal_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 303, in async_internal_added_to_hass
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity sensor.tumble_dryer_suggested_load cannot be added as the entity category is set to config
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:368
Integration: Sensor (documentation, issues)
First occurred: 10:19:36 (1 occurrences)
Last logged: 10:19:36

Error while setting up hon platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1276, in add_to_platform_finish
    await self.async_internal_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 303, in async_internal_added_to_hass
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Entity sensor.tumble_dryer_suggested_load cannot be added as the entity category is set to config
> Please check out `v0.11.0-beta.1`, maybe you can profit from another fix Thank you but I’m getting same error with this version I am afraid. ``` Logger: homeassistant.config_entries Source: config_entries.py:561 First occurred: 10:21:31 (2 occurrences) Last logged: 10:21:31 Error unloading entry xxx@xxx.com for switch Error unloading entry xxx@xxx.com for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 561, in async_unload result = await component.async_unload_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/switch/__init__.py", line 105, in async_unload_entry return await component.async_unload_entry(entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 203, in async_unload_entry raise ValueError("Config entry was never loaded!") ValueError: Config entry was never loaded! ``` ``` Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:507 Integration: Sensor (documentation, issues) First occurred: 10:19:36 (1 occurrences) Last logged: 10:19:36 Error adding entities for domain sensor with platform hon Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1276, in add_to_platform_finish await self.async_internal_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 303, in async_internal_added_to_hass raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: Entity sensor.tumble_dryer_suggested_load cannot be added as the entity category is set to config ``` ``` Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:368 Integration: Sensor (documentation, issues) First occurred: 10:19:36 (1 occurrences) Last logged: 10:19:36 Error while setting up hon platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform await asyncio.gather(*pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1276, in add_to_platform_finish await self.async_internal_added_to_hass() File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 303, in async_internal_added_to_hass raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: Entity sensor.tumble_dryer_suggested_load cannot be added as the entity category is set to config ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xiconfjs/hon#140
No description provided.