Skip to content

Instantly share code, notes, and snippets.

@andrew-codechimp
Created August 12, 2025 09:42
Show Gist options
  • Select an option

  • Save andrew-codechimp/8067c9721d35fd35840c6a256c99c8d4 to your computer and use it in GitHub Desktop.

Select an option

Save andrew-codechimp/8067c9721d35fd35840c6a256c99c8d4 to your computer and use it in GitHub Desktop.
HA Mealie get meal plans for today and tomorrow
template:
- trigger:
- platform: time_pattern
minutes: /10
action:
- action: mealie.get_mealplan
data:
config_entry_id: "YOUR_MEALIE_CONFIG_ENTITY_ID"
response_variable: result
sensor:
- name: "Breakfast today"
unique_id: mealie_breakfast_today
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "breakfast" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
- name: "Lunch today"
unique_id: mealie_lunch_today
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "lunch" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
- name: "Dinner today"
unique_id: mealie_dinner_today
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "dinner" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
- name: "Side today"
unique_id: mealie_side_today
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "side" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
- trigger:
- platform: time_pattern
minutes: /10
action:
- action: mealie.get_mealplan
data:
config_entry_id: "YOUR_MEALIE_CONFIG_ENTITY_ID"
start_date: "{{(as_timestamp(now())+(86400)) | timestamp_custom('%Y-%m-%d',true)}}"
end_date: "{{(as_timestamp(now())+(86400)) | timestamp_custom('%Y-%m-%d',true)}}"
response_variable: result
sensor:
- name: "Breakfast tomorrow"
unique_id: mealie_breakfast_tomorrow
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "breakfast" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
- name: "Lunch tomorrow"
unique_id: mealie_lunch_tomorrow
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "lunch" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
- name: "Dinner tomorrow"
unique_id: mealie_dinner_tomorrow
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "dinner" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
- name: "Side tomorrow"
unique_id: mealie_side_tomorrow
icon: mdi:silverware-variant
state: >
{% for meal in result.mealplan if meal.entry_type == "side" -%}
{{ meal.recipe['name'] if meal.recipe is not none else meal.title -}}
{{ ", " if not loop.last }}
{%- endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment