mirror of
https://github.com/thekiwismarthome/shopping-list-manager.git
synced 2026-08-30 11:34:41 +00:00
Compare commits
1 Commits
1f86b6f485
...
v2.6.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 19bf03a5c6 |
@@ -132,7 +132,8 @@ class ShoppingList:
|
|||||||
# Ownership: None = visible to all users; set = private to owner + allowed_users
|
# Ownership: None = visible to all users; set = private to owner + allowed_users
|
||||||
owner_id: Optional[str] = None
|
owner_id: Optional[str] = None
|
||||||
allowed_users: List[str] = field(default_factory=list)
|
allowed_users: List[str] = field(default_factory=list)
|
||||||
|
ha_todo_entity_id: Optional[str] = None
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
"""Convert to dictionary."""
|
"""Convert to dictionary."""
|
||||||
return asdict(self)
|
return asdict(self)
|
||||||
|
|||||||
@@ -341,6 +341,7 @@ async def websocket_create_list(
|
|||||||
vol.Optional("name"): str,
|
vol.Optional("name"): str,
|
||||||
vol.Optional("icon"): str,
|
vol.Optional("icon"): str,
|
||||||
vol.Optional("category_order"): [str],
|
vol.Optional("category_order"): [str],
|
||||||
|
vol.Optional("ha_todo_entity_id"): vol.Any(str, None),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@websocket_api.async_response
|
@websocket_api.async_response
|
||||||
@@ -364,7 +365,9 @@ async def websocket_update_list(
|
|||||||
update_data["icon"] = msg["icon"]
|
update_data["icon"] = msg["icon"]
|
||||||
if "category_order" in msg:
|
if "category_order" in msg:
|
||||||
update_data["category_order"] = msg["category_order"]
|
update_data["category_order"] = msg["category_order"]
|
||||||
|
if "ha_todo_entity_id" in msg:
|
||||||
|
update_data["ha_todo_entity_id"] = msg["ha_todo_entity_id"]
|
||||||
|
|
||||||
updated_list = await storage.update_list(list_id, **update_data)
|
updated_list = await storage.update_list(list_id, **update_data)
|
||||||
|
|
||||||
if updated_list is None:
|
if updated_list is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user