geertmeersman / cloudlibrary

Home Assistant integration for Cloud Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cloudLibrary

cloudLibrary for Home Assistant

A Home Assistant integration to monitor cloudLibrary

Features

cloudLibrary sensors for

  • current(): Fetches the current patron items.
  • history(): Retrieves the patron's borrowing history.
  • holds(): Retrieves the patron's holds.
  • saved(): Retrieves the patron's saved items.
  • featured(): Retrieves the patron's featured items.
  • email(): Retrieves the patron's email settings.
  • notifications(): Retrieves patron notifications (unread or archived).

maintainer buyme_coffee discord

MIT License hacs_badge

Open your Home Assistant instance and open the repository inside the Home Assistant Community Store.

GitHub issues Average time to resolve an issue Percentage of issues still open PRs Welcome

Hacs and Hassfest validation Python

manifest version github release github release date github last-commit github contributors github commit activity

Table of contents

Installation

Using HACS (recommended)

Click on this button:

Open your Home Assistant instance and open the repository inside the Home Assistant Community Store.

or follow these steps:

  1. Simply search for cloudLibrary in HACS and install it easily.
  2. Restart Home Assistant
  3. Add the 'cloudLibrary' integration via HA Settings > 'Devices and Services' > 'Integrations'
  4. Provide your Robonect account details

Manual

  1. Copy the custom_components/cloudlibrary directory of this repository as config/custom_components/cloudlibrary in your Home Assistant instalation.
  2. Restart Home Assistant
  3. Add the 'cloudLibrary' integration via HA Settings > 'Devices and Services' > 'Integrations'
  4. Provide your cloudLibrary account details

This integration will set up the following platforms.

Platform Description
cloudlibrary Home Assistant component for cloudLibrary

Configuration

The integration needs 3 inputs:

  • barcode: Your cloudLibrary login
  • pin: Your cloudLibrary password
  • library id: Your cloudLibrary ID (this you can fetch from the url when you connect to the website: https://ebook.yourcloudlibrary.com/library/< HERE YOU FIND THE LIBRARY ID >/mybooks/current)

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Troubleshooting

Enable debug logging

To enable debug logging, go to Settings -> Devices & Services and then click the triple dots for the cloudLibrary integration and click Enable Debug Logging.

enable-debug-logging

Disable debug logging and download logs

Once you enable debug logging, you ideally need to make the error happen. Run your automation, change up your device or whatever was giving you an error and then come back and disable Debug Logging. Disabling debug logging is the same as enabling, but now you will see Disable Debug Logging. After you disable debug logging, it will automatically prompt you to download your log file. Please provide this logfile.

disable-debug-logging

Lovelace examples

current-books

Show markdown code
type: markdown
title: Current books
content: >-
  <table> {% for item in
  states.sensor.cloudlibrary_current.attributes.patron_items -%}
      <tr>
          <td width="140">
              <img height="180px" alt="{{ item.title }}" src="{{ item.imageLink }}">
          </td>
          <td valign="top">
              <strong>{{ item.title }}</strong><br>
              {% for author in item.contributors -%}
                  {% if 'name' in author -%}
                      <u>{{ author.name }}</u>&nbsp;
                  {% endif -%}
              {% endfor -%}
              <br><br>
              {% if item.borrowedDate != None -%}
                  Borrowed on <strong>{{ item.borrowedDate }}</strong><br>
              {% endif -%}
              {% if item.returnedDate != None -%}
                  Returned on <strong>{{ item.returnedDate }}</strong><br>
              {% endif -%}
              {% if item.dueDate != None -%}
                  Due on <strong>{{ item.dueDate }}</strong><br>
              {% endif -%}
              {% if item.holdAvailableDate != None -%}
                  Available on <strong>{{ item.holdAvailableDate }}</strong><br>
              {% endif -%}
          </td>
      </tr>
  {% endfor %} </table>

About

Home Assistant integration for Cloud Library

License:MIT License


Languages

Language:Python 100.0%