viktak / ha-cc-abalin-nameday

Home Assistant custom component for the abalin name day API
GNU General Public License v3.0
6 stars 2 forks source link

Sensor update fails #1

Closed attila123456 closed 3 years ago

attila123456 commented 3 years ago

One day after installing the component from HACS, it seems to have stopped working:

This error originated from a custom integration.

Logger: homeassistant.helpers.entity
Source: custom_components/abalin_nameday/sensor.py:62
Integration: abalin_nameday (documentation, issues)
First occurred: June 28, 2021, 12:06:50 PM (22 occurrences)
Last logged: 9:06:50 AM

Update for sensor.nameday_hu fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 350, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 558, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/abalin_nameday/sensor.py", line 98, in update
    self.data.update(self.type)
  File "/config/custom_components/abalin_nameday/sensor.py", line 62, in update
    self.data = json.loads(myNameDay.GetData())
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 42 (char 41)
viktak commented 3 years ago

Seems to me that the underlying service is currently down. :( I will update this as soon as I know more.

viktak commented 3 years ago

I spoke with the author of the web service and it turns out they had a temporary issue with their service provider. The issue is now resolved and the web service (and this HA component) is working now.