1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-04 04:55:21 +02:00

docs: Update rest call for home assistant (#4341)

This commit is contained in:
Nicole Zeckner 2024-10-09 22:30:41 -04:00 committed by GitHub
parent 8379e3565f
commit 4e4bc1b542
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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. Make sure the url and port (`http://mealie:9000` ) matches your installation's address and _API_ port.
```yaml ```yaml
- platform: rest rest:
resource: "http://mealie:9000/api/households/mealplans/today" - resource: "http://mealie:9000/api/groups/mealplans/today"
method: GET method: GET
name: Mealie todays meal headers:
headers: Authorization: Bearer <<API_TOKEN>>
Authorization: Bearer <<API_TOKEN>> scan_interval: 3600
value_template: "{{ value_json[0].recipe.name }}" sensor:
force_update: true - name: Mealie todays meal
scan_interval: 30 value_template: "{{ value_json[0]['recipe']['name'] }}"
``` force_update: true
unique_id: mealie_todays_meal
```yaml - name: Mealie todays meal ID
- platform: rest value_template: "{{ value_json[0]['recipe']['id'] }}"
resource: "http://mealie:9000/api/households/mealplans/today" force_update: true
method: GET unique_id: mealie_todays_meal_id
name: Mealie todays meal ID
headers:
Authorization: Bearer <<API_TOKEN>>
value_template: "{{ value_json[0].recipe.id }}"
force_update: true
scan_interval: 30
``` ```
#### 3. Create a Camera Entity #### 3. Create a Camera Entity