A Home Assistant integration for managing household inventories.
or:
- Add this repository to HACS
- Install "Simple Inventory"
- Install the companion card: Simple Inventory Card
- Restart Home Assistant
- Copy
custom_components/simple_inventory/
to your Home Assistantcustom_components/
directory - Restart Home Assistant
This integration works best with the companion card: Simple Inventory Card
Add via Home Assistant UI: Settings → Devices & Services → Add Integration → Simple Inventory
The integration will create the inventory you specify as a device with two sensors:
sensor.whatever_inventory
sensor.whatever_items_expiring_soon
along with a second device with a single sensor.all_items_expiring_soon
.
Each additional inventory you create will be added as a device with a sensor for the items, and a sensor for the items expiring soon.
Each item you add to the inventory has a mandatory name, and several optional fields. You can set an expiration date, and an expiration date alert threshold. When the number of days left before expiration is equal to or below the threshold you set, the item will be added to the local inventory sensor for expiring items and to the global sensor.
The companion frontend card will show you two badges, one for items expiring soon, and one for expired items in the local inventory the card is assigned to. For now there is no global expiring items card - that sensor is mostly intended to build automations around.
Each item has an option to add it to a specific to-do list when the quantity remaining reaches a certain amount. The item will be added to the list when below, and removed from the list when incremented above.
This integration exposes the following actions:
add_item
remove_item
update_item
increment_item
decrement_item
which can be used in automations. For example, if I call simple_inventory.increment_item
with:
inventory_id: "01JYFPCDMBRBRK4MB3C26S2FKH"
name: "frozen pizzas"
amount: 1
it will increment the amount by 1. The amount field is how much you want to increment it by. You can get the inventory ID by going to Developer Tools → States, then filtering on “inventory” and you will see a list of your inventories and their IDs in the Attributes column.