Fix lit warnings (#9204)

Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
Paulus Schoutsen
2021-05-18 15:01:43 -07:00
committed by GitHub
parent bc92c0b052
commit 1b9286db76
23 changed files with 161 additions and 129 deletions

View File

@@ -80,7 +80,8 @@ export class HaEntityToggle extends LitElement {
this.addEventListener("click", (ev) => ev.stopPropagation());
}
protected updated(changedProps: PropertyValues): void {
public willUpdate(changedProps: PropertyValues): void {
super.willUpdate(changedProps);
if (changedProps.has("stateObj")) {
this._isOn = isOn(this.stateObj);
}

View File

@@ -63,7 +63,8 @@ export class StateBadge extends LitElement {
`;
}
protected updated(changedProps: PropertyValues) {
public willUpdate(changedProps: PropertyValues) {
super.willUpdate(changedProps);
if (
!changedProps.has("stateObj") &&
!changedProps.has("overrideImage") &&