From 4e4bc1b542b479a79bbd052e4484b5a8d17208f0 Mon Sep 17 00:00:00 2001 From: Nicole Zeckner Date: Wed, 9 Oct 2024 22:30:41 -0400 Subject: [PATCH] docs: Update rest call for home assistant (#4341) --- .../community-guide/home-assistant.md | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/docs/docs/documentation/community-guide/home-assistant.md b/docs/docs/documentation/community-guide/home-assistant.md index 5f35d80af..b88b30dbd 100644 --- a/docs/docs/documentation/community-guide/home-assistant.md +++ b/docs/docs/documentation/community-guide/home-assistant.md @@ -23,27 +23,21 @@ We will create sensors to get the name and ID of the first meal in today's meal Make sure the url and port (`http://mealie:9000` ) matches your installation's address and _API_ port. ```yaml -- platform: rest - resource: "http://mealie:9000/api/households/mealplans/today" - method: GET - name: Mealie todays meal - headers: - Authorization: Bearer <> - value_template: "{{ value_json[0].recipe.name }}" - force_update: true - scan_interval: 30 -``` - -```yaml -- platform: rest - resource: "http://mealie:9000/api/households/mealplans/today" - method: GET - name: Mealie todays meal ID - headers: - Authorization: Bearer <> - value_template: "{{ value_json[0].recipe.id }}" - force_update: true - scan_interval: 30 +rest: + - resource: "http://mealie:9000/api/groups/mealplans/today" + method: GET + headers: + Authorization: Bearer <> + scan_interval: 3600 + sensor: + - name: Mealie todays meal + value_template: "{{ value_json[0]['recipe']['name'] }}" + force_update: true + unique_id: mealie_todays_meal + - name: Mealie todays meal ID + value_template: "{{ value_json[0]['recipe']['id'] }}" + force_update: true + unique_id: mealie_todays_meal_id ``` #### 3. Create a Camera Entity