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

Can't generate diagnose data #1469

Open
LarsK1 opened this issue Nov 15, 2024 · 1 comment
Open

Can't generate diagnose data #1469

LarsK1 opened this issue Nov 15, 2024 · 1 comment
Assignees
Labels
new bug incoming bug issue

Comments

@LarsK1
Copy link

LarsK1 commented Nov 15, 2024

Description

2024-11-15 08:45:28.501 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 17, in load_adapter
    self.hass, "custom_components.better_thermostat.adapters." + integration
    ^^^^^^^^^
AttributeError: 'HomeAssistant' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 280, in get
    data = await info.config_entry_diagnostics(hass, config_entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/diagnostics.py", line 22, in async_get_config_entry_diagnostics
    _adapter_name = await load_adapter(
                    ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 27, in load_adapter
    self.hass, "custom_components.better_thermostat.adapters.generic"
    ^^^^^^^^^
AttributeError: 'HomeAssistant' object has no attribute 'hass'
2024-11-15 08:45:31.152 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 17, in load_adapter
    self.hass, "custom_components.better_thermostat.adapters." + integration
    ^^^^^^^^^
AttributeError: 'HomeAssistant' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 280, in get
    data = await info.config_entry_diagnostics(hass, config_entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/diagnostics.py", line 22, in async_get_config_entry_diagnostics
    _adapter_name = await load_adapter(
                    ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 27, in load_adapter
    self.hass, "custom_components.better_thermostat.adapters.generic"
    ^^^^^^^^^
AttributeError: 'HomeAssistant' object has no attribute 'hass'
2024-11-15 08:45:35.793 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 17, in load_adapter
    self.hass, "custom_components.better_thermostat.adapters." + integration
    ^^^^^^^^^
AttributeError: 'HomeAssistant' object has no attribute 'hass'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 280, in get
    data = await info.config_entry_diagnostics(hass, config_entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/diagnostics.py", line 22, in async_get_config_entry_diagnostics
    _adapter_name = await load_adapter(
                    ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 27, in load_adapter
    self.hass, "custom_components.better_thermostat.adapters.generic"
    ^^^^^^^^^
AttributeError: 'HomeAssistant' object has no attribute 'hass'

Steps to Reproduce

  1. Try to create a diagnostic data for a entity.

Expected behavior:

Download file

Actual behavior:

Fails

Versions

BT: 1.7.0-beta1
HA: 2024.11.1

@phdoerfler
Copy link

I just ran into this bug as well. I was hoping I could figure out why my freshly added BT thermostat was shown as "unavailable". Until this is resolved, how do I best debug BT?

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

No branches or pull requests

3 participants