Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert hui-climate-entity-row to TypeScript/LitElement #1899

Merged
merged 3 commits into from
Oct 28, 2018

Conversation

iantrich
Copy link
Member

No description provided.

@ghost ghost assigned iantrich Oct 28, 2018
@ghost ghost added the in progress label Oct 28, 2018
if (
!this._config ||
!this._config.entity ||
!this.hass!.states[this._config.entity]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should only chekc for !this.hass here. Don't check if entity exist in states as that is already handled by <hui-generic-entity-row>

}

protected render(): TemplateResult {
if (!this.hass) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check for config existing too?

>
<ha-climate-state
.hass=${this.hass}
.stateObj=${this.hass!.states[this._config!.entity]}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fact that you need an ! here is a good indicator that you need to check above if it exists.

@balloob balloob merged commit 82eb33a into home-assistant:dev Oct 28, 2018
@ghost ghost removed the in progress label Oct 28, 2018
@iantrich iantrich deleted the ts-climate-row branch November 16, 2018 19:18
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants