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

Entity not available: sensor.nameday_sk #4

Open jurajsimko opened 1 year ago

jurajsimko commented 1 year ago

From 12/2022 modul abalin-nameday not working in Home Assistant 2022.11.5.

Error log: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 493, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 715, in async_device_update await task File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, 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 "/usr/src/homeassistant/homeassistant/util/init.py", line 192, in wrapper result = method(args, **kwargs) File "/config/custom_components/abalin_nameday/sensor.py", line 62, in update self.data = json.loads(myNameDay.GetData()) File "/usr/local/lib/python3.10/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.10/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 1 year ago

The upstream component is not working at the moment.

viktak commented 1 year ago

The upstream component (https://nameday.abalin.net) seems to be working now. Waiting for a confirmation from the author before closing this issue.

jurajsimko commented 1 year ago

Entity is still not available.

viktak commented 1 year ago

Yes, I am aware of that. According to the maintainer of the actual API, the server is overloaded due to many using it. In the coming weeks, the DB will be migrated to a more powerful server which should solve the problem. Until then please be patient and/or donate for the server.

I will give an update when I will know more.

sonycim commented 1 year ago

Could you do some improvements in the addon? That would be nicer if the entity had some error message cases like this - instead of disappearing. This way flows, or automations could handle the situation. Now the nodered flow stops - because of the missing entity.

viktak commented 1 year ago

Yes, I understand it. However, at the moment I don't have the time to do that. If you feel like it, feel free to make the changes and submit a PR. If not, I'll do it some time in the future.