diff --git a/src/data/preview.ts b/src/data/preview.ts index 26168ce9857d..1c3a24c7779f 100644 --- a/src/data/preview.ts +++ b/src/data/preview.ts @@ -1,6 +1,8 @@ import { UnsubscribeFunc } from "home-assistant-js-websocket"; import { HomeAssistant } from "../types"; +const HAS_CUSTOM_PREVIEW = ["template"]; + export interface GenericPreview { state: string; attributes: Record; @@ -22,4 +24,4 @@ export const subscribePreviewGeneric = ( }); export const previewModule = (domain: string): string => - ["template"].includes(domain) ? domain : "generic"; + HAS_CUSTOM_PREVIEW.includes(domain) ? domain : "generic";