mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-09 10:59:50 +00:00
Render should always return a html template (#4612)
This commit is contained in:
committed by
Paulus Schoutsen
parent
82fb622904
commit
04f8f0f74f
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user