From 46968bb565519894f21813e1c3fb7228c151c7ba Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Thu, 5 Sep 2019 18:01:24 -0500 Subject: [PATCH] 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 --- src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts b/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts index 96ec9b3a65..1f7907b773 100644 --- a/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts +++ b/src/panels/lovelace/entity-rows/hui-sensor-entity-row.ts @@ -62,7 +62,8 @@ class HuiSensorEntityRow extends LitElement implements EntityRow { return html`
- ${stateObj.attributes.device_class === "timestamp" + ${stateObj.attributes.device_class === "timestamp" && + stateObj.state !== "unavailable" ? html`