update ui + new dev config
This commit is contained in:
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)
|
||||
.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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -48,15 +48,17 @@ export const MetadataBox: FC<MetadataBoxProps> = (props) => {
|
||||
disabled={!isValidState}
|
||||
color={!isValidState ? "error" : "info"}
|
||||
/>
|
||||
{!isValidState && `Invalid state: '${props.state}'`}
|
||||
{!isValidState && props.state}
|
||||
</div>
|
||||
<div className="metadatabox--title">
|
||||
<span className="metadatabox--title--source">
|
||||
<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
|
||||
label={`@${props.source_file} (${props.source_file_type})`}
|
||||
label={`@${props.source_file} (${props.source_file_type}) - ${
|
||||
props.entityId ?? "n/a"
|
||||
}`}
|
||||
className="text-ellipsis"
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
Reference in new issue
Block a user