dingusdk / haihc-betatest

The Home Assistant IHC integration as a custom component. for beta testing
GNU General Public License v3.0
16 stars 7 forks source link

Failing to set-up integration #15

Open jlaitinen81 opened 1 year ago

jlaitinen81 commented 1 year ago

STROMFORS 6.1 by Schneider Electric Firmware: 2.7.190

Had the HA Integration but wanted to install the new Beta as I would really appreciate the IHC Viewer. Installed via HACS and deleted the yaml configuration, but the integration fails to load.

A clear and concise description of what the bug is.

Log Details (ERROR) Logger: homeassistant.config_entries Source: config_entries.py:399 First occurred: 08:05:26 (1 occurrences) Last logged: 08:05:26

Error setting up entry IHC Controller for ihc Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 176, in parse_yaml return _parse_yaml(SafeLoader, content, secrets) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 206, in _parse_yaml yaml.load(content, Loader=lambda stream: loader(stream, secrets)) # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/init.py", line 81, in load return loader.get_single_data() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 51, in get_single_data return self.construct_document(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 55, in construct_document data = self.construct_object(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 337, in _handle_mapping_tag nodes = loader.construct_pairs(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 155, in construct_pairs value = self.construct_object(value_node, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 370, in _construct_seq (obj,) = loader.construct_yaml_seq(node) ^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq data.extend(self.construct_sequence(node)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 129, in construct_sequence return [self.construct_object(child, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 129, in return [self.construct_object(child, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 337, in _handle_mapping_tag nodes = loader.construct_pairs(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 154, in construct_pairs key = self.construct_object(key_node, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 427, in construct_undefined raise ConstructorError(None, None, yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:homeassistant.const.Platform' in "/config/ihc_manual_setup.yaml", line 3, column 5

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 191, in _parse_yaml_pure_python return _parse_yaml(SafeLineLoader, content, secrets) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 206, in _parse_yaml yaml.load(content, Loader=lambda stream: loader(stream, secrets)) # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/init.py", line 81, in load return loader.get_single_data() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 51, in get_single_data return self.construct_document(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 55, in construct_document data = self.construct_object(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 337, in _handle_mapping_tag nodes = loader.construct_pairs(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 155, in construct_pairs value = self.construct_object(value_node, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 370, in _construct_seq (obj,) = loader.construct_yaml_seq(node) ^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 408, in construct_yaml_seq data.extend(self.construct_sequence(node)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 129, in construct_sequence return [self.construct_object(child, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 129, in return [self.construct_object(child, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 337, in _handle_mapping_tag nodes = loader.construct_pairs(node) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 154, in construct_pairs key = self.construct_object(key_node, deep=deep) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 100, in construct_object data = constructor(self, node) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/yaml/constructor.py", line 427, in construct_undefined raise ConstructorError(None, None, yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:homeassistant.const.Platform' in "/config/ihc_manual_setup.yaml", line 3, column 5

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ihc/init.py", line 56, in async_setup_entry await hass.async_add_executor_job(manual_setup, hass, controller_id) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ihc/manual_setup.py", line 120, in manual_setup yaml = load_yaml_config_file(yaml_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config.py", line 414, in load_yaml_config_file conf_dict = load_yaml(config_path, secrets) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 163, in load_yaml return parse_yaml(conf_file, secrets) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 183, in parse_yaml return _parse_yaml_pure_python(content, secrets) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/util/yaml/loader.py", line 194, in _parse_yaml_pure_python raise HomeAssistantError(exc) from exc homeassistant.exceptions.HomeAssistantError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object/apply:homeassistant.const.Platform' in "/config/ihc_manual_setup.yaml", line 3, column 5

jlaitinen81 commented 1 year ago

Just as a side note, the IHC Viewer works after the installation of this Beta even if the actual IHC Controller just states "Failed to load"

jlaitinen81 commented 1 year ago

Still following up with this. The manual setup process created a corrupted yaml file and when I deleted that and let the integration set-up automatically, all entities were populated correctly.

This is how the yaml looks like:

ihc: