Render should always return a html template (#4612)
This commit is contained in:
parent
82fb622904
commit
04f8f0f74f
@ -39,7 +39,7 @@ class HcCast extends LitElement {
|
||||
@property() private askWrite = false;
|
||||
@property() private lovelaceConfig?: LovelaceConfig | null;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (this.lovelaceConfig === undefined) {
|
||||
return html`
|
||||
<loading-screen></loading-screen>>
|
||||
|
||||
@ -70,7 +70,7 @@ export class HcConnect extends LitElement {
|
||||
@property() private castManager?: CastManager | null;
|
||||
private openDemo = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (this.cannotConnect) {
|
||||
const tokens = loadTokens();
|
||||
return html`
|
||||
|
||||
@ -22,7 +22,7 @@ class HcLayout extends LitElement {
|
||||
@property() public connection?: Connection;
|
||||
@property() public user?: HassUser;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-card>
|
||||
<div class="layout">
|
||||
|
||||
@ -16,7 +16,7 @@ class HcDemo extends HassElement {
|
||||
@property() public lovelacePath!: string;
|
||||
@property() private _lovelaceConfig?: LovelaceConfig;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._lovelaceConfig) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ class HcLaunchScreen extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public error?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="container">
|
||||
<img
|
||||
|
||||
@ -22,7 +22,7 @@ class HcLovelace extends LitElement {
|
||||
|
||||
@property() public viewPath?: string | number;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const index = this._viewIndex;
|
||||
if (index === undefined) {
|
||||
return html`
|
||||
|
||||
@ -50,7 +50,7 @@ export class HcMain extends HassElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (this._showDemo) {
|
||||
return html`
|
||||
<hc-demo .lovelacePath=${this._lovelacePath}></hc-demo>
|
||||
|
||||
@ -27,7 +27,7 @@ class CastDemoRow extends LitElement implements LovelaceRow {
|
||||
// No config possible.
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (
|
||||
!this._castManager ||
|
||||
this._castManager.castState === "NO_DEVICES_AVAILABLE"
|
||||
|
||||
@ -6,7 +6,7 @@ import { actionHandler } from "../../../src/panels/lovelace/common/directives/ac
|
||||
import { ActionHandlerEvent } from "../../../src/data/lovelace";
|
||||
|
||||
export class DemoUtilLongPress extends LitElement {
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
${this.renderStyle()}
|
||||
${[1, 2, 3].map(
|
||||
|
||||
@ -36,7 +36,7 @@ class HassioAddonRepositoryEl extends LitElement {
|
||||
}
|
||||
);
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const repo = this.repo;
|
||||
const addons = this._getAddons(this.addons, this.filter);
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ class HassioAddonStore extends LitElement {
|
||||
await this._loadData();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._addons || !this._repos) {
|
||||
return html`
|
||||
<loading-screen></loading-screen>
|
||||
|
||||
@ -33,7 +33,7 @@ class HassioRepositoriesEditor extends LitElement {
|
||||
.sort((a, b) => (a.name < b.name ? -1 : 1))
|
||||
);
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const repos = this._sortedRepos(this.repos);
|
||||
return html`
|
||||
<div class="card-group">
|
||||
|
||||
@ -39,7 +39,7 @@ class HassioAddonAudio extends LitElement {
|
||||
@property() private _selectedInput!: null | string;
|
||||
@property() private _selectedOutput!: null | string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<paper-card heading="Audio">
|
||||
<div class="card-content">
|
||||
|
||||
@ -31,7 +31,7 @@ class HassioAddonConfig extends LitElement {
|
||||
@property() private _config!: string;
|
||||
@property({ type: Boolean }) private _configHasChanged = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<paper-card heading="Config">
|
||||
<div class="card-content">
|
||||
|
||||
@ -95,7 +95,7 @@ class HassioAddonInfo extends LitElement {
|
||||
@property() public addon!: HassioAddonDetails;
|
||||
@property() private _error?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
${
|
||||
this._computeUpdateAvailable
|
||||
|
||||
@ -31,7 +31,7 @@ class HassioAddonLogs extends LitElement {
|
||||
await this._loadData();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<paper-card heading="Log">
|
||||
${this._error
|
||||
|
||||
@ -44,7 +44,7 @@ class HassioAddonNetwork extends LitElement {
|
||||
this._setNetworkConfig();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ class HassioAddonView extends LitElement {
|
||||
@property() public route!: Route;
|
||||
@property() public addon?: HassioAddonDetails;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.addon) {
|
||||
return html`
|
||||
<paper-spinner-lite active></paper-spinner-lite>
|
||||
|
||||
@ -23,7 +23,7 @@ class HassioCardContent extends LitElement {
|
||||
@property() public iconClass?: string;
|
||||
@property() public icon = "hass:help-circle";
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<iron-icon
|
||||
class=${this.iconClass}
|
||||
|
||||
@ -16,7 +16,7 @@ import "@material/mwc-button";
|
||||
class HassioSearchInput extends LitElement {
|
||||
@property() private filter?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="search-container">
|
||||
<paper-input
|
||||
|
||||
@ -21,7 +21,7 @@ class HassioAddons extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() public addons?: HassioAddonInfo[];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="content card-group">
|
||||
<div class="title">Add-ons</div>
|
||||
|
||||
@ -24,7 +24,7 @@ class HassioDashboard extends LitElement {
|
||||
@property() public hassInfo!: HassioHomeAssistantInfo;
|
||||
@property() public hassOsInfo!: HassioHassOSInfo;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="content">
|
||||
<hassio-update
|
||||
|
||||
@ -32,7 +32,7 @@ export class HassioUpdate extends LitElement {
|
||||
@property() public supervisorInfo: HassioSupervisorInfo;
|
||||
@property() private _error?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const updatesAvailable: number = [
|
||||
this.hassInfo,
|
||||
this.supervisorInfo,
|
||||
|
||||
@ -32,7 +32,7 @@ class HassioMarkdownDialog extends LitElement {
|
||||
this._dialog.open();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-paper-dialog id="dialog" with-backdrop="">
|
||||
<app-toolbar>
|
||||
|
||||
@ -102,7 +102,7 @@ class HassioSnapshotDialog extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.snapshot) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ class HassioPagesWithTabs extends LitElement {
|
||||
@property() public hassInfo!: HassioHomeAssistantInfo;
|
||||
@property() public hassOsInfo!: HassioHassOSInfo;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const page = this._page;
|
||||
return html`
|
||||
<app-header-layout has-scrolling-region>
|
||||
|
||||
@ -23,7 +23,7 @@ class HassioIngressView extends LitElement {
|
||||
@property() public route!: Route;
|
||||
@property() private _addon?: HassioAddonDetails;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._addon) {
|
||||
return html`
|
||||
<hass-loading-screen></hass-loading-screen>
|
||||
|
||||
@ -76,7 +76,7 @@ class HassioSnapshots extends LitElement {
|
||||
await this._updateSnapshots();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="content">
|
||||
<div class="card-group">
|
||||
|
||||
@ -12,7 +12,7 @@ class HaBadgesCard extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public states?: HassEntity[];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.states) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ class SearchInput extends LitElement {
|
||||
this.shadowRoot!.querySelector("paper-input")!.focus();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="search-container">
|
||||
<paper-input
|
||||
|
||||
@ -255,9 +255,9 @@ export class HaAreaDevicesPicker extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._devices || !this._areas || !this._entities) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
const areas = this._getDevices(
|
||||
this._devices,
|
||||
|
||||
@ -83,7 +83,7 @@ export abstract class HaDeviceAutomationPicker<
|
||||
return `${this._automations[idx].device_id}_${idx}`;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (this._renderEmpty) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -203,9 +203,9 @@ export class HaDevicePicker extends SubscribeMixin(LitElement) {
|
||||
];
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.devices || !this.areas || !this.entities) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
const devices = this._getDevices(
|
||||
this.devices,
|
||||
|
||||
@ -37,9 +37,9 @@ class HaDevicesPicker extends LitElement {
|
||||
public pickedDeviceLabel?: string;
|
||||
@property({ attribute: "pick-device-label" }) public pickDeviceLabel?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
|
||||
const currentDevices = this._currentDevices;
|
||||
|
||||
@ -40,9 +40,9 @@ class HaEntitiesPickerLight extends LitElement {
|
||||
public pickedEntityLabel?: string;
|
||||
@property({ attribute: "pick-entity-label" }) public pickEntityLabel?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
|
||||
const currentEntities = this._currentEntities;
|
||||
|
||||
@ -145,7 +145,7 @@ class HaEntityPicker extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const states = this._getStates(
|
||||
this._hass,
|
||||
this.includeDomains,
|
||||
|
||||
@ -28,7 +28,7 @@ class HaEntityToggle extends LitElement {
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property() private _isOn: boolean = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.stateObj) {
|
||||
return html`
|
||||
<ha-switch disabled></ha-switch>
|
||||
|
||||
@ -52,7 +52,7 @@ export class HaStateLabelBadge extends LitElement {
|
||||
this.clearInterval();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const state = this.state;
|
||||
|
||||
if (!state) {
|
||||
|
||||
@ -28,7 +28,7 @@ export class StateBadge extends LitElement {
|
||||
@property({ type: Boolean }) public stateColor?: boolean;
|
||||
@query("ha-icon") private _icon!: HaIcon;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const stateObj = this.stateObj;
|
||||
|
||||
if (!stateObj) {
|
||||
|
||||
@ -85,9 +85,9 @@ export class HaAreaPicker extends SubscribeMixin(LitElement) {
|
||||
];
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._areas) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
return html`
|
||||
<vaadin-combo-box-light
|
||||
|
||||
@ -16,7 +16,7 @@ class HaAttributes extends LitElement {
|
||||
@property() public stateObj?: HassEntity;
|
||||
@property() public extraFilters?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ class HaCameraStream extends LitElement {
|
||||
this._attached = false;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.stateObj || !this._attached) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ export class HaFormTimePeriod extends LitElement implements HaFormElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<paper-time-input
|
||||
.label=${this.label}
|
||||
|
||||
@ -17,7 +17,7 @@ class HaLabelBadge extends LitElement {
|
||||
@property() public description?: string;
|
||||
@property() public image?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="badge-container">
|
||||
<div class="label-badge" id="badge">
|
||||
|
||||
@ -42,7 +42,7 @@ class HaMenuButton extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const hasNotifications =
|
||||
(this.narrow || this.hass.dockedSidebar === "always_hidden") &&
|
||||
(this._hasNotifications ||
|
||||
|
||||
@ -64,7 +64,7 @@ export class HaRelatedItems extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._related) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ class LocationEditor extends LitElement {
|
||||
this._ignoreFitToMap = this.location;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div id="map"></div>
|
||||
`;
|
||||
|
||||
@ -90,7 +90,7 @@ export class HaLocationsEditor extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div id="map"></div>
|
||||
`;
|
||||
|
||||
@ -31,7 +31,7 @@ const computeInitials = (name: string) => {
|
||||
class StateBadge extends LitElement {
|
||||
@property() public user?: User | CurrentUser;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const user = this.user;
|
||||
const initials = user ? computeInitials(user.name) : "?";
|
||||
return html`
|
||||
|
||||
@ -34,7 +34,7 @@ class HaUserPicker extends LitElement {
|
||||
.sort((a, b) => compare(a.name, b.name));
|
||||
});
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<paper-dropdown-menu-light .label=${this.label}>
|
||||
<paper-listbox
|
||||
|
||||
@ -48,7 +48,7 @@ class DialogConfigEntrySystemOptions extends LitElement {
|
||||
await this.updateComplete;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ class DataEntryFlowDialog extends LitElement {
|
||||
this._scheduleCenterDialog();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ class StepFlowAbort extends LitElement {
|
||||
@property()
|
||||
private step!: DataEntryFlowStepAbort;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<h2>
|
||||
${this.hass.localize(
|
||||
|
||||
@ -36,7 +36,7 @@ class StepFlowCreateEntry extends LitElement {
|
||||
@property()
|
||||
public devices!: DeviceRegistryEntry[];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const localize = this.hass.localize;
|
||||
|
||||
return html`
|
||||
|
||||
@ -28,7 +28,7 @@ class StepFlowExternal extends LitElement {
|
||||
@property()
|
||||
private step!: DataEntryFlowStepExternal;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const localize = this.hass.localize;
|
||||
|
||||
return html`
|
||||
|
||||
@ -40,7 +40,7 @@ class StepFlowForm extends LitElement {
|
||||
@property()
|
||||
private _errorMsg?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const step = this.step;
|
||||
const stepData = this._stepDataProcessed;
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ import "@polymer/paper-spinner/paper-spinner-lite";
|
||||
|
||||
@customElement("step-flow-loading")
|
||||
class StepFlowLoading extends LitElement {
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="init-spinner">
|
||||
<paper-spinner-lite active></paper-spinner-lite>
|
||||
|
||||
@ -59,7 +59,7 @@ class StepFlowPickHandler extends LitElement {
|
||||
);
|
||||
});
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const handlers = this._getHandlers(this.handlers, this.filter);
|
||||
|
||||
return html`
|
||||
|
||||
@ -44,7 +44,7 @@ class DialogDeviceRegistryDetail extends LitElement {
|
||||
await this.updateComplete;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ class DomainTogglerDialog extends LitElement {
|
||||
this._params = params;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ class DialogBox extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ class MoreInfoAutomation extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() public stateObj?: HassEntity;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ class MoreInfoCamera extends LitElement {
|
||||
this._attached = false;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._attached || !this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ class MoreInfoClimate extends LitElement {
|
||||
@property() public stateObj?: ClimateEntity;
|
||||
private _resizeDebounce?: number;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ class MoreInfoCounter extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() public stateObj?: HassEntity;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ class MoreInfoDefault extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() public stateObj?: HassEntity;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ class MoreInfoScript extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() public stateObj?: HassEntity;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ class MoreInfoSun extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() public stateObj?: HassEntity;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ class MoreInfoTimer extends LitElement {
|
||||
|
||||
@property() public stateObj?: TimerEntity;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ class MoreInfoWeather extends LitElement {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ export class HuiConfiguratorNotificationItem extends LitElement {
|
||||
|
||||
@property() public notification?: PersitentNotificationEntity;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.notification) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import "../../components/ha-card";
|
||||
|
||||
@customElement("notification-item-template")
|
||||
export class HuiNotificationItemTemplate extends LitElement {
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-card>
|
||||
<div class="header"><slot name="header"></slot></div>
|
||||
|
||||
@ -28,7 +28,7 @@ export class HuiNotificationItem extends LitElement {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.notification) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ export class HuiPersistentNotificationItem extends LitElement {
|
||||
|
||||
@property() public notification?: PersistentNotification;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.notification) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ class DialogZHADeviceInfo extends LitElement {
|
||||
this._dialog.open();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params || !this._device) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ class HassErrorScreen extends LitElement {
|
||||
@property()
|
||||
public error?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<hass-subpage>
|
||||
<div class="content">
|
||||
|
||||
@ -20,7 +20,7 @@ class HassLoadingScreen extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public narrow?: boolean;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<app-toolbar>
|
||||
${this.rootnav
|
||||
|
||||
@ -20,7 +20,7 @@ class HassSubpage extends LitElement {
|
||||
@property({ type: Boolean })
|
||||
public hassio = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="toolbar">
|
||||
<ha-paper-icon-button-arrow-prev
|
||||
|
||||
@ -38,11 +38,11 @@ class HomeAssistantMain extends LitElement {
|
||||
@property() public route?: Route;
|
||||
@property({ type: Boolean }) private narrow?: boolean;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const hass = this.hass;
|
||||
|
||||
if (!hass) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
|
||||
const sidebarNarrow = this._sidebarNarrow;
|
||||
|
||||
@ -10,7 +10,7 @@ import {
|
||||
|
||||
@customElement("loading-screen")
|
||||
class LoadingScreen extends LitElement {
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<paper-spinner-lite active></paper-spinner-lite>
|
||||
`;
|
||||
|
||||
@ -58,7 +58,7 @@ class NotificationManager extends LitElement {
|
||||
});
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-toast .noCancelOnOutsideClick=${this._noCancelOnOutsideClick}>
|
||||
${this._action
|
||||
|
||||
@ -50,7 +50,7 @@ class HaOnboarding extends litLocalizeLiteMixin(HassElement) {
|
||||
@property() private _loading = false;
|
||||
@property() private _steps?: OnboardingStep[];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const step = this._curStep()!;
|
||||
|
||||
if (this._loading || !step) {
|
||||
@ -79,6 +79,7 @@ class HaOnboarding extends litLocalizeLiteMixin(HassElement) {
|
||||
></onboarding-integrations>
|
||||
`;
|
||||
}
|
||||
return html``;
|
||||
}
|
||||
|
||||
protected firstUpdated(changedProps: PropertyValues) {
|
||||
|
||||
@ -16,7 +16,7 @@ class IntegrationBadge extends LitElement {
|
||||
@property() public badgeIcon?: string;
|
||||
@property({ type: Boolean, reflect: true }) public clickable = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="icon">
|
||||
<iron-icon .icon=${this.icon}></iron-icon>
|
||||
|
||||
@ -41,7 +41,7 @@ class OnboardingCoreConfig extends LitElement {
|
||||
@property() private _unitSystem!: ConfigUpdateValues["unit_system"];
|
||||
@property() private _timeZone!: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<p>
|
||||
${this.onboardingLocalize(
|
||||
|
||||
@ -28,7 +28,7 @@ class OnboardingCreateUser extends LitElement {
|
||||
@property() private _loading = false;
|
||||
@property() private _errorMsg?: string = undefined;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<p>
|
||||
${this.localize("ui.panel.page-onboarding.intro")}
|
||||
|
||||
@ -51,7 +51,7 @@ class OnboardingIntegrations extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._entries || !this._discovered) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
|
||||
@customElement("onboarding-loading")
|
||||
class OnboardingLoading extends LitElement {
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="loader"></div>
|
||||
`;
|
||||
|
||||
@ -32,7 +32,7 @@ class DialogAreaDetail extends LitElement {
|
||||
await this.updateComplete;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ export class HaConfigAreas extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || this._areas === undefined) {
|
||||
return html`
|
||||
<hass-loading-screen></hass-loading-screen>
|
||||
|
||||
@ -45,7 +45,7 @@ export class HaAutomationEditor extends LitElement {
|
||||
@property() private _dirty?: boolean;
|
||||
@property() private _errors?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-app-layout has-scrolling-region>
|
||||
<app-header slot="header" fixed>
|
||||
|
||||
@ -39,7 +39,7 @@ class HaAutomationPicker extends LitElement {
|
||||
@property() public isWide!: boolean;
|
||||
@property() public automations!: AutomationEntity[];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<hass-subpage
|
||||
.showBackButton=${!this.isWide}
|
||||
|
||||
@ -58,7 +58,7 @@ class DialogThingtalk extends LitElement {
|
||||
this._opened = true;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ export class ThingTalkPlaceholders extends SubscribeMixin(LitElement) {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-paper-dialog
|
||||
modal
|
||||
|
||||
@ -23,7 +23,7 @@ export class CloudAlexaPref extends LitElement {
|
||||
@property() public cloudStatus?: CloudStatusLoggedIn;
|
||||
@property() private _syncing = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.cloudStatus) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ export class CloudGooglePref extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public cloudStatus?: CloudStatusLoggedIn;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.cloudStatus) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ export class CloudRemotePref extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public cloudStatus?: CloudStatusLoggedIn;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.cloudStatus) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ class CloudAlexa extends LitElement {
|
||||
)
|
||||
);
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (this._entities === undefined) {
|
||||
return html`
|
||||
<hass-loading-screen></hass-loading-screen>
|
||||
|
||||
@ -71,7 +71,7 @@ class CloudGoogleAssistant extends LitElement {
|
||||
)
|
||||
);
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (this._entities === undefined) {
|
||||
return html`
|
||||
<hass-loading-screen></hass-loading-screen>
|
||||
|
||||
@ -33,7 +33,7 @@ class ConfigCoreForm extends LitElement {
|
||||
@property() private _unitSystem!: ConfigUpdateValues["unit_system"];
|
||||
@property() private _timeZone!: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const canEdit = ["storage", "default"].includes(
|
||||
this.hass.config.config_source
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ class ConfigNameForm extends LitElement {
|
||||
|
||||
@property() private _name!: ConfigUpdateValues["location_name"];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const canEdit = ["storage", "default"].includes(
|
||||
this.hass.config.config_source
|
||||
);
|
||||
|
||||
@ -32,7 +32,7 @@ class HaConfigDashboard extends LitElement {
|
||||
@property() public cloudStatus?: CloudStatus;
|
||||
@property() public showAdvanced!: boolean;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<app-header-layout has-scrolling-region>
|
||||
<app-header fixed slot="header">
|
||||
|
||||
@ -32,7 +32,7 @@ class HaConfigNavigation extends LitElement {
|
||||
@property() public pages!: ConfigPageNavigation[];
|
||||
@property() public curPage!: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<paper-listbox attr-for-selected="data-page" .selected=${this.curPage}>
|
||||
${this.pages.map(({ page, core, advanced, info }) =>
|
||||
|
||||
@ -46,7 +46,7 @@ export class DialogEntityRegistryDetail extends LitElement {
|
||||
this._params = undefined;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -41,6 +41,7 @@ export class EntityRegistrySettings extends LitElement {
|
||||
private _origEntityId!: string;
|
||||
|
||||
protected updated(changedProperties: PropertyValues) {
|
||||
super.updated(changedProperties);
|
||||
if (changedProperties.has("entry")) {
|
||||
this._error = undefined;
|
||||
this._name = this.entry.name || "";
|
||||
@ -50,9 +51,9 @@ export class EntityRegistrySettings extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (this.entry.entity_id !== this._origEntityId) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
const stateObj: HassEntity | undefined = this.hass.states[
|
||||
this.entry.entity_id
|
||||
|
||||
@ -217,7 +217,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) {
|
||||
dialog.closeDialog();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || this._entities === undefined) {
|
||||
return html`
|
||||
<hass-loading-screen></hass-loading-screen>
|
||||
|
||||
@ -334,6 +334,7 @@ export class HaConfigManagerDashboard extends LitElement {
|
||||
});
|
||||
return states;
|
||||
}
|
||||
|
||||
static get styles(): CSSResult {
|
||||
return css`
|
||||
ha-card {
|
||||
|
||||
@ -50,7 +50,7 @@ class DialogPersonDetail extends LitElement {
|
||||
await this.updateComplete;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ class HaConfigPerson extends LitElement {
|
||||
@property() private _configItems?: Person[];
|
||||
private _usersLoad?: Promise<User[]>;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (
|
||||
!this.hass ||
|
||||
this._storageItems === undefined ||
|
||||
|
||||
@ -33,7 +33,7 @@ class HaSceneDashboard extends LitElement {
|
||||
@property() public isWide!: boolean;
|
||||
@property() public scenes!: SceneEntity[];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<hass-subpage
|
||||
.showBackButton=${!this.isWide}
|
||||
|
||||
@ -146,9 +146,9 @@ export class HaSceneEditor extends SubscribeMixin(LitElement) {
|
||||
];
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
const { devices, entities } = this._getEntitiesDevices(
|
||||
this._entities,
|
||||
|
||||
@ -38,7 +38,7 @@ export class HaScriptEditor extends LitElement {
|
||||
@property() private _dirty?: boolean;
|
||||
@property() private _errors?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-app-layout has-scrolling-region>
|
||||
<app-header slot="header" fixed>
|
||||
|
||||
@ -32,7 +32,7 @@ class HaScriptPicker extends LitElement {
|
||||
@property() public scripts!: HassEntity[];
|
||||
@property() public isWide!: boolean;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<hass-subpage
|
||||
.showBackButton=${!this.isWide}
|
||||
|
||||
@ -43,7 +43,7 @@ class HaUserEditor extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public user?: User;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const hass = this.hass;
|
||||
const user = this.user;
|
||||
if (!hass || !user) {
|
||||
|
||||
@ -50,7 +50,7 @@ class ZHAAddDevicesPage extends LitElement {
|
||||
this._formattedEvents = "";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<hass-subpage
|
||||
header="${this.hass!.localize(
|
||||
|
||||
@ -58,7 +58,7 @@ export class ZHAClusterAttributes extends LitElement {
|
||||
super.update(changedProperties);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-config-section .isWide="${this.isWide}">
|
||||
<div class="header" slot="header">
|
||||
|
||||
@ -53,7 +53,7 @@ export class ZHAClusterCommands extends LitElement {
|
||||
super.update(changedProperties);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-config-section .isWide="${this.isWide}">
|
||||
<div class="header" slot="header">
|
||||
|
||||
@ -53,7 +53,7 @@ export class ZHAClusters extends LitElement {
|
||||
super.update(changedProperties);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-config-section .isWide="${this.isWide}">
|
||||
<div class="header" slot="header">
|
||||
|
||||
@ -100,7 +100,7 @@ class ZHAConfigDashboard extends LitElement {
|
||||
this._firstUpdatedCalled = true;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<hass-subpage
|
||||
.header=${this.hass.localize("ui.panel.config.zha.title")}
|
||||
|
||||
@ -41,7 +41,7 @@ export class ZHADeviceBindingControl extends LitElement {
|
||||
super.update(changedProperties);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-config-section .isWide="${this.isWide}">
|
||||
<div class="header" slot="header">
|
||||
|
||||
@ -139,7 +139,7 @@ class ZHADeviceCard extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-card header="${this.showName ? this.device!.name : ""}">
|
||||
${
|
||||
|
||||
@ -68,7 +68,7 @@ export class ZHADevicePage extends LitElement {
|
||||
super.update(changedProperties);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<hass-subpage
|
||||
.header=${this.hass!.localize("ui.panel.config.zha.devices.header")}
|
||||
|
||||
@ -57,7 +57,7 @@ export class ZHAGroupBindingControl extends LitElement {
|
||||
super.update(changedProperties);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-config-section .isWide="${this.isWide}">
|
||||
<div class="sectionHeader" slot="header">
|
||||
|
||||
@ -27,7 +27,7 @@ export class ZHANode extends LitElement {
|
||||
@property() public device?: ZHADevice;
|
||||
@property() private _showHelp: boolean = false;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-config-section .isWide="${this.isWide}">
|
||||
<div class="header" slot="header">
|
||||
|
||||
@ -58,7 +58,7 @@ class DialogZoneDetail extends LitElement {
|
||||
await this.updateComplete;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ export class HaConfigZone extends SubscribeMixin(LitElement) {
|
||||
];
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (
|
||||
!this.hass ||
|
||||
this._storageItems === undefined ||
|
||||
|
||||
@ -48,7 +48,7 @@ export class ZwaveNetwork extends LitElement {
|
||||
this._subscribe();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-config-section .isWide="${this.isWide}">
|
||||
<div class="sectionHeader" slot="header">
|
||||
|
||||
@ -37,7 +37,7 @@ export class ZwaveNodeConfig extends LitElement {
|
||||
@property() private _selectedConfigParameter: number = -1;
|
||||
@property() private _selectedConfigValue: number | string = -1;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="content">
|
||||
<ha-card
|
||||
|
||||
@ -26,7 +26,7 @@ export class ZwaveValues extends LitElement {
|
||||
@property() public values: ZWaveValue[] = [];
|
||||
@property() private _selectedValue: number = -1;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="content">
|
||||
<ha-card
|
||||
|
||||
@ -30,7 +30,7 @@ class PanelDeveloperTools extends LitElement {
|
||||
@property() public route!: Route;
|
||||
@property() public narrow!: boolean;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const page = this._page;
|
||||
return html`
|
||||
<app-header-layout has-scrolling-region>
|
||||
|
||||
@ -19,7 +19,7 @@ const OPT_IN_PANEL = "states";
|
||||
class HaPanelDevInfo extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const hass = this.hass;
|
||||
const customUiList: Array<{ name: string; url: string; version: string }> =
|
||||
(window as any).CUSTOM_UI_LIST || [];
|
||||
|
||||
@ -35,9 +35,9 @@ class SystemHealthCard extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() private _info?: SystemHealthInfo;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return;
|
||||
return html``;
|
||||
}
|
||||
const sections: TemplateResult[] = [];
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ export class HaPanelDevLogs extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="content">
|
||||
<system-log-card .hass=${this.hass}></system-log-card>
|
||||
|
||||
@ -24,7 +24,7 @@ class DialogSystemLogDetail extends LitElement {
|
||||
await this.updateComplete;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ class ErrorLogCard extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@property() private _errorLog?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<p class="error-log-intro">
|
||||
${this._errorLog
|
||||
|
||||
@ -41,7 +41,7 @@ export class SystemLogCard extends LitElement {
|
||||
this._items = await fetchSystemLog(this.hass!);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="system-log-intro">
|
||||
<ha-card>
|
||||
|
||||
@ -41,7 +41,7 @@ class HaLogbook extends LitElement {
|
||||
this._rtl = computeRTL(this.hass);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.entries?.length) {
|
||||
return html`
|
||||
${this.hass.localize("ui.panel.logbook.entries_not_found")}
|
||||
|
||||
@ -35,7 +35,7 @@ export class HuiErrorBadge extends LitElement implements LovelaceBadge {
|
||||
this._config = config;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ export class HuiStateLabelBadge extends LitElement implements LovelaceBadge {
|
||||
this._config = config;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
|
||||
);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ export class HuiEmptyStateCard extends LitElement implements LovelaceCard {
|
||||
// tslint:disable-next-line
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this._hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ class HuiEntityButtonCard extends LitElement implements LovelaceCard {
|
||||
);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ export class HuiErrorCard extends LitElement implements LovelaceCard {
|
||||
this._config = config;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ class HuiGaugeCard extends LitElement implements LovelaceCard {
|
||||
this._setBaseUnit();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ export class HuiIframeCard extends LitElement implements LovelaceCard {
|
||||
this._config = config;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ export class HuiLightCard extends LitElement implements LovelaceCard {
|
||||
this._config = { theme: "default", ...config };
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ export class HuiMarkdownCard extends LitElement implements LovelaceCard {
|
||||
this._connect();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ export class HuiPictureCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ class HuiPictureElementsCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ class HuiPictureEntityCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -149,7 +149,7 @@ class HuiPictureGlanceCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ class HuiPlantStatusCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ class HuiSensorCard extends LitElement implements LovelaceCard {
|
||||
return 3;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ export abstract class HuiStackCard extends LitElement implements LovelaceCard {
|
||||
});
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
this.rescale_svg();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this._config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._config || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ export class HuiActionEditor extends LitElement {
|
||||
return config.service || "";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.actions) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ export class HuiCardOptions extends LitElement {
|
||||
|
||||
@property() public path?: [number, number];
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<slot></slot>
|
||||
<div class="options">
|
||||
|
||||
@ -37,7 +37,7 @@ class HuiEntitiesToggle extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._toggleEntities) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ export class HuiEntityEditor extends LitElement {
|
||||
|
||||
@property() protected label?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.entities) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ class HuiGenericEntityRow extends LitElement {
|
||||
|
||||
@property() public showSecondary: boolean = true;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.config) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ export class HuiImage extends LitElement {
|
||||
this._stopUpdateCameraInterval();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const ratio = this.aspectRatio ? parseAspectRatio(this.aspectRatio) : null;
|
||||
const stateObj =
|
||||
this.hass && this.entity ? this.hass.states[this.entity] : undefined;
|
||||
|
||||
@ -20,7 +20,7 @@ export class HuiInputListEditor extends LitElement {
|
||||
@property() protected hass?: HomeAssistant;
|
||||
@property() protected inputLabel?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.value) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ export class HuiThemeSelectEditor extends LitElement {
|
||||
@property() public label?: string;
|
||||
@property() public hass?: HomeAssistant;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
const themes = ["Backend-selected", "default"].concat(
|
||||
Object.keys(this.hass!.themes.themes).sort()
|
||||
);
|
||||
|
||||
@ -51,7 +51,7 @@ class HuiTimestampDisplay extends LitElement {
|
||||
this._clearInterval();
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.ts || !this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
export class HuiUnavailable extends LitElement {
|
||||
@property() public text?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="disabled-overlay">
|
||||
<div>${this.text}</div>
|
||||
|
||||
@ -27,7 +27,7 @@ class HuiViewsList extends LitElement {
|
||||
@property() private lovelaceConfig?: LovelaceConfig | undefined;
|
||||
@property() private selected?: number | undefined;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.lovelaceConfig) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ import "../../../components/ha-icon";
|
||||
export class HuiWarningElement extends LitElement {
|
||||
@property() public label?: string;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-icon icon="hass:alert" .title="${this.label}"></ha-icon>
|
||||
`;
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
|
||||
@customElement("hui-warning")
|
||||
export class HuiWarning extends LitElement {
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<slot></slot>
|
||||
`;
|
||||
|
||||
@ -47,7 +47,7 @@ export class HuiCardPicker extends LitElement {
|
||||
|
||||
public cardPicked?: (cardConf: LovelaceCardConfig) => void;
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<div class="cards-container">
|
||||
${cards.map((card: string) => {
|
||||
|
||||
@ -61,7 +61,7 @@ export class HuiDialogEditCard extends LitElement {
|
||||
return this.shadowRoot!.querySelector("hui-card-editor");
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ export class HuiDialogMoveCardView extends LitElement {
|
||||
await this.updateComplete;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ export class HuiDialogSuggestCard extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-paper-dialog with-backdrop opened>
|
||||
<h2>
|
||||
|
||||
@ -59,7 +59,7 @@ export class HuiAlarmPanelCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ export class HuiEntitiesCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ export class HuiEntityButtonCardEditor extends LitElement
|
||||
return this._config!.theme || "default";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ export class HuiGaugeCardEditor extends LitElement
|
||||
return this._config!.severity || undefined;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ export class HuiGlanceCardEditor extends LitElement
|
||||
return this._config!.show_state || true;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ export class HuiHistoryGraphCardEditor extends LitElement
|
||||
return this._config!.refresh_interval || 0;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ export class HuiIframeCardEditor extends LitElement
|
||||
return this._config!.aspect_ratio || "";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ export class HuiLightCardEditor extends LitElement
|
||||
return this._config!.icon || "";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ export class HuiMapCardEditor extends LitElement implements LovelaceCardEditor {
|
||||
return this._config!.dark_mode || false;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ export class HuiMarkdownCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ export class HuiMediaControlCardEditor extends LitElement
|
||||
return this._config!.entity || "";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ export class HuiPictureCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ export class HuiPictureEntityCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ export class HuiPictureGlanceCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ export class HuiPlantStatusCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ export class HuiSensorCardEditor extends LitElement
|
||||
return this._config!.hours_to_show || "24";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ export class HuiShoppingListEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ export class HuiThermostatCardEditor extends LitElement
|
||||
return this._config!.theme || "default";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ export class HuiWeatherForecastCardEditor extends LitElement
|
||||
return this._config!.theme || "Backend-selected";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ export class HuiSaveConfig extends LitElement {
|
||||
return this.shadowRoot!.querySelector("ha-paper-dialog")!;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-paper-dialog with-backdrop>
|
||||
<h2>
|
||||
|
||||
@ -52,7 +52,7 @@ export class HuiDialogEditLovelace extends LitElement {
|
||||
return this.shadowRoot!.querySelector("ha-paper-dialog")!;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
<ha-paper-dialog with-backdrop modal>
|
||||
<h2>
|
||||
|
||||
@ -35,7 +35,7 @@ export class HuiLovelaceEditor extends LitElement {
|
||||
return this.config.title || "";
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
return html`
|
||||
${configElementStyle}
|
||||
<div class="card-config">
|
||||
|
||||
@ -36,7 +36,7 @@ export class HuiDialogSelectView extends LitElement {
|
||||
);
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this._params) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ export class HuiUnusedEntities extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
protected render(): TemplateResult {
|
||||
if (!this.hass || !this.lovelace) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user