homeassistant-lightwave2 icon indicating copy to clipboard operation
homeassistant-lightwave2 copied to clipboard

Integration fails to start up on HA restart (Public API)

Open araines opened this issue 2 years ago • 9 comments

Recently when I've been restarting home assistant, I've been left with failures for the LW integration to start up.

HACS LW Plugin Version: v3.5.15 HACS Version: 1.26.2 Home Assistant Version: 2022.7.5

The way I've been able to get things going again is by turning off the Public API, restarting to get things going. Then waiting a little while until I hit a problem where my energy monitor no longer reports updates to HA (I should raise a separate issue about that I guess!) then switch to the Public API. I think that has been the process anyway, I've been doing a lot of option/restart twiddling recently, so will be paying more attention now to give a more accurate bug report.

Logger: homeassistant.config_entries
Source: custom_components/lightwave2/__init__.py:83
Integration: Lightwave v2 (Smart Series) custom component ([documentation](https://github.com/bigbadblunt/homeassistant-lightwave2))
First occurred: 08:22:13 (1 occurrences)
Last logged: 08:22:13

Error setting up entry <REDACTED> for lightwave2
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 353, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/lightwave2/__init__.py", line 83, in async_setup_entry
    await link.async_get_hierarchy()
  File "/usr/local/lib/python3.10/site-packages/lightwave2/lightwave2.py", line 601, in async_get_hierarchy
    await self.async_update_featureset_states()
  File "/usr/local/lib/python3.10/site-packages/lightwave2/lightwave2.py", line 688, in async_update_featureset_states
    req = await self._async_postrequest("features/read", body)
  File "/usr/local/lib/python3.10/site-packages/lightwave2/lightwave2.py", line 550, in _async_postrequest
    return await req.json()
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1103, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://publicapi.lightwaverf.com/v1/features/read')

Full logs attached fulllogs.txt

araines avatar Jul 18 '22 07:07 araines