This commit is contained in:
Home Assistant Version Control
2026-08-02 15:33:12 +00:00
parent 60dd13b52c
commit 2ce8792155
39 changed files with 1992 additions and 157 deletions
+15 -1
View File
@@ -154,6 +154,7 @@ WS_NOTIF_LIST_NOTIFY: Final = "taskmate/notifications/list_notify_service
WS_NOTIF_SET_STREAK_CUTOFF: Final = "taskmate/notifications/set_streak_cutoff"
WS_NOTIF_SET_ESCALATION: Final = "taskmate/notifications/set_escalation"
WS_NOTIF_SEND_TEST: Final = "taskmate/notifications/send_test"
WS_NOTIF_SET_NAV_URL: Final = "taskmate/notifications/set_nav_url"
# Calendar ICS feed (FEAT-10)
WS_CAL_GET_URL: Final = "taskmate/calendar/get_ics_url"
@@ -1909,6 +1910,7 @@ async def ws_notif_get_state(hass, connection, msg, coordinator):
"streak_at_risk_cutoff_time": c.storage.get_streak_at_risk_cutoff(),
"mandatory_escalation_reminder_minutes": c.storage.get_escalation_reminder_minutes(),
"mandatory_escalation_parent_minutes": c.storage.get_escalation_parent_minutes(),
"notification_nav_url": c.storage.get_setting("notification_nav_url", "/taskmate"),
},
}
connection.send_result(msg["id"], state)
@@ -2135,6 +2137,18 @@ async def ws_notif_send_test(hass, connection, msg, coordinator):
connection.send_result(msg["id"], {"sent": sent})
@websocket_api.websocket_command({
vol.Required("type"): WS_NOTIF_SET_NAV_URL,
vol.Optional("type_id"): vol.Any(str, None),
vol.Required("nav_url"): vol.All(str, vol.Length(max=200)),
})
@websocket_api.async_response
@_admin_only
async def ws_notif_set_nav_url(hass, connection, msg, coordinator):
await coordinator.notifications.set_nav_url(msg.get("type_id"), msg["nav_url"])
connection.send_result(msg["id"], {"ok": True})
# ---------------------------------------------------------------------------
# Calendar ICS feed (FEAT-10)
# ---------------------------------------------------------------------------
@@ -2323,7 +2337,7 @@ _COMMANDS = (
ws_notif_upsert_parent, ws_notif_delete_parent,
ws_notif_upsert_custom, ws_notif_delete_custom,
ws_notif_list_notify, ws_notif_set_streak_cutoff, ws_notif_send_test,
ws_notif_set_escalation,
ws_notif_set_escalation, ws_notif_set_nav_url,
ws_cal_get_url, ws_cal_regen_token,
)