257 files
This commit is contained in:
@@ -27,6 +27,7 @@ from ..const import (
|
||||
)
|
||||
from ..helpers.aggregate import get_object_entries, get_runtime_data, get_store, is_object_entry, object_name, task_entity_id
|
||||
from ..helpers.aggregate import object_slug as aggregate_object_slug
|
||||
from ..helpers.parts import MAX_CONSUME_QUANTITY
|
||||
from ..helpers.phases import current_phase_summary
|
||||
from ..helpers.ws_errors import send_translated_error
|
||||
|
||||
@@ -66,7 +67,7 @@ USED_PARTS_FIELD: Final[vol.Any] = vol.Any(
|
||||
vol.Required("part_id"): ID_FIELD,
|
||||
vol.Optional("entry_id"): ID_FIELD,
|
||||
vol.Optional("quantity", default=1): vol.All(
|
||||
vol.Any(int, float), vol.Coerce(float), vol.Range(min=0.01, max=999)
|
||||
vol.Any(int, float), vol.Coerce(float), vol.Range(min=0.01, max=MAX_CONSUME_QUANTITY)
|
||||
),
|
||||
}
|
||||
)
|
||||
@@ -230,6 +231,10 @@ def _build_task_summary(
|
||||
"archived": task_data.get("archived_at") is not None,
|
||||
"archived_at": task_data.get("archived_at"),
|
||||
"archived_reason": task_data.get("archived_reason"),
|
||||
# #193: this task's own pause (a paused OBJECT is on the object).
|
||||
"paused": task_data.get("paused_at") is not None,
|
||||
"paused_at": task_data.get("paused_at"),
|
||||
"paused_until": task_data.get("paused_until"),
|
||||
"responsible_user_id": task_data.get("responsible_user_id"),
|
||||
"assignee_pool": task_data.get("assignee_pool", []),
|
||||
"required_completion_fields": task_data.get("required_completion_fields", []),
|
||||
@@ -808,9 +813,11 @@ def async_register_commands(hass: HomeAssistant) -> None:
|
||||
ws_duplicate_task,
|
||||
ws_list_tasks,
|
||||
ws_move_task,
|
||||
ws_pause_task,
|
||||
ws_postpone_task,
|
||||
ws_quick_complete_task,
|
||||
ws_reset_task,
|
||||
ws_resume_task,
|
||||
ws_set_task_phase,
|
||||
ws_skip_task,
|
||||
ws_snooze_task,
|
||||
@@ -848,6 +855,8 @@ def async_register_commands(hass: HomeAssistant) -> None:
|
||||
websocket_api.async_register_command(hass, ws_move_task)
|
||||
websocket_api.async_register_command(hass, ws_archive_task)
|
||||
websocket_api.async_register_command(hass, ws_unarchive_task)
|
||||
websocket_api.async_register_command(hass, ws_pause_task)
|
||||
websocket_api.async_register_command(hass, ws_resume_task)
|
||||
websocket_api.async_register_command(hass, ws_list_tasks)
|
||||
websocket_api.async_register_command(hass, ws_task_history)
|
||||
websocket_api.async_register_command(hass, ws_complete_task)
|
||||
|
||||
Reference in New Issue
Block a user