Skip to content

Custom integration for Home Assistant, scraping loaner status from public libraries in Denmark

License

Notifications You must be signed in to change notification settings

J-Lindvig/Bibliotek_dk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bibliotek (library)

image

Home Assistant custom integration for all public libraries in Denmark

Installation

  1. Add this repository to your HACS as a manual integration. when the integration is finished and stable, I will add it to HACS' default.
  2. Download it in HACS
  3. Restart your Home Assistant

Configuration

All the configuration is done in GUI.

image

  1. Just add the integration on your integrationspage.
  2. Fill the form with the needed and optional information (required is bold, optional is not):
  • Name, added to the name of the integration, fx. "Faaborg-Midtfyn Bibliotekerne (Jacob Lindvig Henriksen)"
  • Municipality, Home Assistant will try to determine this from the coordinates of your home zone
  • CPR - number / loannumber
  • Pincode
  • Show eReolen (e-books and audiobooks), boolean (default true)
  • Show loans, boolean (default true)
  • Show reservations, boolean (default true)
  • Show reservations ready, boolean (default true)
  • Update interval, minutes (default 60)

Usage

With this custom integration for Home Assistant you will probably never be late again on your returns. The integrations creates 4 sensors:

General Library Sensor

In its current state (yes it is still in development), you will get 4 diffent sensors:

  • A general sensor with "days to return" in state and states on :
    • Loans
    • Reservations
    • Reservations ready for pickup
    • Debts
    • Your profile information and settings from the library
    • eBooks
    • eBooks quota
    • Audiobooks
    • Audiobooks quota

Loans sensor

  • A "Loans" sensor with number of loans as state and all available details on the materials (if supplied by the library):
    • Title
    • Creators
    • Type
    • Date of loan
    • Date of return
    • Whether the material is renewable
    • Link to the info on the website
    • URL to the bookcover

Reservations sensor

Almost identical to the Loans sensor with these differences:

  • Queue number
  • Date of reservation
  • Date of expiration
  • Pick-up location
  • Date of loan
  • Date of return
  • Whether the material is renewable

Reservations Ready sensor

Again almost identical to the prior Reservations sensor, but with these differences:

  • Reservation number
  • Date of available for pickup
  • Date of last chance for pickup
  • Pick-up location
  • Queue number

About

Custom integration for Home Assistant, scraping loaner status from public libraries in Denmark

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages