HandyHat/ha-hildebrandglow-dcc

Runtime error.

ColinRobbins opened this issue · 1 comments

Describe the bug
Seems to be working OK, but seen the following in the logs.

Version 1.0.2.

This error originated from a custom integration.

Logger: custom_components.hildebrandglow_dcc.sensor
Source: custom_components/hildebrandglow_dcc/sensor.py:194 
Integration: Hildebrand Glow (DCC) (documentation, issues) 
First occurred: 19:03:29 (2 occurrences) 
Last logged: 19:03:29

Unexpected exception: Request failed. Please open an issue
Traceback (most recent call last):
  File "/config/custom_components/hildebrandglow_dcc/sensor.py", line 181, in daily_data
    readings = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/glowmarkt/glowmarkt.py", line 50, in get_readings
    return self.client.get_readings(self.id, t_from, t_to, period, func, nulls)
  File "/usr/local/lib/python3.10/site-packages/glowmarkt/glowmarkt.py", line 248, in get_readings
    raise RuntimeError("Request failed")
RuntimeError: Request failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/hildebrandglow_dcc/sensor.py", line 194, in daily_data
    readings = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/glowmarkt/glowmarkt.py", line 50, in get_readings
    return self.client.get_readings(self.id, t_from, t_to, period, func, nulls)
  File "/usr/local/lib/python3.10/site-packages/glowmarkt/glowmarkt.py", line 248, in get_readings
    raise RuntimeError("Request failed")
RuntimeError: Request failed

This error message simply means the Glow API returned a non-200 status code. I've clarified this in v1.0.3
Thanks @ColinRobbins!