mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Ensure new grid card options don't break editor (#7762)
This commit is contained in:
parent
17d227b142
commit
ba505b15ef
@ -12,7 +12,16 @@ import {
|
|||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
} from "lit-element";
|
} 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 { fireEvent, HASSDomEvent } from "../../../../common/dom/fire_event";
|
||||||
import { LovelaceCardConfig, LovelaceConfig } from "../../../../data/lovelace";
|
import { LovelaceCardConfig, LovelaceConfig } from "../../../../data/lovelace";
|
||||||
import { HomeAssistant } from "../../../../types";
|
import { HomeAssistant } from "../../../../types";
|
||||||
@ -28,6 +37,8 @@ const cardConfigStruct = object({
|
|||||||
type: string(),
|
type: string(),
|
||||||
cards: array(any()),
|
cards: array(any()),
|
||||||
title: optional(string()),
|
title: optional(string()),
|
||||||
|
square: optional(boolean()),
|
||||||
|
columns: optional(number()),
|
||||||
});
|
});
|
||||||
|
|
||||||
@customElement("hui-stack-card-editor")
|
@customElement("hui-stack-card-editor")
|
||||||
|
@ -216,7 +216,7 @@ export abstract class HuiElementEditor<T> extends LitElement {
|
|||||||
<ul>
|
<ul>
|
||||||
${this._warnings.map((warning) => html`<li>${warning}</li>`)}
|
${this._warnings.map((warning) => html`<li>${warning}</li>`)}
|
||||||
</ul>
|
</ul>
|
||||||
You can still edit your config in yaml.
|
You can still edit your config in YAML.
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
: ""}
|
: ""}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user