Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Mealie ###
- # Today
- - platform: rest
- resource: "http://local_mealie:9000/api/households/mealplans"
- name: mealie_mealplan_day0
- scan_interval: 30
- headers:
- Authorization: !secret mealie_api_token
- params:
- start_date: >
- {{ now().strftime('%Y-%m-%d') }}
- end_date: >
- {{ now().strftime('%Y-%m-%d') }}
- json_attributes_path: "$.[0].recipe"
- json_attributes:
- - id
- - name
- - slug
- - image
- - title
- value_template: "{{ value_json['items'][0].date }}"
- - platform: rest
- resource: "http://local_mealie:9000/api/households/mealplans"
- name: mealie_mealplan_day0_title
- scan_interval: 30
- headers:
- Authorization: !secret mealie_api_token
- params:
- start_date: >
- {{ now().strftime('%Y-%m-%d') }}
- end_date: >
- {{ now().strftime('%Y-%m-%d') }}
- value_template: "{{ value_json['items'][0].title }}"
- # Tomorrow
- - platform: rest
- resource: "http://local_mealie:9000/api/households/mealplans"
- name: mealie_mealplan_day1
- scan_interval: 30
- headers:
- Authorization: !secret mealie_api_token
- params:
- start_date: >
- {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
- end_date: >
- {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
- json_attributes_path: "$.[0].recipe"
- json_attributes:
- - id
- - name
- - slug
- - image
- value_template: "{{ value_json['items'][0].date }}"
- - platform: rest
- resource: "http://local_mealie:9000/api/households/mealplans"
- name: mealie_mealplan_day1_title
- scan_interval: 30
- headers:
- Authorization: !secret mealie_api_token
- params:
- start_date: >
- {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
- end_date: >
- {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
- value_template: "{{ value_json['items'][0].title }}"
- # Day 2
- - platform: rest
- resource: "http://192.168.1.142:9090/api/households/mealplans"
- name: mealie_mealplan_day2
- scan_interval: 30
- headers:
- Authorization: !secret mealie_api_token
- params:
- start_date: >
- {{ (now() + timedelta(days = 2)).strftime('%Y-%m-%d') }}
- end_date: >
- {{ (now() + timedelta(days = 2)).strftime('%Y-%m-%d') }}
- json_attributes_path: "$.[0].recipe"
- json_attributes:
- - id
- - name
- - slug
- - image
- value_template: "{{ value_json['items'][0].date }}"
Advertisement
Add Comment
Please, Sign In to add comment