custom-components / grocy

Custom Grocy integration for Home Assistant
Apache License 2.0
164 stars 50 forks source link

Meal plans do not display product information #258

Open Bovive opened 1 year ago

Bovive commented 1 year ago

Describe the bug This is in regard to adding a product to a meal plan and not a recipe. The integration does not display information about the product and provides null data for recipe information.

Expected behavior Have the sensor attributes provide the name and picture of the product so that it can be displayed in Home Assistant.

To Reproduce Steps to reproduce the behavior:

  1. Add a product as a meal plan item in Grocy
  2. See that there is little sensor data for that product.

General information to help debugging:

All integration sensors are enabled.

What is your installed versions of Home Assistant, Grocy and this integration? All latest release.

How do you have Grocy installed? Add-on or external? External

Additional context Example of current product sensor data:

state_class: measurement
meals: 
- id: 90
  day: '2023-01-05'
  recipe_id: null
  recipe_servings: 1
  note: null
  recipe: null
  section_id: 3
  section:
    id: 3
    name: Dinner
    sort_number: 3
    row_created_timestamp: '2022-11-29T18:19:54'
  type: product
  product_id: 46
  picture_url: null

Reference: Adding products instead of recipes breaks the meal plan card https://github.com/firstof9/lovelace-grocy-meal-plan-card/discussions/27#discussioncomment-4626461