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

Config UI is broken #14

Open
spinza opened this issue Aug 18, 2023 · 1 comment
Open

Config UI is broken #14

spinza opened this issue Aug 18, 2023 · 1 comment

Comments

@spinza
Copy link

spinza commented Aug 18, 2023

Browsing to Settings/Devices & Integrations/Home and then clicking on CONFIGURE results in a error:
image
The following errors are shown on the console:

2023-08-18 23:50:32.588 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/home/louis/source/ha_core/venv/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/venv/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/venv/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/decorators.py", line 63, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/config/config_entries.py", line 216, in post
    return await super().post(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/helpers/data_entry_flow.py", line 85, in post
    result = self._prepare_result_json(result)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/homeassistant/helpers/data_entry_flow.py", line 44, in _prepare_result_json
    data["data_schema"] = voluptuous_serialize.convert(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/venv/lib/python3.11/site-packages/voluptuous_serialize/__init__.py", line 40, in convert
    pval = convert(value, custom_serializer=custom_serializer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/louis/source/ha_core/venv/lib/python3.11/site-packages/voluptuous_serialize/__init__.py", line 120, in convert
    if issubclass(schema, Enum):
       ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: issubclass() arg 1 must be a class
@RAY8180
Copy link

RAY8180 commented Sep 19, 2023

CONF_QOS is the issue in the UI it uses mqtt.valid_qos_schema as type but this is later not handled by the config validator.
An option is to change this to cv.string and later convert it to a int value or enable the config validator to handle mqtt.valid_qos_schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants