From 93e8a213d36524c20983c304e2c507968b44557d Mon Sep 17 00:00:00 2001 From: mundschenk_at Date: Sun, 20 Oct 2024 22:27:04 +0200 Subject: [PATCH] Unify exposed actions for HA --- lib/extension/homeassistant.ts | 50 ++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index a0ddfa3f5b..d23bc90284 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -29,6 +29,15 @@ interface Discovered { discovered: boolean; } +interface ActionData { + action: string; + button?: string; + scene?: string; +} + +const ACTION_BUTTON_PATTERN: string = '^(?