firstof9 / lovelace-grocy-meal-plan-card

Meal Plan Card for Home Assistant Grocy integration
MIT License
14 stars 5 forks source link

Manage sections #13

Closed Deejayfool closed 1 year ago

Deejayfool commented 1 year ago

Hello, Since the version 4.5.0 of Grocy integration, we can now get the section properties of each meals.

For example, we have :

state_class: measurement
unit_of_measurement: Meal(s)
icon: mdi:silverware-variant
friendly_name: Grocy meal plan
meals:
  - id: 21
    day: '2022-08-12'
    recipe_id: 5
    recipe_servings: 1
    note: null
    recipe:
      id: 5
      name: Lasagne
      description: ''
      base_servings: 1
      desired_servings: 1
      picture_file_name: zmiey3moqzifo3ce60mhwdshutterstock_142426168-800x600[1].jpg
    section_id: 1
    section:
      id: 1
      name: Déjeuner
      sort_number: 1
      row_created_timestamp: '2022-05-03T13:29:29'
    type: recipe
    product_id: null
    picture_url: >-
      /api/grocy/recipepictures/em1pZXkzbW9xemlmbzNjZTYwbWh3ZHNodXR0ZXJzdG9ja18xNDI0MjYxNjgtODAweDYwMFsxXS5qcGc=
  - id: 22
    day: '2022-08-12'
    recipe_id: 4
    recipe_servings: 1
    note: null
    recipe:
      id: 4
      name: Salade
      description: ''
      base_servings: 1
      desired_servings: 1
      picture_file_name: q76i09c0ebr0i95f18ites5i34581-salade-nicoise-rapide[1].webp
    section_id: 2
    section:
      id: 2
      name: Dîner
      sort_number: 2
      row_created_timestamp: '2022-05-03T13:29:41'
    type: recipe
    product_id: null
    picture_url: >-
      /api/grocy/recipepictures/cTc2aTA5YzBlYnIwaTk1ZjE4aXRlczVpMzQ1ODEtc2FsYWRlLW5pY29pc2UtcmFwaWRlWzFdLndlYnA=
count: 2

Corresponding to this configuration : image

Is it possible to display those sections in the Grocy card too ?