Integrating Paperless with Mushroom Template-Card: A Smooth Experience

Hey everyone! I wanted to share my recent success in integrating my Paperless setup with the Mushroom Template-Card on my Dashboard. It’s been a fantastic addition, and I thought you might appreciate seeing the results!

Paperless Integration

I set up two sensors to track the number of documents and those in the inbox. Here’s the code I used:

yaml

Sensor configuration

  • platform: rest
    name: Paperless Documents
    resource: http://192.168.178.200:8000/api/documents/
    method: GET
    headers:
    Authorization: Token [token]
    value_template: ‘{{ value_json.count }}’
    scan_interval: 300
    unique_id: paperless_documents
    unit_of_measurement: docs

  • platform: rest
    name: Paperless Inbox
    resource: http://192.168.178.200:8000/api/tags/6/
    method: GET
    headers:
    Authorization: Token [token]
    value_template: ‘{{ value_json.document_count }}’
    scan_interval: 300
    unique_id: paperless_inbox
    unit_of_measurement: docs

For the Mushroom Template-Card, I configured it to display the document counts dynamically. Here’s how I set it up:

yaml

Mushroom Card configuration

type: custom:mushroom-template-card
primary: There are {{ states(‘sensor.paperless_documents’) }} documents available
secondary: >-
{{ states(‘sensor.paperless_inbox’) }}
{% if states(‘sensor.paperless_inbox’) | int == 1 %} document is{% else %} documents are{% endif %} in the inbox
icon: >-
{% if states(‘sensor.paperless_inbox’) | int > 0 %} mdi:text-box-search
{% else %} mdi:text-box
{% endif %}
icon_color: >-
{% if states(‘sensor.paperless_inbox’) | int > 0 %} orange
{% else %} green
{% endif %}
tap_action:
action: url
url_path: ****
layout_options:
grid_columns: 4
grid_rows: auto

This integration has made managing my documents much more streamlined. I can now keep track of everything right from my Dashboard without having to open the Paperless interface separately. It’s a small but significant improvement in my daily routine!

I’m curious to hear how others have integrated Paperless or similar tools into their smart home setups. Have you found any particularly useful configurations or automations that enhance the experience? I’m always looking for ways to optimize my setup further!

Cheers, and happy integrating! :star2: