Hi thx again
If you use the code from above, I think I remember, there was a typo or such a thing (it’s been a while…). If it doesn’t work on your first try, please report back, than I’ll have a look at my file/automation.
Edit: with version 2024.8.1 ths issue underneath is fixed!
If someone is using this, there is an issue in 2024.8.0 regarding REST sensors, so this will not work for now (the sensor setup is blocked).
For what I read on the issue, it should be solved in 2024.8.1.
Thanks for this @my.spider.died. This is awesome.
It would not go well with the wife if she was adding recipes/items to the shopping list in Mealie while the automation is running. Items would disappear in the process. She would think she did something wrong and add them again. They would end up in HA multiple times.
My lovelace tab has
type: vertical-stack
cards:
- type: entities
entities:
- entity: automation.mealie_transfer_shopping_list
- type: todo-list
entity: todo.grocery
Giving
After explaining to her that she can add items in Mealie or in HA, she is loving it. Before heading to the store, she has to turn on the automation so it will do the transfers.
Then, I have the following automation that turns off the Transfer Shopping List Automation when we get ‘Empty List’.
alias: Mealie - Turn Off Transfer Automation
description: When the list is empty, turn off the transfer automation
trigger:
- platform: state
entity_id:
- sensor.mealie_shopping_list_items
to: Empty List
condition: []
action:
- action: homeassistant.turn_off
target:
entity_id: automation.mealie_transfer_shopping_list
data: {}
mode: single
Glad it’s working so well for you @jeffcrum!
Since writing the guide above, an official Mealie integration has been added in Home Assistant 2024.7, which includes a todo-list entity for each Mealie shopping list you have - I’d recommend using that going forward as a more reliable approach to getting the data into Home Assistant from Mealie, rather than the rest sensor solution I documented before. (I haven’t tried this myself yet though!)
But then you can still use the “Transfer Shopping List” automation to move it to another list if needed.
Well, of course it has been added. I am always behind the times. LOL!
Glad it was added officially. But, as the saying goes … If it ain’t broke … blah blah blah.
Hi
I’ve set up Mealie before, using the old way:
I’ve set up multiple rest sensors for mealie todays meal id and todays meal name
- for every day0 ,1,2,3,4,5 and 6 i have 2 rest sensors for name and date
Should i get rid of that and use somehow the new integration?
However, i have this in my dashboard
type: vertical-stack
cards:
- show_state: true
show_name: true
camera_view: auto
type: picture-entity
entity: sensor.mealie_todays_meal
camera_image: camera.mealie_recepten
name: Lunch
tap_action:
action: navigate
navigation_path: /lovelace-dashboard/mealie
- type: markdown
content: |-
<table>
{% for i in range(7) %}
{% set index = i|string %}
{% set meal_date = states("sensor.mealie_day" + index + "_date") %}
{% set meal_name = states("sensor.mealie_day" + index + "_name") %}
{% if meal_date != 'unknown' %}
<tr>
{{ ['zo','ma','di','wo','do','vr','za'][strptime(meal_date, "%Y-%m-%d").weekday()] }} {{ meal_name }}
{% endif %}
{% endfor %}
</table>
card_mod:
style:
ha-markdown:
$: |
a {
all:unset;
color:white ! important;
cursor: pointer ! important;
}
Should i adjust the dashboard?
Would love to hear what to do now.
Thx