Sian-Lee-SA / Home-Assistant-Switch-Manager

Switch manager is a centralised component to handle button pushes for your wireless switches. This includes anything passed through the event bus. The component relies on switch blueprints which is easily made to allow GUI configuration of your switches and their button pushes. This helps remove clutter from the automations.
Other
222 stars 84 forks source link

Not compatible with HA 2023.12 #185

Closed tjorim closed 9 months ago

tjorim commented 9 months ago
Logger: homeassistant.setup
Source: setup.py:251
First occurred: 23:47:50 (1 occurrences)
Last logged: 23:47:50

Setup failed for custom integration 'switch_manager': Unable to import component: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 814, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/switch_manager/__init__.py", line 19, in <module>
    from homeassistant.config import _format_config_error
ImportError: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)
dualtronic commented 9 months ago

Problem unchanged with 2023.12.0b1

OriginalResponsibleUser commented 9 months ago

I also have this same problem on 2023.12.0b1

r11a commented 9 months ago

Same for me

Sian-Lee-SA commented 9 months ago

Fixed in (https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/releases/tag/v1.3.2)

dualtronic commented 9 months ago

Fixe does not work with 2023.12.0b1. I opened new issue.

D3SL commented 9 months ago

Upgraded today to the latest release of 2023.12 and it's broken for me as well.


Logger: homeassistant.setup
Source: setup.py:251
First occurred: 12:40:58 PM (1 occurrences)
Last logged: 12:40:58 PM
Setup failed for custom integration 'switch_manager': Unable to import component: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
    component = integration.get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 814, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/switch_manager/__init__.py", line 19, in <module>
    from homeassistant.config import _format_config_error
ImportError: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)
LarsNorgaard commented 9 months ago

Broken here too. Same error as above

D3SL commented 9 months ago

Interesting development: It took a few HA restarts for HACS to present an update for switch manager. The issue here may be some kind of delay with HACS recognizing that HA has updated and Switch Manager needs an update.