Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/mealie/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"integration_type": "service",
"iot_class": "local_polling",
"quality_scale": "silver",
"requirements": ["aiomealie==0.10.0"]
"requirements": ["aiomealie==0.10.1"]
}
5 changes: 3 additions & 2 deletions homeassistant/components/mealie/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ async def async_update_todo_item(self, item: TodoItem) -> None:
if list_item.display.strip() != stripped_item_summary:
update_shopping_item.note = stripped_item_summary
update_shopping_item.position = position
update_shopping_item.is_food = False
if update_shopping_item.is_food is not None:
update_shopping_item.is_food = False
update_shopping_item.food_id = None
update_shopping_item.quantity = 0.0
update_shopping_item.checked = item.status == TodoItemStatus.COMPLETED
Expand Down Expand Up @@ -249,7 +250,7 @@ async def async_move_todo_item(
mutate_shopping_item.note = item.note
mutate_shopping_item.checked = item.checked

if item.is_food:
if item.is_food or item.food_id:
mutate_shopping_item.food_id = item.food_id
mutate_shopping_item.unit_id = item.unit_id

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion requirements_test_all.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions tests/components/mealie/fixtures/get_recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
"unit": null,
"food": null,
"note": "130g dark couverture chocolate (min. 55% cocoa content)",
"isFood": true,
"disableAmount": false,
"display": "1 130g dark couverture chocolate (min. 55% cocoa content)",
"title": null,
"originalText": null,
Expand All @@ -87,8 +85,6 @@
"unit": null,
"food": null,
"note": "150g softened butter",
"isFood": true,
"disableAmount": false,
"display": "1 150g softened butter",
"title": null,
"originalText": null,
Expand Down
2 changes: 0 additions & 2 deletions tests/components/mealie/fixtures/get_shopping_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"unit": null,
"food": null,
"note": "Apples",
"isFood": false,
"disableAmount": true,
"display": "2 Apples",
"shoppingListId": "9ce096fe-ded2-4077-877d-78ba450ab13e",
"checked": false,
Expand Down
12 changes: 6 additions & 6 deletions tests/components/mealie/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@
'items': list([
dict({
'checked': False,
'disable_amount': True,
'disable_amount': None,
'display': '2 Apples',
'food_id': None,
'is_food': False,
'is_food': None,
'item_id': 'f45430f7-3edf-45a9-a50f-73bb375090be',
'label_id': None,
'list_id': '9ce096fe-ded2-4077-877d-78ba450ab13e',
Expand Down Expand Up @@ -433,10 +433,10 @@
'items': list([
dict({
'checked': False,
'disable_amount': True,
'disable_amount': None,
'display': '2 Apples',
'food_id': None,
'is_food': False,
'is_food': None,
'item_id': 'f45430f7-3edf-45a9-a50f-73bb375090be',
'label_id': None,
'list_id': '9ce096fe-ded2-4077-877d-78ba450ab13e',
Expand Down Expand Up @@ -483,10 +483,10 @@
'items': list([
dict({
'checked': False,
'disable_amount': True,
'disable_amount': None,
'display': '2 Apples',
'food_id': None,
'is_food': False,
'is_food': None,
'item_id': 'f45430f7-3edf-45a9-a50f-73bb375090be',
'label_id': None,
'list_id': '9ce096fe-ded2-4077-877d-78ba450ab13e',
Expand Down
8 changes: 4 additions & 4 deletions tests/components/mealie/snapshots/test_services.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@
'image': 'SuPW',
'ingredients': list([
dict({
'is_food': True,
'is_food': None,
'note': '130g dark couverture chocolate (min. 55% cocoa content)',
'quantity': 1.0,
'reference_id': 'a3adfe78-d157-44d8-98be-9c133e45bb4e',
Expand All @@ -1261,7 +1261,7 @@
'unit': None,
}),
dict({
'is_food': True,
'is_food': None,
'note': '150g softened butter',
'quantity': 1.0,
'reference_id': 'f6ce06bf-8b02-43e6-8316-0dc3fb0da0fc',
Expand Down Expand Up @@ -1763,7 +1763,7 @@
'image': 'SuPW',
'ingredients': list([
dict({
'is_food': True,
'is_food': None,
'note': '130g dark couverture chocolate (min. 55% cocoa content)',
'quantity': 1.0,
'reference_id': 'a3adfe78-d157-44d8-98be-9c133e45bb4e',
Expand All @@ -1777,7 +1777,7 @@
'unit': None,
}),
dict({
'is_food': True,
'is_food': None,
'note': '150g softened butter',
'quantity': 1.0,
'reference_id': 'f6ce06bf-8b02-43e6-8316-0dc3fb0da0fc',
Expand Down
2 changes: 0 additions & 2 deletions tests/components/mealie/test_todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ async def test_moving_todo_item(
display=None,
checked=False,
position=1,
is_food=False,
disable_amount=None,
quantity=2.0,
label_id=None,
food_id=None,
Expand Down
Loading