217 files
This commit is contained in:
@@ -144,6 +144,7 @@ def _build_task_summary(
|
||||
"archived_reason": task_data.get("archived_reason"),
|
||||
"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", []),
|
||||
"rotation_strategy": task_data.get("rotation_strategy"),
|
||||
"earliest_completion_days": task_data.get("earliest_completion_days"),
|
||||
"entity_slug": task_data.get("entity_slug"),
|
||||
@@ -436,6 +437,7 @@ def async_register_commands(hass: HomeAssistant) -> None:
|
||||
ws_get_budget_status,
|
||||
ws_get_settings,
|
||||
ws_get_statistics,
|
||||
ws_notify_user_targets,
|
||||
ws_schedule_preview,
|
||||
ws_subscribe,
|
||||
ws_test_notification,
|
||||
@@ -590,6 +592,7 @@ def async_register_commands(hass: HomeAssistant) -> None:
|
||||
websocket_api.async_register_command(hass, ws_get_settings)
|
||||
websocket_api.async_register_command(hass, ws_update_global_settings)
|
||||
websocket_api.async_register_command(hass, ws_test_notification)
|
||||
websocket_api.async_register_command(hass, ws_notify_user_targets)
|
||||
websocket_api.async_register_command(hass, ws_list_users)
|
||||
websocket_api.async_register_command(hass, ws_assign_user)
|
||||
websocket_api.async_register_command(hass, ws_tasks_by_user)
|
||||
@@ -605,3 +608,20 @@ def async_register_commands(hass: HomeAssistant) -> None:
|
||||
websocket_api.async_register_command(hass, ws_documents_update)
|
||||
websocket_api.async_register_command(hass, ws_documents_delete)
|
||||
websocket_api.async_register_command(hass, ws_documents_search)
|
||||
|
||||
|
||||
def foreign_part_resolver(hass):
|
||||
"""Callback for ``sanitize_consumes_parts``: which parts an entry owns.
|
||||
|
||||
Returns None for an entry that does not exist or is not a maintenance
|
||||
object, so a link to it is dropped rather than trusted.
|
||||
"""
|
||||
from ..const import CONF_PARTS, DOMAIN, GLOBAL_UNIQUE_ID
|
||||
|
||||
def _resolve(entry_id: str):
|
||||
entry = hass.config_entries.async_get_entry(entry_id)
|
||||
if entry is None or entry.domain != DOMAIN or entry.unique_id == GLOBAL_UNIQUE_ID:
|
||||
return None
|
||||
return set(entry.data.get(CONF_PARTS) or {})
|
||||
|
||||
return _resolve
|
||||
|
||||
Reference in New Issue
Block a user