Render should always return a html template (#4612)

This commit is contained in:
Bram Kragten 2020-01-27 17:34:22 +01:00 committed by Paulus Schoutsen
parent 82fb622904
commit 04f8f0f74f
237 changed files with 248 additions and 245 deletions

View File

@ -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>>

View File

@ -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`

View File

@ -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">

View File

@ -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``;
}

View File

@ -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

View File

@ -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`

View File

@ -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>

View File

@ -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"

View File

@ -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(

View File

@ -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);

View File

@ -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>

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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

View File

@ -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

View File

@ -44,7 +44,7 @@ class HassioAddonNetwork extends LitElement {
this._setNetworkConfig();
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config) {
return html``;
}

View File

@ -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>

View File

@ -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}

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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,

View File

@ -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>

View File

@ -102,7 +102,7 @@ class HassioSnapshotDialog extends LitElement {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this.snapshot) {
return html``;
}

View File

@ -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>

View File

@ -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>

View File

@ -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">

View File

@ -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``;
}

View File

@ -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

View File

@ -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,

View File

@ -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``;
}

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -145,7 +145,7 @@ class HaEntityPicker extends LitElement {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
const states = this._getStates(
this._hass,
this.includeDomains,

View File

@ -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>

View File

@ -52,7 +52,7 @@ export class HaStateLabelBadge extends LitElement {
this.clearInterval();
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
const state = this.state;
if (!state) {

View File

@ -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) {

View File

@ -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

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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}

View File

@ -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">

View File

@ -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 ||

View File

@ -64,7 +64,7 @@ export class HaRelatedItems extends SubscribeMixin(LitElement) {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._related) {
return html``;
}

View File

@ -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>
`;

View File

@ -90,7 +90,7 @@ export class HaLocationsEditor extends LitElement {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
return html`
<div id="map"></div>
`;

View File

@ -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`

View File

@ -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

View File

@ -48,7 +48,7 @@ class DialogConfigEntrySystemOptions extends LitElement {
await this.updateComplete;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -116,7 +116,7 @@ class DataEntryFlowDialog extends LitElement {
this._scheduleCenterDialog();
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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(

View File

@ -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`

View File

@ -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`

View File

@ -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;

View File

@ -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>

View File

@ -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`

View File

@ -44,7 +44,7 @@ class DialogDeviceRegistryDetail extends LitElement {
await this.updateComplete;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -22,7 +22,7 @@ class DomainTogglerDialog extends LitElement {
this._params = params;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -32,7 +32,7 @@ class DialogBox extends LitElement {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -72,7 +72,7 @@ class MoreInfoWeather extends LitElement {
return false;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this.hass || !this.stateObj) {
return html``;
}

View File

@ -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``;
}

View File

@ -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>

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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">

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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>
`;

View File

@ -58,7 +58,7 @@ class NotificationManager extends LitElement {
});
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
return html`
<ha-toast .noCancelOnOutsideClick=${this._noCancelOnOutsideClick}>
${this._action

View File

@ -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) {

View File

@ -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>

View File

@ -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(

View File

@ -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")}

View File

@ -51,7 +51,7 @@ class OnboardingIntegrations extends LitElement {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._entries || !this._discovered) {
return html``;
}

View File

@ -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>
`;

View File

@ -32,7 +32,7 @@ class DialogAreaDetail extends LitElement {
await this.updateComplete;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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>

View File

@ -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>

View File

@ -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}

View File

@ -58,7 +58,7 @@ class DialogThingtalk extends LitElement {
this._opened = true;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -112,7 +112,7 @@ export class ThingTalkPlaceholders extends SubscribeMixin(LitElement) {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
return html`
<ha-paper-dialog
modal

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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>

View File

@ -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>

View File

@ -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
);

View File

@ -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
);

View File

@ -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">

View File

@ -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 }) =>

View File

@ -46,7 +46,7 @@ export class DialogEntityRegistryDetail extends LitElement {
this._params = undefined;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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

View File

@ -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>

View File

@ -334,6 +334,7 @@ export class HaConfigManagerDashboard extends LitElement {
});
return states;
}
static get styles(): CSSResult {
return css`
ha-card {

View File

@ -50,7 +50,7 @@ class DialogPersonDetail extends LitElement {
await this.updateComplete;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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 ||

View File

@ -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}

View File

@ -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,

View File

@ -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>

View File

@ -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}

View File

@ -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) {

View File

@ -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(

View File

@ -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">

View File

@ -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">

View File

@ -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">

View File

@ -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")}

View File

@ -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">

View File

@ -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 : ""}">
${

View File

@ -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")}

View File

@ -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">

View File

@ -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">

View File

@ -58,7 +58,7 @@ class DialogZoneDetail extends LitElement {
await this.updateComplete;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -95,7 +95,7 @@ export class HaConfigZone extends SubscribeMixin(LitElement) {
];
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (
!this.hass ||
this._storageItems === undefined ||

View File

@ -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">

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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 || [];

View File

@ -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[] = [];

View File

@ -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>

View File

@ -24,7 +24,7 @@ class DialogSystemLogDetail extends LitElement {
await this.updateComplete;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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

View File

@ -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>

View File

@ -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")}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -124,7 +124,7 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
);
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config || !this.hass) {
return html``;
}

View File

@ -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``;
}

View File

@ -100,7 +100,7 @@ class HuiEntitiesCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config || !this._hass) {
return html``;
}

View File

@ -112,7 +112,7 @@ class HuiEntityButtonCard extends LitElement implements LovelaceCard {
);
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config || !this.hass) {
return html``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -135,7 +135,7 @@ class HuiMapCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config) {
return html``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -71,7 +71,7 @@ class HuiPictureElementsCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config) {
return html``;
}

View File

@ -95,7 +95,7 @@ class HuiPictureEntityCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config || !this.hass) {
return html``;
}

View File

@ -149,7 +149,7 @@ class HuiPictureGlanceCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config || !this.hass) {
return html``;
}

View File

@ -84,7 +84,7 @@ class HuiPlantStatusCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this.hass || !this._config) {
return html``;
}

View File

@ -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``;
}

View File

@ -102,7 +102,7 @@ class HuiShoppingListCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config || !this.hass) {
return html``;
}

View File

@ -41,7 +41,7 @@ export abstract class HuiStackCard extends LitElement implements LovelaceCard {
});
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config) {
return html``;
}

View File

@ -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``;
}

View File

@ -118,7 +118,7 @@ class HuiWeatherForecastCard extends LitElement implements LovelaceCard {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._config || !this.hass) {
return html``;
}

View File

@ -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``;
}

View File

@ -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">

View File

@ -37,7 +37,7 @@ class HuiEntitiesToggle extends LitElement {
}
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._toggleEntities) {
return html``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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;

View File

@ -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``;
}

View File

@ -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()
);

View File

@ -51,7 +51,7 @@ class HuiTimestampDisplay extends LitElement {
this._clearInterval();
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this.ts || !this.hass) {
return html``;
}

View File

@ -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>

View File

@ -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``;
}

View File

@ -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>
`;

View File

@ -9,7 +9,7 @@ import {
@customElement("hui-warning")
export class HuiWarning extends LitElement {
protected render(): TemplateResult | void {
protected render(): TemplateResult {
return html`
<slot></slot>
`;

View File

@ -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) => {

View File

@ -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``;
}

View File

@ -27,7 +27,7 @@ export class HuiDialogMoveCardView extends LitElement {
await this.updateComplete;
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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>

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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``;
}

View File

@ -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>

View File

@ -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>

View File

@ -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">

View File

@ -36,7 +36,7 @@ export class HuiDialogSelectView extends LitElement {
);
}
protected render(): TemplateResult | void {
protected render(): TemplateResult {
if (!this._params) {
return html``;
}

View File

@ -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