Code Monkey home page Code Monkey logo

bibliotek_dk's People

Contributors

j-lindvig avatar larsalthof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bibliotek_dk's Issues

Possibility for card creation

Hi,

I have tried adding the dashboard.yaml to a new dashboard but no infor is being displayed. My end goal is to create a card showing the titles of the books I have borrowed at the moment, but I don't know how to filter the information out.

An alternative would also be to show eReolen loans as a seperate line to keep them seperated - is that possible?

BR Michael

Sort fails if loan does not have an expiry date

When a loan does not have an expiry date, the variable defaults to "None", which can't be sorted. Line 184 in library_api.py. Most likely the same will happen in line 194.
Problem is seen with audiobooks on eReolen.
image

Suggest to default the dates to a 100 years in the future or something ridiculous.

No longer working after last HA update

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
`

Integration is not loading

I just added the custom repository to HACS and restarted HA and all looks well and good. That is, until I try to add it under Integrations, then the launch screens shows and just keeps spinning with no end in sight. Any tips on how to proceed, or is this because something was deprecated in the last HA update as mentioned in one of the other issues?

BR Michael

Problems with missing / unavailable entities

Hej Jacob

Got the following :

Denne fejl stammer fra en brugerdefineret integration.

Logger: custom_components.bibliotek_dk.sensor
Source: custom_components/bibliotek_dk/library_api.py:189
Integration: Bibliotek (documentation, issues)
First occurred: 09.57.25 (1 occurrences)
Last logged: 09.57.25

Unexpected error fetching sensor data: 'NoneType' object has no attribute 'split'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 195, 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 538, in fetchDebts
obj.title, obj.creators, obj.type = self._getMaterialInfo(material)
File "/config/custom_components/bibliotek_dk/library_api.py", line 189, in _getMaterialInfo
materialTitle = material.h3.string.split("(")[0].strip()
AttributeError: 'NoneType' object has no attribute 'split'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.