Convert cover-row to TypeScript/LitElement#1933
Conversation
e33e527 to
4dc3c05
Compare
| .config=${this._config} | ||
| > | ||
| ${ | ||
| this.hass.states[this._config.entity] |
There was a problem hiding this comment.
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>`;
}There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Eventually we will remove the error rendering from generic row.
There was a problem hiding this comment.
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.
balloob
left a comment
There was a problem hiding this comment.
Ok to merge when final 2 comments addressed
|
@balloob we're you able to get the error-row to show up for you or did you not see my note? |
|
… did not see note. I will try it now. |
|
Adding this did the trick 👍 |
|
@balloob 🤦♂️ |
|
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: |
|
@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. |
No description provided.