diff --git a/development_config.tar.gz b/development_config.tar.gz index 0611540..341f15a 100644 Binary files a/development_config.tar.gz and b/development_config.tar.gz differ diff --git a/webapp/src/components/AutomationManager/Loaded/automationDB.ts b/webapp/src/components/AutomationManager/Loaded/automationDB.ts index 7f44d0f..4b55dc2 100644 --- a/webapp/src/components/AutomationManager/Loaded/automationDB.ts +++ b/webapp/src/components/AutomationManager/Loaded/automationDB.ts @@ -87,8 +87,8 @@ const genMapping = ( > = {}; Object.entries(haEntities) .filter(([entityId, _]) => entityId.toLowerCase().startsWith("automation.")) - .forEach(([entityId, entityData]) => { - const autoId = entityData.attributes.id; + .forEach(([entityId, entityData], i) => { + const autoId = entityData.attributes.id ?? `${entityData.state}-${i}`; let title = entityData.attributes.friendly_name ?? ""; let description = ""; let issue: string | undefined = ["on", "off"].includes(entityData.state) diff --git a/webapp/src/components/AutomationManager/MetadataBox/index.css b/webapp/src/components/AutomationManager/MetadataBox/index.css index 9aa1854..fe6c17d 100644 --- a/webapp/src/components/AutomationManager/MetadataBox/index.css +++ b/webapp/src/components/AutomationManager/MetadataBox/index.css @@ -28,10 +28,6 @@ max-width: calc(80% - 5em); } -.automation-manager--metadatabox .metadatabox--switch { - width: 5em; -} - .automation-manager--metadatabox .metadatabox--title .title { font-size: 1.25em; font-weight: bold; @@ -91,7 +87,8 @@ justify-content: center; align-items: center; text-align: center; - font-size: 0.75em; + font-size: 0.5em; + width: 5em; user-select: none; max-width: var(--metadatabox--switch-width); } diff --git a/webapp/src/components/AutomationManager/MetadataBox/index.tsx b/webapp/src/components/AutomationManager/MetadataBox/index.tsx index e1d7728..c5ff714 100644 --- a/webapp/src/components/AutomationManager/MetadataBox/index.tsx +++ b/webapp/src/components/AutomationManager/MetadataBox/index.tsx @@ -48,15 +48,17 @@ export const MetadataBox: FC = (props) => { disabled={!isValidState} color={!isValidState ? "error" : "info"} /> - {!isValidState && `Invalid state: '${props.state}'`} + {!isValidState && props.state}