Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in log for _parse_old_config #76

Open
NINE78 opened this issue Nov 23, 2023 · 1 comment
Open

Exception in log for _parse_old_config #76

NINE78 opened this issue Nov 23, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@NINE78
Copy link

NINE78 commented Nov 23, 2023

Trying to run version 0.9. Virtual devices are failing to set up with following log messages. Seems like type mismatch somewhere (string index vs key/value struct index). Thanks!

2023-11-23 10:11:19.395 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 880, in async_init
flow, result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 908, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 389, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/virtual/config_flow.py", line 69, in async_step_import
UpgradeCfg.import_yaml(import_data)
File "/config/custom_components/virtual/cfg.py", line 403, in import_yaml
devices = _parse_old_config(devices, config.get(platform, []), str(platform))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/virtual/cfg.py", line 189, in _parse_old_config
if config[CONF_PLATFORM] != COMPONENT_DOMAIN:
~~~~~~^^^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'
2023-11-23 10:11:19.422 ERROR (MainThread) [homeassistant.components.light] The virtual platform for the light integration does not support platform setup. Please remove it from your config.

@twrecked twrecked self-assigned this Nov 23, 2023
@twrecked twrecked added the bug Something isn't working label Nov 23, 2023
@twrecked
Copy link
Owner

I guess I missed something on the import code.

Can you enable debug and try the latest alpha release? It might not fix it but it adds some debug. You can add this to the config to see the debug.

logger:
  default: info
  logs:
    custom_components.virtual: debug

You'll need to:

  • upgrade the component from HACS (or however you installed)
  • delete the current Virtual from the Integration page
  • restart

You'll see some logs with the words not dictionary= in them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants