Integrate and interact with your Grocy shopping list directly from your Home Assistant dashboard.
See the Issues page to report a bug or to add a feature request.
The image above was generated using Auto Entities Card, Card Mods Card and Custom Button Card.
This integration uses MQTT with auto discovery:
Installation is a multi-step process. Follow each of the following steps.
This integration is available in HACS (Home Assistant Community Store). You can click on
or install it manually as follows:
- In Home Assistant, go to HACS > Integrations
- Press the Explore & Add Repositories button
- Search for "Grocy" and choose this integration
- Press the Install this repository in HACS button
- Press the Install button
You have to provide an url
and an API key
to use this integration.
- Go to the manageapikeys page on Grocy and press the Add button
- Copy your Grocy main URL (
https://<url-of-your-grocy-installation>/
and your newly generated API key
Clik on
or install it manually as follows:
- In Home Assistant, go to Configuration > Integrations
- Press the Add Integration button
- Search for "Grocy" and click on this integration
- Follow the configuration process
Depending on the number of products you have in your Grocy instance, the sensors may take a while to be created and populated.
This integration will create as much sensors as you have products configured in your Grocy instance, but will also create 3 other sensors:
This sensor (sensor.products_shopping_list_with_grocy
) state is the current number of products you have in your Grocy instance.
If you checked the option during the configuration of the module to include more informations, you'll have all your products here too.
This sensor (sensor.shopping_list_shopping_list_with_grocy
) state is the current number of products you have in your shopping list on Grocy.
If you checked the option during the configuration of the module to include more informations, you'll have all your products here too.
This sensor (binary_sensor.updating_shopping_list_with_grocy
) show current status of list update.
This switch (switch.pause_update_shopping_list_with_grocy
) will prevent any updates from your Grocy instance to your Home Assistant.
It could be useful if you want to update several products at once or run a long script.
This integration provides 4 services
service: shopping_list_with_grocy.add_product
data:
product_id: sensor.shopping_list_with_grocy_<your product>
shopping_list_id: <id of your shopping list on Grocy> # Optional, default is list 1
note: "This is the note of the shopping list item..."
service: shopping_list_with_grocy.remove_product
data:
product_id: sensor.shopping_list_with_grocy_<your product>
shopping_list_id: <id of your shopping list on Grocy> # Optional, default is list 1
service: shopping_list_with_grocy.update_note
data:
product_id: sensor.shopping_list_with_grocy_<your product>
shopping_list_id: <id of your shopping list on Grocy> # Optional, default is list 1
note: "This is the note of the shopping list item..."
service: shopping_list_with_grocy.refresh_products
data: {}
In Grocy -> Manage master data -> Userfields, you can add custom fields on your products. You can now use that!
For example, if you want to create a custom sort, create a custom field in Grocy:
Entity: products
Name: customsort
Caption: Custom sort
Type: Number(decimal)
Show as column in tables: checked
then modify your dashboard to use that sort by replacing
sort:
method: friendly_name
with
sort:
method: attribute
attribute: userfields:customsort
numeric: true
There is probably an issue with your MQTT configuration, you have to create a user, MQTT no longer allows anonymous connections, please check this link
A card for this integration is available in HACS (Home Assistant Community Store). You can click on
or on Github : Shopping List with Grocy Card
Don't hesitate to ask for features or contribute your own pull request. ⭐