Ensure new grid card options don't break editor (#7762)

This commit is contained in:
Philip Allgaier 2020-11-21 21:40:27 +01:00 committed by GitHub
parent 17d227b142
commit ba505b15ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -12,7 +12,16 @@ import {
query,
TemplateResult,
} from "lit-element";
import { any, array, assert, object, optional, string } from "superstruct";
import {
any,
array,
assert,
object,
optional,
string,
boolean,
number,
} from "superstruct";
import { fireEvent, HASSDomEvent } from "../../../../common/dom/fire_event";
import { LovelaceCardConfig, LovelaceConfig } from "../../../../data/lovelace";
import { HomeAssistant } from "../../../../types";
@ -28,6 +37,8 @@ const cardConfigStruct = object({
type: string(),
cards: array(any()),
title: optional(string()),
square: optional(boolean()),
columns: optional(number()),
});
@customElement("hui-stack-card-editor")

View File

@ -216,7 +216,7 @@ export abstract class HuiElementEditor<T> extends LitElement {
<ul>
${this._warnings.map((warning) => html`<li>${warning}</li>`)}
</ul>
You can still edit your config in yaml.
You can still edit your config in YAML.
</div>
`
: ""}