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

Some files were not shown because too many files have changed in this diff Show More