Grocy - Custom component and card(s)

Oh, this is very helpful! I didn’t think about the event bus. Thank you.

Is the chore_id required? I’m thinking about keeping a running count of completed chores for each day, perhaps by person, for which I’d need other data.

It’s only required if you need actions specific to a certain chore. For a daily count it’s not necessary. There is a done_by variable under service_data that can be used if you have cards set up for individual user IDs.

1 Like

Got it, so in my condition for the automation, I tried this, but no luck. The automation still ran when the done_by should have been 3.

trigger:
  - platform: event
    event_type: call_service
    event_data:
      domain: grocy
      service: execute_chore
  condition:
    - condition: template
      value_template: "{{ trigger.event.event_data.service_data.done_by == 5 }}"
  action:
    - service: counter.increment
      target:
        entity_id: counter.daily_chores
1 Like

You have a small typo in your trigger variable, event_data should just be data:

value_template: "{{ trigger.event.data.service_data.done_by == 5 }}"
2 Likes

Excuse the question, but does the “Shopping List with Grocy” integration require the regular shopping list integration? Are they interfering with each other if both are installed?

I’m asking because after I installed the Grocy addon and the Grocy Shopping List custom integration (without having the regular shopping list installed), the latter gave me an error “setup failed - retrying” (paraphrasing from German here…). I then installed the regular shopping list ex-post to see if that helps. But it hasn’t improved anything.

The Shopping List for Grocy custom integration is separate integration, unrelated to the integration and custom cards that are the topic of this thread.

After I install Grocy 0.20.0, integration is not working. I think it’s because it’s grocy v4. When will Grocy custom components support Grocy v4?

Same here,

“Unsupported product nesting level detected”

i came back to v19

Hi, how can i setup the Grocy expiring products delay to 2 days?
Explaining: I have products that will expire in 5 days, but i dont want the count showing all the time in the sensor, just those expiring in 2 days. Because almost every day i have expiring products (=<5days).
The addon is set to 2 days already, but i think thats not related.
Is there a variable that i can change?
Thanks

Love the icon for your card where did you get those and how did you add them? Very nice setup.

This maybe a crazy question but is there a way to take Grocy and make a dashboard to say setup in a kitchen to add and replace items, consume an item, and check shopping list? It would be nice to have a graphical display of all items in stock in say some type of card or clean dashboard. I have looked around but all I see is one for the chores or tasks. Grocy is a powerful tool and a nice kiosk type dashboard would be great but not a programmer so not even sure if it could be done or not. If someone out there has some cool design like this please share what you have and how you did it…thanks

Hey there,
im trying to send a service call to grocy to add an generic_task with a template for the name and cant get my head around. Perhaps someone of you knows a quick fix, i would be really happy:

My service call button-card looks like this:

tap_action:
  action: call-service
  service: grocy.add_generic
  data:
    entity_type: tasks
    data:
      name: '{{states.input_text.person_1_grocy_set_task.state}}'
      assigned_to_user_id: '4'
  target: {}

OR

tap_action:
  action: call-service
  service: grocy.add_generic
  data:
    entity_type: tasks
    data:
      name: '[[[ return states.input_text.person_1_grocy_set_task.state; ]]]'
      assigned_to_user_id: '4'

but the output always renders as task name:

{{states.input_text.person_1_grocy_set_task.state}}

Do i have a basic misunderstanding here, could also be a really dumb mistake :wink:

Bests

So the final solution was to have the button as a text entity and then set '[[[ return '${entity.state}']]]'

Hi Everyone,

I was wondering… my sensor for overdue products only gives an on or off state and doesn’t return the actual products that are overdue.

Maybe that’s just the way it works, but I can’t find any information about that.

I was just wondering exactly the same.

I am completely new to Grocy and stumbled across it by accident.
But I am very curious and installed it right away as docker image and then of course this integration.

I was wondering if it is possible (and simple enough for everybody in a household to use) to automatically get recipes suggestions somehow?
So, if the user selects Spaghetti, can he/she easily get recipe suggestions with Spaghetti?
Or is it really more of a chore, tasks, shopping list feature that includes inventory information?

My goal would be to get recipe suggestions and the actual recipe to make meals more creative/diverse :slight_smile:

Hi All,
I’m using the great custom component tool to integrate external Grocy with HA. Unfortunately, I encounter an issue with the “amount_aggregated” on the ‘binary_sensor.grocy_missing_products’,always being Null compared with the similar values available on the ‘sensor.grocy_stock’ entity. Any idea what I’m doing wrong?

sensor.grocy_stock info:
{‘name’: ‘Melk-Overzicht’, ‘id’: 139, ‘product_group_id’: 5, ‘available_amount’: 0.0, 'amount_aggregated’: 3.0, ‘amount_opened’: 0.0, ‘amount_opened_aggregated’: 0.0, ‘is_aggregated_amount’: True, ‘best_before_date’: ‘2024-03-14’, ‘barcodes’: , ‘product_barcodes’: , ‘amount_missing’: None, ‘is_partly_in_stock’: None, ‘default_quantity_unit_purchase’: None}

binary_sensor.grocy_missing_products info:
{‘name’: ‘Melk-Overzicht’, ‘id’: 139, ‘product_group_id’: 5, 'available_amount’: 0.0, 'amount_aggregated’: null, ‘amount_opened’: null, ‘amount_opened_aggregated’: null, ‘is_aggregated_amount’: null, ‘best_before_date’: null, ‘barcodes’: [], ‘product_barcodes’: [], ‘amount_missing’: 3.0, ‘is_partly_in_stock’: False, ‘default_quantity_unit_purchase’: None}

Thank you!

If Grocy can integrate with Home assistant todo entity, it would be great.

When checking things in todo entity, grocy can track when it was completed. And it can dynamically add chores based on interval defined in Grocy.

Any chance you solved this? Im having the same problem. Grocy just does NOT like having the port changed

I seemed to have finally got the Custom component installed, in that it accepted the my Base URL for API, and my Key, and the port… But every service that I enable just says “Unavailable”

The Log is showing this error:

Error fetching grocy data: Update failed: 1 validation error for MealPlanSectionResponse name none is not an allowed value (type=type_error.none.not_allowed)

I’d love some help if anyone has ant ideas.

Thank you.

FIXED - EDIT:
For anyone who has the same issue. Any meal in the meal plan that does not have a section will break the integration, even sensors not related to meal plans. Its not enough just to create a section, you have to select a section for every meal