diff --git a/src/cards/ha-weather-card.html b/src/cards/ha-weather-card.html index 49c2dbbfc9..eabf8d7b9a 100644 --- a/src/cards/ha-weather-card.html +++ b/src/cards/ha-weather-card.html @@ -5,7 +5,7 @@ - + + + + + + + [[formatAttribute(attribute)]] + [[formatAttributeValue(stateObj, attribute)]] + + + [[computeAttribution(stateObj)]] + + + + + diff --git a/src/more-infos/more-info-default.html b/src/more-infos/more-info-default.html index 19a6772d56..65eaee7285 100644 --- a/src/more-infos/more-info-default.html +++ b/src/more-infos/more-info-default.html @@ -1,67 +1,21 @@ - + - - - - - - - [[formatAttribute(attribute)]] - [[formatAttributeValue(stateObj, attribute)]] - - - [[computeAttribution(stateObj)]] - + diff --git a/src/more-infos/more-info-light.html b/src/more-infos/more-info-light.html index 769bced6d3..d0f78e2661 100644 --- a/src/more-infos/more-info-light.html +++ b/src/more-infos/more-info-light.html @@ -7,6 +7,7 @@ + @@ -80,6 +81,8 @@ + + diff --git a/src/more-infos/more-info-lock.html b/src/more-infos/more-info-lock.html index 07c096abb6..0606f5ba55 100644 --- a/src/more-infos/more-info-lock.html +++ b/src/more-infos/more-info-lock.html @@ -2,6 +2,7 @@ + @@ -16,6 +17,7 @@ Unlock Lock + diff --git a/src/util/hass-util.html b/src/util/hass-util.html index 73b7f21244..5d69ca2756 100644 --- a/src/util/hass-util.html +++ b/src/util/hass-util.html @@ -341,27 +341,4 @@ window.hassUtil.stateIcon = function (state) { return window.hassUtil.domainIcon(state.domain, state.state); }; -window.hassUtil.computeDisplayAttributes = function (stateObj, filterKeys) { - if (!stateObj) { - return []; - } - - return Object.keys(stateObj.attributes).filter( - function (key) { return filterKeys.indexOf(key) === -1; }); -}; - -window.hassUtil.formatAttribute = function (attribute) { - return attribute.replace(/_/g, ' '); -}; - -window.hassUtil.formatAttributeValue = function (stateObj, attribute) { - var value = stateObj.attributes[attribute]; - - return Array.isArray(value) ? value.join(', ') : value; -}; - -window.hassUtil.computeAttribution = function (stateObj) { - return stateObj.attributes.attribution; -}; -