Skip to content

blaineventurine/simple_inventory

Repository files navigation

hacs_badge

Simple Inventory Integration

A Home Assistant integration for managing household inventories.

Installation

Via HACS (Recommended)

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

or:

  1. Add this repository to HACS
  2. Install "Simple Inventory"
  3. Install the companion card: Simple Inventory Card
  4. Restart Home Assistant

Manual Installation

  1. Copy custom_components/simple_inventory/ to your Home Assistant custom_components/ directory
  2. Restart Home Assistant

Frontend Card

This integration works best with the companion card: Simple Inventory Card

Configuration

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.

Expiration Dates

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.

Auto-add to To-do List

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.

Automations

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.

About

Inventory tracking as a Home Assistant sensor

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages