diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index c060256408a..c3bf78c7711 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -3,7 +3,7 @@ FINGERPRINTS = { "compatibility.js": "83d9c77748dafa9db49ae77d7f3d8fb0", "core.js": "5d08475f03adb5969bd31855d5ca0cfd", - "frontend.html": "32bdf1e9eb7b2d73682a65cfc5ded063", + "frontend.html": "8264c0ee8dafb09785ec7b934795d3b1", "mdi.html": "d86ee142ae2476f49384bfe866a2885e", "micromarkdown-js.html": "93b5ec4016f0bba585521cf4d18dec1a", "panels/ha-panel-config.html": "0b42cb4e709ce35ad2666ffeca6f9b14", diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 345f4e103d4..59d17b1c94b 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -43,6 +43,20 @@ window.hassUtil.attributeClassNames = function (stateObj, attributes) { ).join(' '); }; +// Expects featureClassNames to be an object mapping feature-bit -> className +window.hassUtil.featureClassNames = function (stateObj, featureClassNames) { + if (!stateObj || !stateObj.attributes.supported_features) return ''; + + var features = stateObj.attributes.supported_features; + + return Object.keys(featureClassNames).map( + function (feature) { + return (features & feature) !== 0 ? featureClassNames[feature] : ''; + } + ).join(' '); +}; + + window.hassUtil.canToggleState = function (hass, stateObj) { var domain = window.hassUtil.computeDomain(stateObj); if (domain === 'group') { @@ -729,4 +743,4 @@ return performance.now()};else var t=function(){return Date.now()};var e=functio this.hass.callService('media_player', service, serviceData); }, }); -}());[[computeStateName(stateObj)]][[playerObj.primaryText]][[playerObj.secondaryText]][[formatAttribute(attribute)]][[formatAttributeValue(stateObj, attribute)]][[computeAttribution(stateObj)]]DISMISS[[computeTitle(views, locationName)]][[locationName]][[computeStateName(defaultView)]][[computeStateName(item)]]Error loading panel :(No state history found.DisarmArm HomeArm AwayLast triggered:TRIGGER[[value]] [[units]]Target TemperatureTarget Humidity[[item]][[item]][[item]]Away ModeAux Heat[[stateObj.attributes.description]] [[stateObj.attributes.link_name]][[stateObj.attributes.errors]][[item.name]][[submitCaption]]PositionTilt position[[item]]OscillateDirection[[caption]][[item]]UnlockLock[[item]]Last Action[[stateObj.attributes.last_action]][[itemCaption(item)]][[itemValue(item)]]Elevation[[stateObj.attributes.elevation]]Update Instructions{{results.final}} [[results.interim]] …An error occurred. Unable to fulfill request.Home AssistantStates[[item.title]]Log OutPush NotificationsDeveloper Tools{{text}}
Last triggered:
[[stateObj.attributes.description]] [[stateObj.attributes.link_name]]
[[stateObj.attributes.errors]]
[[submitCaption]]