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:
@@ -607,6 +607,12 @@
|
||||
"automations.condition.mqtt.match_mode.contains": "包含",
|
||||
"automations.condition.mqtt.match_mode.regex": "正则表达式",
|
||||
"automations.condition.mqtt.hint": "当 MQTT 主题收到匹配的消息时激活",
|
||||
"automations.condition.webhook": "Webhook",
|
||||
"automations.condition.webhook.hint": "通过外部服务的 HTTP 请求激活(Home Assistant、IFTTT、curl 等)",
|
||||
"automations.condition.webhook.url": "Webhook URL:",
|
||||
"automations.condition.webhook.copy": "复制",
|
||||
"automations.condition.webhook.copied": "已复制!",
|
||||
"automations.condition.webhook.save_first": "请先保存自动化以生成 Webhook URL",
|
||||
"automations.scene": "场景:",
|
||||
"automations.scene.hint": "条件满足时激活的场景预设",
|
||||
"automations.scene.search_placeholder": "搜索场景...",
|
||||
|
||||
Reference in New Issue
Block a user