From 7b61826134edb0e1a0e93d0346009478eb7f6ba5 Mon Sep 17 00:00:00 2001 From: c727 Date: Wed, 25 Oct 2017 09:34:03 +0200 Subject: [PATCH] Return "-" if AttributeValue = null (#473) * Return "undefined" if AttributeValue = null * use var value * Return "-" if null * Triple equals --- src/components/ha-attributes.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ha-attributes.html b/src/components/ha-attributes.html index b4dd830700..d910834e2f 100644 --- a/src/components/ha-attributes.html +++ b/src/components/ha-attributes.html @@ -68,6 +68,7 @@ formatAttributeValue: function (stateObj, attribute) { var value = stateObj.attributes[attribute]; + if (value === null) return '-'; if (Array.isArray(value)) { return value.join(', '); }