update ui + new dev config

This commit is contained in:
ari committed 2022-08-27 13:58:41 -04:00
1 parent ce142f9d84
commit e3c34eeae5
4 files changed
+9 -10

No files matched your search

Binary file not shown.
@@ -87,8 +87,8 @@ const genMapping = (
> = {}; > = {};
Object.entries(haEntities) Object.entries(haEntities)
.filter(([entityId, _]) => entityId.toLowerCase().startsWith("automation.")) .filter(([entityId, _]) => entityId.toLowerCase().startsWith("automation."))
.forEach(([entityId, entityData]) => { .forEach(([entityId, entityData], i) => {
const autoId = entityData.attributes.id; const autoId = entityData.attributes.id ?? `${entityData.state}-${i}`;
let title = entityData.attributes.friendly_name ?? ""; let title = entityData.attributes.friendly_name ?? "";
let description = ""; let description = "";
let issue: string | undefined = ["on", "off"].includes(entityData.state) let issue: string | undefined = ["on", "off"].includes(entityData.state)
@@ -28,10 +28,6 @@
max-width: calc(80% - 5em); max-width: calc(80% - 5em);
} }
.automation-manager--metadatabox .metadatabox--switch {
width: 5em;
}
.automation-manager--metadatabox .metadatabox--title .title { .automation-manager--metadatabox .metadatabox--title .title {
font-size: 1.25em; font-size: 1.25em;
font-weight: bold; font-weight: bold;
@@ -91,7 +87,8 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
text-align: center; text-align: center;
font-size: 0.75em; font-size: 0.5em;
width: 5em;
user-select: none; user-select: none;
max-width: var(--metadatabox--switch-width); max-width: var(--metadatabox--switch-width);
} }
@@ -48,15 +48,17 @@ export const MetadataBox: FC<MetadataBoxProps> = (props) => {
disabled={!isValidState} disabled={!isValidState}
color={!isValidState ? "error" : "info"} color={!isValidState ? "error" : "info"}
/> />
{!isValidState && `Invalid state: '${props.state}'`} {!isValidState && props.state}
</div> </div>
<div className="metadatabox--title"> <div className="metadatabox--title">
<span className="metadatabox--title--source"> <span className="metadatabox--title--source">
<Tooltip <Tooltip
title={`This automation is located in the file ${props.source_file} and is set up in your configuration.yaml file under the key ${props.configuration_key}.`} title={`This automation is located in the file ${props.source_file}. It's currently '${props.state}', it's entity id is '${props.entityId}' and it's automation id is '${props.id}'`}
> >
<Chip <Chip
label={`@${props.source_file} (${props.source_file_type})`} label={`@${props.source_file} (${props.source_file_type}) - ${
props.entityId ?? "n/a"
}`}
className="text-ellipsis" className="text-ellipsis"
/> />
</Tooltip> </Tooltip>