mealie-recipes / mealie

Mealie is a self hosted recipe manager and meal planner with a RestAPI backend and a reactive frontend application built in Vue for a pleasant user experience for the whole family. Easily add recipes into your database by providing the url and mealie will automatically import the relevant data or add a family recipe with the UI editor
https://docs.mealie.io
GNU Affero General Public License v3.0
6.78k stars 697 forks source link

Update mealie to HA documentation example code. #3556

Closed Shredder5262 closed 3 months ago

Shredder5262 commented 5 months ago

First Check

What is the issue you are experiencing?

in the documentation page https://docs.mealie.io/documentation/community-guide/home-assistant/ for the example rest api calls listed in home assistant, the existing lines... value_template: "{{ value_json[0].recipe.name }}" value_template: "{{ value_json[0].recipe.id }}"

work, but produce an error in the home assistant logs. On my own setup, I changed the lines to

value_template: "{{ value_json[0]['recipe']['name']}}" value_template: "{{ value_json[0]['recipe']['id']}}"

and so far i get the same result, but no error message in the logs.

Steps to Reproduce

  1. Create a home assistant rest sensor in Configuration.yaml file
  2. paste the mealie rest api call for todays meal `#Mealie API Calls
  3. Validate the yaml configuration and update/restart
  4. you should see the new sensors on the 'states' page that continue to pull in today's meal data
  5. Check logs for errors, there should no longer be an error when the rest api command runs.

Please provide relevant logs

not applicable.

Mealie Version

not applicable.

Deployment

Docker (Windows)

Additional Deployment Details

not applicable.

boc-the-git commented 5 months ago

@Shredder5262 can you please share the error message you're getting in HA, and what version of HA you're running? (I didn't see the actual error message here or in Discord) I'm running 2024.4.3, and using the syntax you're saying gives errors, but I haven't seen any in my logs.

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.