Caution
This is a work in progress and made using GPT and basic knowledge.
The Pantry Tracker Card is a custom Lovelace card for Home Assistant designed specifically to work with the Pantry Tracker add-on. It provides a sleek and user-friendly interface for tracking and managing your pantry items directly from your Home Assistant dashboard.
This card displays categories and products, along with their quantities, and allows you to adjust quantities in real time using simple controls.
✨ Seamless Integration
Built to work exclusively with the Pantry Tracker Add-on, providing a unified experience for managing your inventory.
📦 Product and Category View
Easily browse categories, view products, and their current counts.
➕➖ Real-Time Updates
Update product counts (increase/decrease) directly from the card, with changes reflected within 30 seconds.
🖼️ Image Support
Displays product images for a more visual inventory management experience.
-
Pantry Tracker Add-on
Ensure that the Pantry Tracker Add-on is installed and running in Home Assistant. -
Custom Components for Pantry Tracker
Install the Pantry Tracker Custom Components. -
Restart HomeAssistant Ensure a full restart of HomeAssistant has taken place before installing (or restart after installing)
- Add the Pantry Tracker Card to Home Assistant through HACS
or
-
Manually copy
pantry-card.js
to the/www/
directory in your Home Assistant configuration. -
Add the card to your Lovelace resources:
- Navigate to Settings > Dashboards > Resources.
- Add a new resource:
- URL:
/local/pantry-card.js
- Resource type:
JavaScript Module
.
- URL:
-
Include the card in your Lovelace dashboard:
type: custom:pantry-card entity_prefix: sensor.product_ search: true
Below are the available configuration options for the Pantry Tracker Lovelace card:
Option | Description | Type | Default | Required |
---|---|---|---|---|
entity_prefix |
The prefix for your pantry product entities (e.g., sensor.product_ ). |
string |
N/A | Yes |
search |
Adds a search bar to filter products dynamically. | boolean |
false |
No |
category_filter |
Enables a dropdown to filter products by category. | boolean |
false |
No |
filter_categories |
An array of categories to exclude from the card. | list(string) |
[] |
No |
show_images |
Toggles whether to display product images in the card. | boolean |
true |
No |
empty_state_text |
Custom text/HTML to display when no products are available. | string/html |
N/A | No |
type: custom:pantry-card
entity_prefix: sensor.product_
search: true
category_filter: true
filter_categories:
- Water
- Snacks
show_images: true
empty_state_text: >
<p style="color: red; font-weight: bold;">No products found!</p>