Add webhook trigger condition for automations
Per-automation webhook URL with auto-generated 128-bit hex token.
External services (Home Assistant, IFTTT, curl) can POST to
/api/v1/webhooks/{token} with {"action": "activate"|"deactivate"}
to control automation state — no API key required (token is auth).
Backend: WebhookCondition model, engine state tracking with
immediate evaluation, webhook endpoint, schema/route updates.
Frontend: webhook option in condition editor, URL display with
copy button, card badge, i18n for en/ru/zh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,7 @@ import {
|
||||
import {
|
||||
loadAutomations, openAutomationEditor, closeAutomationEditorModal,
|
||||
saveAutomationEditor, addAutomationCondition,
|
||||
toggleAutomationEnabled, deleteAutomation,
|
||||
toggleAutomationEnabled, deleteAutomation, copyWebhookUrl,
|
||||
expandAllAutomationSections, collapseAllAutomationSections,
|
||||
} from './features/automations.js';
|
||||
import {
|
||||
@@ -311,6 +311,7 @@ Object.assign(window, {
|
||||
addAutomationCondition,
|
||||
toggleAutomationEnabled,
|
||||
deleteAutomation,
|
||||
copyWebhookUrl,
|
||||
expandAllAutomationSections,
|
||||
collapseAllAutomationSections,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user