Grocy - Custom component and card(s)

Further development of the custom component for Grocy is now going on! The plan is to integrate more of Grocys functionality in sensors and also make more cards to display in Lovelace. I am quite new to python, and am doing my best with this, in my free time, so I don’t know how fast the pace will be in developing.

Feel free to look at the plan here. Please make suggestions and leave feedback, as well as report bugs if you find them.

The custom component for Grocy is available through recommended install via HACS.
Here’s the repo for the component, and here’s the repo for the Grocy chores and tasks card.

@firstof9 made a meal plan card that can be found here.

The latest changes include a new sensor for tasks, a new sensor for the meal plan, and a service for adding generic entities to Grocy.

Please note that discussion about the add-on for Grocy is available in this topic.


The chores card now also works with tasks.

I just released a card for tasks (basically a slightly altered chores card).
The readme just shows basic config for now. Also, the tasks are having a few bugs that needs sorting (without due date it crashes for example).
GitHub - isabellaalstrom/lovelace-grocy-tasks-card

Edit: Just got the brilliant opinion that I should have one card with the option for chores or tasks, and of course I am going to do that. So see this as a preview if you try it out.

Thanks for the cards! I’m curious if there is a possibility to synchronize the shopping_list component of HA with the shopping-lists in Grocy with an automation or script. Any thoughts about that?

1 Like

Great work, been waiting for this one!

1 Like

Great job and a nice integration for those who love self hosted apps like grocy.

Happy to know it’s actively in dev and that new things are coming up.

Thanks for this one.

1 Like

I would also like to be able to automate the shopping list with other shopping lists (for myself mainly Ica here in Sweden, which I always use), but the automating it self would be out of the scope for this component. But I would dare to say it should be possible to do, surely.

It’s not just me who is working on it either :slight_smile: There has been at least one other contributor the last week, and @SebRut is still working on the underlying python library! It’s fun to see that this is appreciated!

1 Like

I’m working on the meal plan functionality. If anyone else uses that I’d love feedback on what you would want in HA!


I asked on Twitter the other day too and got a response!

OK Since the OP had “feel free to make suggestions” here is mine.

Something I’d love to see is help managing the Expired, or soon to be expired medication in Home Assistant by location…

The current sensor is OK – it shows whether or not I have expired products, but it doesn’t let me filter by subproduct and location. Plus it would be nice to include those product images to show a virtual medicine cabinet.

I have my Grocy set up like this:

  • Product Group: Medication (I have another product group for alcohol but haven’t gotten around to inventory yet :slight_smile: )
  • Location: I have 2 medicine cabinets – one in my kitchen and one in the master bathrom
  • Then Product Name (and most default product fields)
  • A custom Category (Pain Releiver, Allergy, etc.
  • Expiration Date
  • A custom field indicating whether its kids medication or not.

While i’m using this for medicine, I guess the feature that would help me most is to be able to get a list of inventory by product group and location… Add or subtract inventory and see items that have or will expire soon.

As I’ve said, this works just fine in Grocy but I’d love to pull this data into Home Assistant

I don’t know if the api supports such filtering to be honest.

v2.0.0 is out in beta now, if you fancy trying it out. It’s mostly a huge rewrite and should take care of some of the issues as well as make the component more maintainable. You can now choose which sensors you like to have, and it doesn’t fail as much without good error messages if things are not as expected in Grocy.

If you have any feature requests, please make an issue for them so they’re easier to keep track of.
But do note that some things might be out of the scope for the component, and also some things need to be put in the Pygrocy api lib and/or Grocy api before they can be achieved - and I’m not the one responsible for those.

1 Like

I don’t know how many have tried the betas, but I have had the latest with no new issues. Thinking about releasing the refactoring for real now.


What is the correct Grocy Api url for us with Hassio Addon?

Using your local ip would be the best, or for example a duckdns address if the port is exposed that way.

Hello, i am fairly new with HA and grocy.
I got my black lovelace loading… problem tackled down to an grocy json error caused by anything on the shopping list.
I updated to the 2.00 beta 6 version and the error is gone.

Now i try to create some sort of button to consume products using the grocy service.

type: 'custom:button-card'
color_type: card
color: 'rgb(223, 255, 97)'
icon: 'mdi:food-apple'
size: 80%
  action: call-service
  service: grocy.consume_product_from_stock
    product_id: 77
    amount: 77
    transaction_type: CONSUME

But on tap it causes an 405 error. I found this:

There is also an log error:

Update of Shopping_list failed with 400 Client Error: Bad Request for url:

I use http:// on port 9192 and have inserted the api key.
Any idea, what i can try?

If I don’t remember wrong, all POST calls give a 400 error, for tracking.

As i read this was fixed, but it still occure on auth problems. So, why do i have an auth problem or what can i do to solve it?

Showing expiring products, tasks, chores is working fine.

oh… just saw that that issue was still open so I assumed it was not yet fixed :man_shrugging:

It’s fixed in beta. I need to release the beta to production soon, but I don’t have the time just yet.