A Home Assistant custom integration for Grocy - the self-hosted groceries & household management solution.
IMPORTANT INFORMATION
The integration supports Grocy version 3.2 and above.
At least Home Assistant version 2021.12 is required for the integration from v4.3.3 and above.
You must have Grocy software already installed and running. This integration only communicates with an existing installation of Grocy. You can install Grocy using the Grocy add-on or another installation method found at the Grocy website.
The easiest way to install this integration is with HACS.
- Install HACS if you don't have it yet
- In Home Assistant, go to
HACS→ 3 dot menu → "Custom repositories" - Add this repository URL:
https://github.com/iamkarlson/grocy - Select "Integration" as the type
- Find "Grocy custom component" in the list and click on it
- Click "Download" → "Download" → Restart Home Assistant
- Install the Grocy integration
Future integration updates will appear automatically within Home Assistant via HACS.
- Update Home Assistant to version 2025.02 or newer
- Download this repository
- Copy the
custom_components/grocyfolder into your Home Assistant'scustom_componentsfolder - Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration
- Search for "Grocy" and select it
- Configure according to your setup:
If you use the official Grocy add-on:
- Install Grocy from the add-on store if you haven't already
- In the add-on 'Configuration', set the Network port to
9192(see screenshot) - Save changes and restart the add-on
- Use port
9192when configuring the integration
- URL: Your Grocy instance URL (e.g.,
http://192.168.1.100orhttps://grocy.example.com)- Start with
http://orhttps:// - Do not include the port in the URL field
- Subdomains are supported
- Start with
- API Key: Generate in Grocy via the wrench icon → "Manage API keys"
- Port:
9192for Grocy add-on (without https)80for http or443for https (or your custom port)
- Verify SSL: Check if using HTTPS with valid certificate
All entities are disabled by default. Enable the entities you want to use in Home Assistant.
All entities are disabled from the start. You have to manually enable the entities you want to use in Home Assistant. You get a sensor each for chores, meal plan, shopping list, stock, tasks and batteries. You get a binary sensor each for overdue, expired, expiring and missing products and for overdue tasks, overdue chores and overdue batteries.
If you enable a certain entity (like todo), you should also enable a sensor. Otherwise, you may have errors in Home Assistant stating that the "entity is unknown".
The following services come with the integration. For all available options check the Developer Tools: Services within Home Assistant.
- Grocy: Add Generic (grocy.add_generic)
Adds a single object of the given entity type.
- Grocy: Add Product To Stock (grocy.add_product_to_stock)
Adds a given amount of a product to the stock.
- Grocy: Open Product (grocy.open_product)
Opens a given amount of a product in stock.
- Grocy: Track Battery (grocy.track_battery)
Tracks the given battery.
- Grocy: Complete Task (grocy.complete_task)
Completes the given task.
- Grocy: Consume Product From Stock (grocy.consume_product_from_stock)
Consumes a given amount of a product from the stock.
- Grocy: Execute Chore (grocy.execute_chore)
Executes the given chore with an optional timestamp and executor.
- Grocy: Consume Recipe (grocy.consume_recipe)
Consumes the given recipe.
- Grocy: Add Missing Products to Shopping List (grocy.add_missing_products_to_shopping_list)
Adds currently missing products to a given shopping list.
- Grocy: Remove Product in Shopping List (grocy.remove_product_in_shopping_list)
Removes a product in the given shopping list.
Before this was forked, translation was done using paid service lokalise.com. However, it's now just bunch of json files in custom_components/grocy/translations/ directory. Feel free to open a PR if there's an error in translation.
If you experience issues with the integration:
-
Enable debug logging by adding this to your
configuration.yaml:logger: default: info logs: pygrocy.grocy_api_client: debug custom_components.grocy: debug
-
Ensure compatibility: Use the latest version of the integration, Grocy, and Home Assistant
-
Check your setup: Verify your Grocy URL, API key, and port configuration
-
Get help:
Want to contribute to this project? Check out our CONTRIBUTING.md guide for:
- Setting up the development environment
- Debugging with VSCode
- Running development tasks
- Code structure overview
- Testing procedures
- Submission guidelines
We welcome contributions of all kinds! 🎉
The Grocy url should be in the form below (start with http:// or https://) and point to your Grocy instance. If you use a SSL certificate you should have https and also check the "Verify SSL Certificate" box. Do not enter a port in the url field. Subdomains are also supported, fill out the full url in the field.
Go to your Grocy instance. Navigate via the wrench icon in the top right corner to "Manage API keys" and add a new API key. Copy and paste the generated key.
It should work with for example a Duck DNS address as well, but you still have to access it via a port, and the above instructions for the url still apply.
- If you have configured the Grocy add-on as described, use port 9192 (without https). Either be sure the port is open in your router or use your internal Home Assistant address.
- If you have configured an external Grocy instance and not sure, use port 80 for http or port 443 for https. Unless you have set a custom port for Grocy.

