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

[Bug]: Error in Log: 'NoneType' object is not subscriptable #15

Open
klacol opened this issue Apr 20, 2024 · 2 comments
Open

[Bug]: Error in Log: 'NoneType' object is not subscriptable #15

klacol opened this issue Apr 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@klacol
Copy link
Owner

klacol commented Apr 20, 2024

What happened?

This error is reported in the log.

Version

latest

What version of Home Assistant are you seeing the problem on?

2024.4.3

Relevant log output

ogger: custom_components.clage_homeserver
Quelle: helpers/update_coordinator.py:315
Integration: CLAGE Homeserver (Dokumentation, Probleme)
Erstmals aufgetreten: 10:01:34 (11 Vorkommnisse)
Zuletzt protokolliert: 10:05:00

Unexpected error fetching clage_homeserver data: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/clage_homeserver/__init__.py", line 129, in fetch_states
    await self._hass.async_add_executor_job(homeserver.requestStatus)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/clage_homeserver/clage_homeserver.py", line 403, in requestStatus
    response = ClageHomeServerMapper().mapApiStatusResponse(status)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/clage_homeserver/clage_homeserver.py", line 29, in mapApiStatusResponse
    heater = status.get('devices')[NUMBER_OF_CONNECTED_HEATERS-1]
             ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
@klacol klacol added the bug Something isn't working label Apr 20, 2024
@klacol klacol self-assigned this Apr 20, 2024
@holgergrote
Copy link
Contributor

I also updated the integraion to the newest version (via HACS with Version 2024.4.3)
I did not get the warnings after a restart. I will check the next days the logs if ther will be something loged.

@holgergrote
Copy link
Contributor

I checked the logs again. Still no issues with the integration.

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