Timestamp unavailable (#3635)

* Convert weather-forecast to LitElement

Part of https://github.com/home-assistant/home-assistant-polymer/issues/2095

Not sure how RTL works and how to apply it.

Also, thinking I should update if the forecast changes and not just the state. Input?

* Revert "Convert weather-forecast to LitElement"

This reverts commit e1893b0a83f5973df7a28e5d30c3d4d0496155a1.

* Don't try to show unavailable timestamp

Closes https://github.com/home-assistant/home-assistant-polymer/issues/2956
This commit is contained in:
Ian Richardson 2019-09-05 18:01:24 -05:00 committed by Paulus Schoutsen
parent 011219b727
commit 46968bb565

View File

@ -62,7 +62,8 @@ class HuiSensorEntityRow extends LitElement implements EntityRow {
return html`
<hui-generic-entity-row .hass="${this.hass}" .config="${this._config}">
<div>
${stateObj.attributes.device_class === "timestamp"
${stateObj.attributes.device_class === "timestamp" &&
stateObj.state !== "unavailable"
? html`
<hui-timestamp-display
.hass="${this.hass}"