J-Lindvig / Bibliotek_dk

Custom integration for Home Assistant, scraping loaner status from public libraries in Denmark
GNU General Public License v3.0
9 stars 5 forks source link

No longer working after last HA update #4

Closed macsatcom closed 8 months ago

macsatcom commented 1 year ago

I think that it might be "_async_refresh" that is depreciated

`Unexpected error fetching sensor data: 'NoneType' object is not subscriptable

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 217, in _async_update_data return await self.update_method() File "/config/custom_components/bibliotek_dk/sensor.py", line 58, in async_update_data await hass.async_add_executor_job(myLibrary.update) 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/bibliotek_dk/library_api.py", line 90, in update self.user.debts, self.user.debtsAmount = self.fetchDebts() File "/config/custom_components/bibliotek_dk/library_api.py", line 629, in fetchDebts obj.id = self._getIdInfo(material)[0] File "/config/custom_components/bibliotek_dk/library_api.py", line 209, in _getIdInfo value = material.input["value"] TypeError: 'NoneType' object is not subscriptable `

larsalthof commented 8 months ago

This should be fixed #9 Please let me know, which kommune this is?