From cc81239b9dcc5302203dfc715a58acd28d460a5d Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 15 Jul 2021 12:08:33 +0200 Subject: [PATCH] Add struct for `fire-dom-event` action (#9556) --- src/panels/lovelace/editor/structs/action-struct.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panels/lovelace/editor/structs/action-struct.ts b/src/panels/lovelace/editor/structs/action-struct.ts index d5b35e161a..cee149e6d2 100644 --- a/src/panels/lovelace/editor/structs/action-struct.ts +++ b/src/panels/lovelace/editor/structs/action-struct.ts @@ -7,6 +7,7 @@ import { array, literal, enums, + type, } from "superstruct"; const actionConfigStructUser = object({ @@ -47,6 +48,10 @@ const actionConfigStructNavigate = object({ confirmation: optional(actionConfigStructConfirmation), }); +const actionConfigStructCustom = type({ + action: literal("fire-dom-event"), +}); + export const actionConfigStructType = object({ action: enums([ "none", @@ -64,4 +69,5 @@ export const actionConfigStruct = union([ actionConfigStructUrl, actionConfigStructNavigate, actionConfigStructService, + actionConfigStructCustom, ]);