Add allowed options to entities struct so UI editor can still be used (#6823)

This commit is contained in:
Zack Barett 2020-09-08 04:37:49 -05:00 committed by GitHub
parent d7448ecb95
commit 100ba8edfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ import {
ShowViewConfig,
} from "../../../data/lovelace";
import { EntityConfig } from "../entity-rows/types";
import { optional, string, object, union } from "superstruct";
import { optional, string, object, union, boolean } from "superstruct";
import { EntityId } from "../common/structs/is-entity-id";
import { Icon } from "../common/structs/is-icon";
@ -81,6 +81,10 @@ export const entitiesConfigStruct = union([
entity: EntityId,
name: optional(string()),
icon: optional(Icon),
image: optional(string()),
secondary_info: optional(string()),
format: optional(string()),
state_color: optional(boolean()),
}),
EntityId,
]);