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
206 stars 79 forks source link

New setup error #190

Closed dualtronic closed 7 months ago

dualtronic commented 7 months ago

I upgraded using the latest release (1.3.2-1) but fails setup and will not load, It requires 2023.12.0 (not beta). So it can only be installed manually, not via HACS. I am using core 2023.12.0b1 with operating System 11.2.rc2,

Error message below.

Logger: homeassistant.setup Source: setup.py:251 First occurred: 2:57:45 PM (1 occurrences) Last logged: 2:57:45 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 "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/switch_manager/init.py", line 19, in from homeassistant.config import _format_config_error ImportError: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)

sheepster-9k commented 7 months ago

I'm getting something similar

Logger: homeassistant.config_entries Source: config_entries.py:2077 First occurred: 10:32:55 AM (1 occurrences) Last logged: 10:32:55 AM

Error occurred loading flow for integration switch_manager: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)


2023-12-02 11:46:46.599 ERROR (MainThread) [homeassistant.setup] 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 "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/switch_manager/init.py", line 19, in from homeassistant.config import _format_config_error ImportError: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)


Core 2023.12.0b1 Supervisor 2023.11.6 Operating System 11.2.rc2 Frontend 20231130.0

sheepster-9k commented 7 months ago

I'm getting something similar

Logger: homeassistant.config_entries Source: config_entries.py:2077 First occurred: 10:32:55 AM (1 occurrences) Last logged: 10:32:55 AM

Error occurred loading flow for integration switch_manager: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)

2023-12-02 11:46:46.599 ERROR (MainThread) [homeassistant.setup] 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 "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/config/custom_components/switch_manager/init.py", line 19, in from homeassistant.config import _format_config_error ImportError: cannot import name '_format_config_error' from 'homeassistant.config' (/usr/src/homeassistant/homeassistant/config.py)

Core 2023.12.0b1 Supervisor 2023.11.6 Operating System 11.2.rc2 Frontend 20231130.0

I was able to correct this, uninstall reinstall was not completing even with latest updates, had to wipe out the integration manually and re-download

tjorim commented 7 months ago

_format_config_error means you have not installed version 1.3.2 or higher. (1.3.2-1 does not work but you can still download 1.3.2)

Sian-Lee-SA commented 7 months ago

I have gone into this in more detail at https://github.com/Sian-Lee-SA/Home-Assistant-Switch-Manager/pull/189. I do apologise for jumping the gun with the release though.