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 cover-row to TypeScript/LitElement #1933

Merged
merged 6 commits into from
Nov 6, 2018

Conversation

iantrich
Copy link
Member

No description provided.

src/util/cover-model.js Outdated Show resolved Hide resolved
src/util/cover-model.js Outdated Show resolved Hide resolved
src/util/cover-model.js Outdated Show resolved Hide resolved
src/util/cover-model.js Outdated Show resolved Hide resolved
.config=${this._config}
>
${
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.

Migrate this to use the new no-entity-row from #1946

const stateObj = this.hass.states[this._config.entity];

if (!stateObj) {
  return html`<hui-error-entity-row .entity="${this._config.entity}"></hui-error-entity-row>`;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Why exactly are we wanting to use this new error row instead of the generic row? We still need the generic row to render the label, regardless, so just curious what we gain.

Copy link
Member

Choose a reason for hiding this comment

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

Eventually we will remove the error rendering from generic row.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, added this in and is not rendering anything. See it in the inspector but nothing showing. Too tired to look now, but will check it out further tomorrow during lunch, hopefully.

Copy link
Member

@balloob balloob left a comment

Choose a reason for hiding this comment

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

Ok to merge when final 2 comments addressed

@balloob balloob merged commit c10e409 into home-assistant:dev Nov 6, 2018
@ghost ghost removed the in progress label Nov 6, 2018
@iantrich
Copy link
Member Author

iantrich commented Nov 6, 2018

@balloob we're you able to get the error-row to show up for you or did you not see my note?

@balloob
Copy link
Member

balloob commented Nov 6, 2018

did not see note. I will try it now.

@balloob
Copy link
Member

balloob commented Nov 6, 2018

Adding this did the trick 👍

import "./hui-error-entity-row";

14b959b

@iantrich
Copy link
Member Author

iantrich commented Nov 6, 2018

@balloob 🤦‍♂️

@balloob
Copy link
Member

balloob commented Nov 6, 2018

These are fairly easy to spot, just load the component with a non-existing entity and see what's inside. Any web component that is imported has a shadow root.

My testing lovelace config:

views:
  - title: Example
    cards:
      - type: custom:hui-cover-entity-row
        entity: bier.bier

@iantrich
Copy link
Member Author

iantrich commented Nov 6, 2018

@balloob yeah, I saw the tag was there but no shadowdom was that part that I saw but didn't make the connection completely as to why.

@iantrich iantrich deleted the ts-cover-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