cagos

Untitled

Oct 23rd, 2024
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. ### Mealie ###
  2.  
  3. # Today
  4. - platform: rest
  5. resource: "http://local_mealie:9000/api/households/mealplans"
  6. name: mealie_mealplan_day0
  7. scan_interval: 30
  8. headers:
  9. Authorization: !secret mealie_api_token
  10. params:
  11. start_date: >
  12. {{ now().strftime('%Y-%m-%d') }}
  13. end_date: >
  14. {{ now().strftime('%Y-%m-%d') }}
  15. json_attributes_path: "$.[0].recipe"
  16. json_attributes:
  17. - id
  18. - name
  19. - slug
  20. - image
  21. - title
  22. value_template: "{{ value_json['items'][0].date }}"
  23.  
  24. - platform: rest
  25. resource: "http://local_mealie:9000/api/households/mealplans"
  26. name: mealie_mealplan_day0_title
  27. scan_interval: 30
  28. headers:
  29. Authorization: !secret mealie_api_token
  30. params:
  31. start_date: >
  32. {{ now().strftime('%Y-%m-%d') }}
  33. end_date: >
  34. {{ now().strftime('%Y-%m-%d') }}
  35. value_template: "{{ value_json['items'][0].title }}"
  36.  
  37. # Tomorrow
  38. - platform: rest
  39. resource: "http://local_mealie:9000/api/households/mealplans"
  40. name: mealie_mealplan_day1
  41. scan_interval: 30
  42. headers:
  43. Authorization: !secret mealie_api_token
  44. params:
  45. start_date: >
  46. {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
  47. end_date: >
  48. {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
  49. json_attributes_path: "$.[0].recipe"
  50. json_attributes:
  51. - id
  52. - name
  53. - slug
  54. - image
  55. value_template: "{{ value_json['items'][0].date }}"
  56.  
  57.  
  58. - platform: rest
  59. resource: "http://local_mealie:9000/api/households/mealplans"
  60. name: mealie_mealplan_day1_title
  61. scan_interval: 30
  62. headers:
  63. Authorization: !secret mealie_api_token
  64. params:
  65. start_date: >
  66. {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
  67. end_date: >
  68. {{ (now() + timedelta(days = 1)).strftime('%Y-%m-%d') }}
  69. value_template: "{{ value_json['items'][0].title }}"
  70.  
  71.  
  72. # Day 2
  73. - platform: rest
  74. resource: "http://192.168.1.142:9090/api/households/mealplans"
  75. name: mealie_mealplan_day2
  76. scan_interval: 30
  77. headers:
  78. Authorization: !secret mealie_api_token
  79. params:
  80. start_date: >
  81. {{ (now() + timedelta(days = 2)).strftime('%Y-%m-%d') }}
  82. end_date: >
  83. {{ (now() + timedelta(days = 2)).strftime('%Y-%m-%d') }}
  84. json_attributes_path: "$.[0].recipe"
  85. json_attributes:
  86. - id
  87. - name
  88. - slug
  89. - image
  90. value_template: "{{ value_json['items'][0].date }}"
  91.  
  92.  
  93.  
Tags: Mealie
Advertisement
Add Comment
Please, Sign In to add comment