diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index dcd9097de7e..dea222da9f1 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -1,3 +1,3 @@ """DO NOT MODIFY. Auto-generated by build_frontend script.""" CORE = "d0b415dac66c8056d81380b258af5767" -UI = "d842fd7095ef0d3a5c1d67494bb50adb" +UI = "03325162d9fbc6bef9345b5d9f5f3acc" diff --git a/homeassistant/components/frontend/www_static/core.js.gz b/homeassistant/components/frontend/www_static/core.js.gz index 34ecb6104b1..f6abdbc8f5c 100644 Binary files a/homeassistant/components/frontend/www_static/core.js.gz and b/homeassistant/components/frontend/www_static/core.js.gz differ diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 55803c1cbfc..bce6e26b500 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -82,7 +82,7 @@ Polymer({ this.$.badge.style.backgroundImage = newVal ? `url(${newVal})` : ''; }, }); \ No newline at end of file +var u=o(s);a.length>0&&h.columns[u].push({hass:c,cardType:"entities",states:a,groupEntity:n}),i.forEach(function(t){h.columns[u].push({hass:c,cardType:t.domain,stateObj:t})})}}for(var c=this.hass,l=e.groupBy(function(t){return t.domain}),d={},h={demo:!1,badges:[],columns:[]},f=[],p=0;t>p;p++)h.columns.push([]),f.push(0);n&&h.columns[o(5)].push({hass:c,cardType:"introduction",showHideInstruction:e.size>0&&!c.demo});var m=this.hass.util.expandGroup;return l.keySeq().sortBy(function(t){return i(t)}).forEach(function(t){if("a"===t)return void(h.demo=!0);var n=i(t);n>=0&&10>n?h.badges.push.apply(h.badges,s(l.get(t)).sortBy(a).toArray()):"group"===t?l.get(t).sortBy(a).forEach(function(t){var n=m(t,e);n.forEach(function(t){d[t.entityId]=!0}),u(t.entityId,n.toArray(),t)}):u(t,s(l.get(t)).sortBy(a).toArray())}),h.columns=h.columns.filter(function(t){return t.length>0}),h}})},function(t,e,n){"use strict";var i=n(0);n(47),n(136),new i.a({is:"logbook-entry",properties:{hass:{type:Object}},entityClicked:function(t){t.preventDefault(),this.hass.moreInfoActions.selectEntity(this.entryObj.entityId)}})},function(t,e,n){"use strict";var i=n(0);n(47),new i.a({is:"services-list",behaviors:[window.hassBehavior],properties:{hass:{type:Object},serviceDomains:{type:Array,bindNuclear:function(t){return t.serviceGetters.entityMap}}},computeDomains:function(t){return t.valueSeq().map(function(t){return t.domain}).sort().toJS()},computeServices:function(t,e){return t.get(e).get("services").keySeq().toArray()},serviceClicked:function(t){t.preventDefault(),this.fire("service-selected",{domain:t.model.domain,service:t.model.service})}})},function(t,e,n){"use strict";function i(t,e){for(var n=[],i=t;e>i;i++)n.push(i);return n}function a(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}var s=n(0);new s.a({is:"state-history-chart-line",properties:{data:{type:Object,observer:"dataChanged"},unit:{type:String},isSingleDevice:{type:Boolean,value:!1},isAttached:{type:Boolean,value:!1,observer:"dataChanged"},chartEngine:{type:Object}},created:function(){this.style.display="block"},attached:function(){this.isAttached=!0},dataChanged:function(){this.drawChart()},drawChart:function(){if(this.isAttached){this.chartEngine||(this.chartEngine=new window.google.visualization.LineChart(this));var t=this.unit,e=this.data;if(0!==e.length){var n={legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",vAxes:{0:{title:t}},hAxis:{format:"H:mm"},chartArea:{left:"60",width:"95%"},explorer:{actions:["dragToZoom","rightClickToReset","dragToPan"],keepInBounds:!0,axis:"horizontal",maxZoomIn:.1}};this.isSingleDevice&&(n.legend.position="none",n.vAxes[0].title=null,n.chartArea.left=40,n.chartArea.height="80%",n.chartArea.top=5,n.enableInteractivity=!1);var s=new Date(Math.min.apply(null,e.map(function(t){return t[0].lastChangedAsDate}))),r=new Date(s);r.setDate(r.getDate()+1),r>new Date&&(r=new Date);var o=e.map(function(t){function e(t,e){c&&e&&u.push([t[0]].concat(c.slice(1).map(function(t,n){return e[n]?t:null}))),u.push(t),c=t}var n=t[t.length-1],i=n.domain,s=n.entityDisplay,o=new window.google.visualization.DataTable;o.addColumn({type:"datetime",id:"Time"});var u=[],c=void 0;if("thermostat"===i){var l=t.reduce(function(t,e){return t||e.attributes.target_temp_high!==e.attributes.target_temp_low},!1);o.addColumn("number",s+" current temperature");var d=void 0;l?!function(){o.addColumn("number",s+" target temperature high"),o.addColumn("number",s+" target temperature low");var t=[!1,!0,!0];d=function(n){var i=a(n.attributes.current_temperature),s=a(n.attributes.target_temp_high),r=a(n.attributes.target_temp_low);e([n.lastUpdatedAsDate,i,s,r],t)}}():!function(){o.addColumn("number",s+" target temperature");var t=[!1,!0];d=function(n){var i=a(n.attributes.current_temperature),s=a(n.attributes.temperature);e([n.lastUpdatedAsDate,i,s],t)}}(),t.forEach(d)}else!function(){o.addColumn("number",s);var n="sensor"!==i&&[!0];t.forEach(function(t){var i=a(t.state);e([t.lastChangedAsDate,i],n)})}();return e([r].concat(c.slice(1)),!1),o.addRows(u),o}),u=void 0;u=1===o.length?o[0]:o.slice(1).reduce(function(t,e){return window.google.visualization.data.join(t,e,"full",[[0,0]],i(1,t.getNumberOfColumns()),i(1,e.getNumberOfColumns()))},o[0]),this.chartEngine.draw(u,n)}}}})},function(t,e,n){"use strict";var i=n(0);new i.a({is:"state-history-chart-timeline",properties:{data:{type:Object,observer:"dataChanged"},isAttached:{type:Boolean,value:!1,observer:"dataChanged"}},attached:function(){this.isAttached=!0},dataChanged:function(){this.drawChart()},drawChart:function(){function t(t,e,n,i){var a=e.replace(/_/g," ");s.addRow([t,a,n,i])}if(this.isAttached){for(var e=i.a.dom(this),n=this.data;e.node.lastChild;)e.node.removeChild(e.node.lastChild);if(n&&0!==n.length){var a=new window.google.visualization.Timeline(this),s=new window.google.visualization.DataTable;s.addColumn({type:"string",id:"Entity"}),s.addColumn({type:"string",id:"State"}),s.addColumn({type:"date",id:"Start"}),s.addColumn({type:"date",id:"End"});var r=new Date(n.reduce(function(t,e){return Math.min(t,e[0].lastChangedAsDate)},new Date)),o=new Date(r);o.setDate(o.getDate()+1),o>new Date&&(o=new Date);var u=0;n.forEach(function(e){if(0!==e.length){var n=e[0].entityDisplay,i=void 0,a=null,s=null;e.forEach(function(e){null!==a&&e.state!==a?(i=e.lastChangedAsDate,t(n,a,s,i),a=e.state,s=i):null===a&&(a=e.state,s=e.lastChangedAsDate)}),t(n,a,s,o),u++}}),a.draw(s,{height:55+42*u,timeline:{showRowLabels:n.length>1},hAxis:{format:"H:mm"}})}}}})},function(t,e,n){"use strict";var i=n(0);new i.a({is:"ha-voice-command-dialog",behaviors:[window.hassBehavior],properties:{hass:{type:Object},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},finalTranscript:{type:String,bindNuclear:function(t){return t.voiceGetters.finalTranscript}},interimTranscript:{type:String,bindNuclear:function(t){return t.voiceGetters.extraInterimTranscript}},isTransmitting:{type:Boolean,bindNuclear:function(t){return t.voiceGetters.isTransmitting}},isListening:{type:Boolean,bindNuclear:function(t){return t.voiceGetters.isListening}},showListenInterface:{type:Boolean,computed:"computeShowListenInterface(isListening, isTransmitting)",observer:"showListenInterfaceChanged"}},computeShowListenInterface:function(t,e){return t||e},dialogOpenChanged:function(t){!t&&this.isListening&&this.hass.voiceActions.stop()},showListenInterfaceChanged:function(t){!t&&this.dialogOpen?this.dialogOpen=!1:t&&(this.dialogOpen=!0)}})},function(t,e,n){"use strict";var i=n(0),a=(n(28),n(48),n(161),["camera","configurator","scene"]);new i.a({is:"more-info-dialog",behaviors:[window.hassBehavior],properties:{stateObj:{type:Object,bindNuclear:function(t){return t.moreInfoGetters.currentEntity},observer:"stateObjChanged"},stateHistory:{type:Object,bindNuclear:function(t){return[t.moreInfoGetters.currentEntityHistory,function(t){return t?[t]:!1}]}},isLoadingHistoryData:{type:Boolean,computed:"computeIsLoadingHistoryData(delayedDialogOpen, isLoadingEntityHistoryData)"},isLoadingEntityHistoryData:{type:Boolean,bindNuclear:function(t){return t.entityHistoryGetters.isLoadingEntityHistory}},hasHistoryComponent:{type:Boolean,bindNuclear:function(t){return t.configGetters.isComponentLoaded("history")},observer:"fetchHistoryData"},shouldFetchHistory:{type:Boolean,bindNuclear:function(t){return t.moreInfoGetters.isCurrentEntityHistoryStale},observer:"fetchHistoryData"},showHistoryComponent:{type:Boolean,value:!1,computed:"computeShowHistoryComponent(hasHistoryComponent, stateObj)"},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},delayedDialogOpen:{type:Boolean,value:!1}},computeIsLoadingHistoryData:function(t,e){return!t||e},computeShowHistoryComponent:function(t,e){return this.hasHistoryComponent&&e&&-1===a.indexOf(e.domain)},fetchHistoryData:function(){this.stateObj&&this.hasHistoryComponent&&this.shouldFetchHistory&&this.hass.entityHistoryActions.fetchRecent(this.stateObj.entityId)},stateObjChanged:function(t){var e=this;return t?void this.async(function(){e.fetchHistoryData(),e.dialogOpen=!0},10):void(this.dialogOpen=!1)},dialogOpenChanged:function(t){var e=this;t?this.async(function(){e.delayedDialogOpen=!0},10):!t&&this.stateObj&&(this.async(function(){return e.hass.moreInfoActions.deselectEntity()},10),this.delayedDialogOpen=!1)}})},function(t,e,n){"use strict";var i=n(59),a=i&&i.__esModule?function(){return i["default"]}:function(){return i};Object.defineProperty(a,"a",{get:a}),n(58),window.moment=a.a},function(t,e,n){"use strict";var i=n(0);n(6),n(141),new i.a({is:"partial-cards",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},isFetching:{type:Boolean,bindNuclear:function(t){return t.syncGetters.isFetching}},isStreaming:{type:Boolean,bindNuclear:function(t){return t.streamGetters.isStreamingEvents}},canListen:{type:Boolean,bindNuclear:function(t){return[t.voiceGetters.isVoiceSupported,t.configGetters.isComponentLoaded("conversation"),function(t,e){return t&&e}]}},introductionLoaded:{type:Boolean,bindNuclear:function(t){return t.configGetters.isComponentLoaded("introduction")}},locationName:{type:String,bindNuclear:function(t){return t.configGetters.locationName}},showMenu:{type:Boolean,value:!1,observer:"windowChange"},currentView:{type:String,bindNuclear:function(t){return[t.viewGetters.currentView,function(t){return t||""}]}},hasViews:{type:Boolean,bindNuclear:function(t){return[t.viewGetters.views,function(t){return t.size>0}]}},states:{type:Object,bindNuclear:function(t){return t.viewGetters.currentViewEntities}},columns:{type:Number,value:1}},created:function(){var t=this;this.windowChange=this.windowChange.bind(this);for(var e=[],n=0;5>n;n++)e.push(300+300*n);this.mqls=e.map(function(e){var n=window.matchMedia("(min-width: "+e+"px)");return n.addListener(t.windowChange),n})},detached:function(){var t=this;this.mqls.forEach(function(e){return e.removeListener(t.windowChange)})},windowChange:function(){var t=this.mqls.reduce(function(t,e){return t+e.matches},0);this.columns=Math.max(1,t-(!this.narrow&&this.showMenu))},scrollToTop:function(){function t(s){a||(a=s);var r=s-a;e.scrollTop=n-r/i*n,i>r&&requestAnimationFrame(t)}var e=this.$.panel.scroller,n=e.scrollTop;if(n){var i=Math.round(n/5),a=null;requestAnimationFrame(t)}},handleRefresh:function(){this.hass.syncActions.fetchAll()},handleListenClick:function(){this.hass.voiceActions.listen()},headerScrollAdjust:function(t){this.hasViews&&(this.translate3d("0","-"+t.detail.y+"px","0",this.$.menu),this.toggleClass("condensed",56===t.detail.y,this.$.panel))},computeHeaderHeight:function(t){return t?104:64},computeCondensedHeaderHeight:function(t){return t?48:64},computeMenuButtonClass:function(t,e){return!t&&e?"menu-icon invisible":"menu-icon"},computeRefreshButtonClass:function(t){return t?"ha-spin":""},computeTitle:function(t,e){return t?"Home Assistant":e},computeShowIntroduction:function(t,e,n){return""===t&&(e||0===n.size)},computeHasViews:function(t){return t.length>0},toggleMenu:function(){this.fire("open-menu")}})},function(t,e,n){"use strict";var i=n(0);n(6),n(143),new i.a({is:"partial-dev-call-service",properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},domain:{type:String,value:""},service:{type:String,value:""},serviceData:{type:String,value:""},description:{type:String,computed:"computeDescription(hass, domain, service)"}},computeDescription:function(t,e,n){return t.reactor.evaluate([t.serviceGetters.entityMap,function(t){return t.has(e)&&t.get(e).get("services").has(n)?JSON.stringify(t.get(e).get("services").get(n).toJS(),null,2):"No description available"}])},serviceSelected:function(t){this.domain=t.detail.domain,this.service=t.detail.service},callService:function(){var t=void 0;try{t=this.serviceData?JSON.parse(this.serviceData):{}}catch(e){return void alert("Error parsing JSON: "+e)}this.hass.serviceActions.callService(this.domain,this.service,t)},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")}})},function(t,e,n){"use strict";var i=n(0);n(6),new i.a({is:"partial-dev-fire-event",properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},eventType:{type:String,value:""},eventData:{type:String,value:""}},eventSelected:function(t){this.eventType=t.detail.eventType},fireEvent:function(){var t=void 0;try{t=this.eventData?JSON.parse(this.eventData):{}}catch(e){return void alert("Error parsing JSON: "+e)}this.hass.eventActions.fireEvent(this.eventType,t)},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")}})},function(t,e,n){"use strict";var i=n(0);n(6),new i.a({is:"partial-dev-info",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},hassVersion:{type:String,bindNuclear:function(t){return t.configGetters.serverVersion}},polymerVersion:{type:String,value:i.a.version},nuclearVersion:{type:String,value:"1.3.0"},errorLog:{type:String,value:""}},attached:function(){this.refreshErrorLog()},refreshErrorLog:function(t){var e=this;t&&t.preventDefault(),this.errorLog="Loading error log…",this.hass.errorLogActions.fetchErrorLog().then(function(t){e.errorLog=t||"No errors have been reported."})}})},function(t,e,n){"use strict";var i=n(0);n(6),new i.a({is:"partial-dev-set-state",properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},entityId:{type:String,value:""},state:{type:String,value:""},stateAttributes:{type:String,value:""}},setStateData:function(t){var e=t?JSON.stringify(t,null," "):"";this.$.inputData.value=e,this.$.inputDataWrapper.update(this.$.inputData)},entitySelected:function(t){var e=this.hass.reactor.evaluate(this.hass.entityGetters.byId(t.detail.entityId));this.entityId=e.entityId,this.state=e.state,this.stateAttributes=JSON.stringify(e.attributes,null," ")},handleSetState:function(){var t=void 0;try{t=this.stateAttributes?JSON.parse(this.stateAttributes):{}}catch(e){return void alert("Error parsing JSON: "+e)}this.hass.entityActions.save({entityId:this.entityId,state:this.state,attributes:t})},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")}})},function(t,e,n){"use strict";var i=n(0);n(6),new i.a({is:"partial-dev-template",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},error:{type:Boolean,value:!1},rendering:{type:Boolean,value:!1},template:{type:String,value:'{%- if is_state("device_tracker.paulus", "home") and \n is_state("device_tracker.anne_therese", "home") -%}\n\n You are both home, you silly\n\n{%- else -%}\n\n Anne Therese is at {{ states("device_tracker.anne_therese") }} and Paulus is at {{ states("device_tracker.paulus") }}\n\n{%- endif %}\n\nFor loop example:\n\n{% for state in states.sensor -%}\n {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}\n {{ state.name | lower }} is {{state.state}} {{- state.attributes.unit_of_measurement}}\n{%- endfor -%}.',observer:"templateChanged"},processed:{type:String,value:""}},computeFormClasses:function(t){return"content fit "+(t?"":"layout horizontal")},computeRenderedClasses:function(t){return t?"error rendered":"rendered"},templateChanged:function(){this.error&&(this.error=!1),this.debounce("render-template",this.renderTemplate,500)},renderTemplate:function(){var t=this;this.rendering=!0,this.hass.templateActions.render(this.template).then(function(e){t.processed=e,t.rendering=!1},function(e){t.processed=e.message,t.error=!0,t.rendering=!1})}})},function(t,e,n){"use strict";var i=n(0);n(6),n(48),new i.a({is:"partial-history",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1},isDataLoaded:{type:Boolean,bindNuclear:function(t){return t.entityHistoryGetters.hasDataForCurrentDate},observer:"isDataLoadedChanged"},stateHistory:{type:Object,bindNuclear:function(t){return t.entityHistoryGetters.entityHistoryForCurrentDate}},isLoadingData:{type:Boolean,bindNuclear:function(t){return t.entityHistoryGetters.isLoadingEntityHistory}},selectedDate:{type:String,value:null,bindNuclear:function(t){return t.entityHistoryGetters.currentDate}}},isDataLoadedChanged:function(t){var e=this;t||this.async(function(){return e.hass.entityHistoryActions.fetchSelectedDate()},1)},handleRefreshClick:function(){this.hass.entityHistoryActions.fetchSelectedDate()},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:this.hass.entityHistoryActions.changeCurrentDate})},detached:function(){this.datePicker.destroy()},computeContentClasses:function(t){return"flex content "+(t?"narrow":"wide")}})},function(t,e,n){"use strict";var i=n(0);n(6),n(142),new i.a({is:"partial-logbook",behaviors:[window.hassBehavior],properties:{hass:{type:Object},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},selectedDate:{type:String,bindNuclear:function(t){return t.logbookGetters.currentDate}},isLoading:{type:Boolean,bindNuclear:function(t){return t.logbookGetters.isLoadingEntries}},isStale:{type:Boolean,bindNuclear:function(t){return t.logbookGetters.isCurrentStale},observer:"isStaleChanged"},entries:{type:Array,bindNuclear:function(t){return[t.logbookGetters.currentEntries,function(t){return t.reverse().toArray()}]}},datePicker:{type:Object}},isStaleChanged:function(t){var e=this;t&&this.async(function(){return e.hass.logbookActions.fetchDate(e.selectedDate)},1)},handleRefresh:function(){this.hass.logbookActions.fetchDate(this.selectedDate)},datepickerFocus:function(){this.datePicker.adjustPosition()},attached:function(){this.datePicker=new window.Pikaday({field:this.$.datePicker.inputElement,onSelect:this.hass.logbookActions.changeCurrentDate})},detached:function(){this.datePicker.destroy()}})},function(t,e,n){"use strict";var i=n(0);n(137),window.L.Icon.Default.imagePath="/static/images/leaflet",new i.a({is:"partial-map",behaviors:[window.hassBehavior],properties:{hass:{type:Object},locationGPS:{type:Number,bindNuclear:function(t){return t.configGetters.locationGPS}},locationName:{type:String,bindNuclear:function(t){return t.configGetters.locationName}},locationEntities:{type:Array,bindNuclear:function(t){return[t.entityGetters.visibleEntityMap,function(t){return t.valueSeq().filter(function(t){return t.attributes.latitude&&"home"!==t.state}).toArray()}]}},zoneEntities:{type:Array,bindNuclear:function(t){return[t.entityGetters.entityMap,function(t){return t.valueSeq().filter(function(t){return"zone"===t.domain&&!t.attributes.passive}).toArray()}]}},narrow:{type:Boolean},showMenu:{type:Boolean,value:!1}},attached:function(){var t=this;(window.L.Browser.mobileWebkit||window.L.Browser.webkit)&&this.async(function(){var e=t.$.map,n=e.style.display;e.style.display="none",t.async(function(){e.style.display=n},1)},1)},computeMenuButtonClass:function(t,e){return!t&&e?"menu-icon invisible":"menu-icon"},toggleMenu:function(){this.fire("open-menu")}})},function(t,e,n){"use strict";var i=n(0);new i.a({is:"notification-manager",behaviors:[window.hassBehavior],properties:{hass:{type:Object},neg:{type:Boolean,value:!1},text:{type:String,bindNuclear:function(t){return t.notificationGetters.lastNotificationMessage},observer:"showNotification"}},showNotification:function(t){t&&this.$.toast.show()}})},function(t,e,n){"use strict";var i=n(0);new i.a({is:"more-info-alarm_control_panel",handleDisarmTap:function(){this.callService("alarm_disarm",{code:this.enteredCode})},handleHomeTap:function(){this.callService("alarm_arm_home",{code:this.enteredCode})},handleAwayTap:function(){this.callService("alarm_arm_away",{code:this.enteredCode})},properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},enteredCode:{type:String,value:""},disarmButtonVisible:{type:Boolean,value:!1},armHomeButtonVisible:{type:Boolean,value:!1},armAwayButtonVisible:{type:Boolean,value:!1},codeInputVisible:{type:Boolean,value:!1},codeInputEnabled:{type:Boolean,value:!1},codeFormat:{type:String,value:""},codeValid:{type:Boolean,computed:"validateCode(enteredCode, codeFormat)"}},validateCode:function(t,e){var n=new RegExp(e);return null===e?!0:n.test(t)},stateObjChanged:function(t){var e=this;t&&(this.codeFormat=t.attributes.code_format,this.codeInputVisible=null!==this.codeFormat,this.codeInputEnabled="armed_home"===t.state||"armed_away"===t.state||"disarmed"===t.state||"pending"===t.state||"triggered"===t.state,this.disarmButtonVisible="armed_home"===t.state||"armed_away"===t.state||"pending"===t.state||"triggered"===t.state,this.armHomeButtonVisible="disarmed"===t.state,this.armAwayButtonVisible="disarmed"===t.state),this.async(function(){return e.fire("iron-resize")},500)},callService:function(t,e){var n=e||{};n.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("alarm_control_panel",t,n)}})},function(t,e,n){"use strict";var i=n(0);new i.a({is:"more-info-configurator",behaviors:[window.hassBehavior],properties:{stateObj:{type:Object},action:{type:String,value:"display"},isStreaming:{type:Boolean,bindNuclear:function(t){return t.streamGetters.isStreamingEvents}},isConfigurable:{type:Boolean,computed:"computeIsConfigurable(stateObj)"},isConfiguring:{type:Boolean,value:!1},submitCaption:{type:String,computed:"computeSubmitCaption(stateObj)"},fieldInput:{type:Object,value:{}}},computeIsConfigurable:function(t){return"configure"===t.state},computeSubmitCaption:function(t){return t.attributes.submit_caption||"Set configuration"},fieldChanged:function(t){var e=t.target;this.fieldInput[e.id]=e.value},submitClicked:function(){var t=this;this.isConfiguring=!0;var e={configure_id:this.stateObj.attributes.configure_id,fields:this.fieldInput};this.hass.serviceActions.callService("configurator","configure",e).then(function(){t.isConfiguring=!1,t.isStreaming||t.hass.syncActions.fetchAll()},function(){t.isConfiguring=!1})}})},function(t,e,n){"use strict";var i=n(0),a=n(15),s=n(54);n(162),n(163),n(169),n(160),n(170),n(168),n(165),n(167),n(171),n(159),n(166),n(164),new i.a({is:"more-info-content",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"}},stateObjChanged:function(t){t&&a.a.bind()(this,"MORE-INFO-"+s.a.bind()(t).toUpperCase(),{hass:this.hass,stateObj:t})}})},function(t,e,n){"use strict";var i=n(0),a=["entity_picture","friendly_name","icon","unit_of_measurement"];new i.a({is:"more-info-default",properties:{stateObj:{type:Object}},computeDisplayAttributes:function(t){return t?Object.keys(t.attributes).filter(function(t){return-1===a.indexOf(t)}):[]},getAttributeValue:function(t,e){var n=t.attributes[e];return Array.isArray(n)?n.join(", "):n}})},function(t,e,n){"use strict";var i=n(0),a=n(15),s=n(54);n(28),new i.a({is:"more-info-group",behaviors:[window.hassBehavior],properties:{hass:{type:Object},stateObj:{type:Object},states:{type:Array,bindNuclear:function(t){return[t.moreInfoGetters.currentEntity,t.entityGetters.entityMap,function(t,e){return t?t.attributes.entity_id.map(e.get.bind(e)):[]}]}}},observers:["statesChanged(stateObj, states)"],statesChanged:function(t,e){var n=!1;if(e&&e.length>0){var r=e[0];n=r.set("entityId",t.entityId).set("attributes",Object.assign({},r.attributes));for(var o=0;ot||t>=this.stateObj.attributes.source_list.length)){var e=this.stateObj.attributes.source_list[t];e!==this.stateObj.attributes.source&&this.callService("select_source",{source:e})}},handleVolumeTap:function(){this.supportsVolumeMute&&this.callService("volume_mute",{is_volume_muted:!this.isMuted})},handleVolumeUp:function(){var t=this.$.volumeUp;this.handleVolumeWorker("volume_up",t,!0)},handleVolumeDown:function(){var t=this.$.volumeDown;this.handleVolumeWorker("volume_down",t,!0)},handleVolumeWorker:function(t,e,n){var i=this;(n||void 0!==e&&e.pointerDown)&&(this.callService(t),this.async(function(){return i.handleVolumeWorker(t,e,!1)},500))},volumeSliderChanged:function(t){var e=parseFloat(t.target.value),n=e>0?e/100:0;this.callService("volume_set",{volume_level:n})},callService:function(t,e){ +var n=e||{};n.entity_id=this.stateObj.entityId,this.hass.serviceActions.callService("media_player",t,n)}})},function(t,e,n){"use strict";var i=n(0);new i.a({is:"more-info-script",properties:{stateObj:{type:Object}}})},function(t,e,n){"use strict";var i=n(0),a=n(52);new i.a({is:"more-info-sun",properties:{stateObj:{type:Object},risingDate:{type:Object,computed:"computeRising(stateObj)"},settingDate:{type:Object,computed:"computeSetting(stateObj)"}},computeRising:function(t){return new Date(t.attributes.next_rising)},computeSetting:function(t){return new Date(t.attributes.next_setting)},computeOrder:function(t,e){return t>e?["set","ris"]:["ris","set"]},itemCaption:function(t){return"ris"===t?"Rising ":"Setting "},itemDate:function(t){return"ris"===t?this.risingDate:this.settingDate},itemValue:function(t){return a.a.bind()(this.itemDate(t))}})},function(t,e,n){"use strict";var i=n(0),a=n(14),s=["away_mode"];new i.a({is:"more-info-thermostat",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},tempMin:{type:Number},tempMax:{type:Number},targetTemperatureSliderValue:{type:Number},awayToggleChecked:{type:Boolean}},stateObjChanged:function(t){this.targetTemperatureSliderValue=t.attributes.temperature,this.awayToggleChecked="on"===t.attributes.away_mode,this.tempMin=t.attributes.min_temp,this.tempMax=t.attributes.max_temp},computeClassNames:function(t){return a.a.bind()(t,s)},targetTemperatureSliderChanged:function(t){this.hass.serviceActions.callService("thermostat","set_temperature",{entity_id:this.stateObj.entityId,temperature:t.target.value})},toggleChanged:function(t){var e=t.target.checked;e&&"off"===this.stateObj.attributes.away_mode?this.service_set_away(!0):e||"on"!==this.stateObj.attributes.away_mode||this.service_set_away(!1)},service_set_away:function(t){var e=this;this.hass.serviceActions.callService("thermostat","set_away_mode",{away_mode:t,entity_id:this.stateObj.entityId}).then(function(){return e.stateObjChanged(e.stateObj)})}})},function(t,e,n){"use strict";var i=n(0);new i.a({is:"more-info-updater",properties:{}})},function(t,e,n){"use strict";var i=n(0);n(2),n(49),new i.a({is:"state-card-configurator",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(t,e,n){"use strict";var i=n(0);n(2),new i.a({is:"state-card-hvac",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(t,e,n){"use strict";var i=n(0);n(2),new i.a({is:"state-card-input_select",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object},selectedOption:{type:String,observer:"selectedOptionChanged"}},computeSelected:function(t){return t.attributes.options.indexOf(t.state)},selectedOptionChanged:function(t){""!==t&&t!==this.stateObj.state&&this.hass.serviceActions.callService("input_select","select_option",{option:t,entity_id:this.stateObj.entityId})},stopPropagation:function(t){t.stopPropagation()}})},function(t,e,n){"use strict";var i=n(0);n(2),new i.a({is:"state-card-input_slider",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object,observer:"stateObjectChanged"},min:{type:Number},max:{type:Number},step:{type:Number},value:{type:Number}},stateObjectChanged:function(t){this.value=Number(t.state),this.min=Number(t.attributes.min),this.max=Number(t.attributes.max),this.step=Number(t.attributes.step)},selectedValueChanged:function(){this.value!==Number(this.stateObj.state)&&this.hass.serviceActions.callService("input_slider","select_value",{value:this.value,entity_id:this.stateObj.entityId})}})},function(t,e,n){"use strict";var i=n(0),a=(n(2),["playing","paused"]);new i.a({is:"state-card-media_player",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object},isPlaying:{type:Boolean,computed:"computeIsPlaying(stateObj)"},secondaryText:{type:String,computed:"computeSecondaryText(stateObj)"}},computeIsPlaying:function(t){return-1!==a.indexOf(t.state)},computePrimaryText:function(t,e){return e?t.attributes.media_title:t.stateDisplay},computeSecondaryText:function(t){var e=void 0;return"music"===t.attributes.media_content_type?t.attributes.media_artist:"tvshow"===t.attributes.media_content_type?(e=t.attributes.media_series_title,t.attributes.media_season&&t.attributes.media_episode&&(e+=" S"+t.attributes.media_season+"E"+t.attributes.media_episode),e):t.attributes.app_name?t.attributes.app_name:""}})},function(t,e,n){"use strict";var i=n(0);n(2),new i.a({is:"state-card-rollershutter",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},computeIsFullyOpen:function(t){return 100===t.attributes.current_position},computeIsFullyClosed:function(t){return 0===t.attributes.current_position},onMoveUpTap:function(){this.hass.serviceActions.callService("rollershutter","move_up",{entity_id:this.stateObj.entityId})},onMoveDownTap:function(){this.hass.serviceActions.callService("rollershutter","move_down",{entity_id:this.stateObj.entityId})},onStopTap:function(){this.hass.serviceActions.callService("rollershutter","stop",{entity_id:this.stateObj.entityId})}})},function(t,e,n){"use strict";var i=n(0);n(2),new i.a({is:"state-card-scene",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},activateScene:function(t){t.stopPropagation(),this.hass.serviceActions.callTurnOn(this.stateObj.entityId)}})},function(t,e,n){"use strict";var i=n(0);n(2),n(27),new i.a({is:"state-card-script",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},fireScript:function(t){t.stopPropagation(),this.hass.serviceActions.callTurnOn(this.stateObj.entityId)}})},function(t,e,n){"use strict";var i=n(0);n(2),new i.a({is:"state-card-thermostat",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},computeTargetTemperature:function(t){return t.attributes.temperature+" "+t.attributes.unit_of_measurement}})},function(t,e,n){"use strict";var i=n(0);n(2),n(27),new i.a({is:"state-card-toggle",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}})},function(t,e,n){"use strict";var i=n(0);n(2),new i.a({is:"state-card-weblink",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},listeners:{tap:"onTap"},onTap:function(t){t.stopPropagation(),t.target!==this.$.link&&window.open(this.stateObj.state,"_blank")}})},function(t,e,n){"use strict";e.a=["off","closed","unlocked"]},function(t,e,n){"use strict";function i(t,e){return"unavailable"===e.state?"display":-1!==s.indexOf(e.domain)?e.domain:a.a.bind()(t,e.entityId)?"toggle":"display"}var a=n(50);e.a=i;var s=["configurator","hvac","input_select","input_slider","media_player","rollershutter","scene","script","thermostat","weblink"]},function(t,e,n){var i,a;!function(){"use strict";function n(){for(var t=[],e=0;e \ No newline at end of file diff --git a/homeassistant/components/frontend/www_static/frontend.html.gz b/homeassistant/components/frontend/www_static/frontend.html.gz index e810428aeac..e95ebe7c383 100644 Binary files a/homeassistant/components/frontend/www_static/frontend.html.gz and b/homeassistant/components/frontend/www_static/frontend.html.gz differ diff --git a/homeassistant/components/frontend/www_static/home-assistant-polymer b/homeassistant/components/frontend/www_static/home-assistant-polymer index 07a1663b6cc..0a57e081563 160000 --- a/homeassistant/components/frontend/www_static/home-assistant-polymer +++ b/homeassistant/components/frontend/www_static/home-assistant-polymer @@ -1 +1 @@ -Subproject commit 07a1663b6cc6c7fbb9fcd2d46be504d93738bd17 +Subproject commit 0a57e081563742c40d7a0b42acf3b662697acc51 diff --git a/homeassistant/components/frontend/www_static/service_worker.js b/homeassistant/components/frontend/www_static/service_worker.js index fe50a05588c..0aa9421f6a4 100644 --- a/homeassistant/components/frontend/www_static/service_worker.js +++ b/homeassistant/components/frontend/www_static/service_worker.js @@ -29,7 +29,7 @@ /* eslint-disable quotes, comma-spacing */ -var PrecacheConfig = [["/","6c27e741384b7b0a65d72c81533871b4"],["/devEvent","6c27e741384b7b0a65d72c81533871b4"],["/devInfo","6c27e741384b7b0a65d72c81533871b4"],["/devService","6c27e741384b7b0a65d72c81533871b4"],["/devState","6c27e741384b7b0a65d72c81533871b4"],["/devTemplate","6c27e741384b7b0a65d72c81533871b4"],["/history","6c27e741384b7b0a65d72c81533871b4"],["/logbook","6c27e741384b7b0a65d72c81533871b4"],["/map","6c27e741384b7b0a65d72c81533871b4"],["/states","6c27e741384b7b0a65d72c81533871b4"],["/static/core-d0b415dac66c8056d81380b258af5767.js","dfafa8e9e34f53e8c36dd8b3f7299b2a"],["/static/frontend-d842fd7095ef0d3a5c1d67494bb50adb.html","6c27e741384b7b0a65d72c81533871b4"],["/static/mdi-9ee3d4466a65bef35c2c8974e91b37c0.html","9a6846935116cd29279c91e0ee0a26d0"],["static/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"],["static/webcomponents-lite.min.js","b0f32ad3c7749c40d486603f31c9d8b1"]]; +var PrecacheConfig = [["/","63462be7753b15b77a4efd9865534094"],["/devEvent","63462be7753b15b77a4efd9865534094"],["/devInfo","63462be7753b15b77a4efd9865534094"],["/devService","63462be7753b15b77a4efd9865534094"],["/devState","63462be7753b15b77a4efd9865534094"],["/devTemplate","63462be7753b15b77a4efd9865534094"],["/history","63462be7753b15b77a4efd9865534094"],["/logbook","63462be7753b15b77a4efd9865534094"],["/map","63462be7753b15b77a4efd9865534094"],["/states","63462be7753b15b77a4efd9865534094"],["/static/core-d0b415dac66c8056d81380b258af5767.js","dfafa8e9e34f53e8c36dd8b3f7299b2a"],["/static/frontend-03325162d9fbc6bef9345b5d9f5f3acc.html","63462be7753b15b77a4efd9865534094"],["/static/mdi-9ee3d4466a65bef35c2c8974e91b37c0.html","9a6846935116cd29279c91e0ee0a26d0"],["static/favicon-192x192.png","419903b8422586a7e28021bbe9011175"],["static/fonts/roboto/Roboto-Bold.ttf","d329cc8b34667f114a95422aaad1b063"],["static/fonts/roboto/Roboto-Light.ttf","7b5fb88f12bec8143f00e21bc3222124"],["static/fonts/roboto/Roboto-Medium.ttf","fe13e4170719c2fc586501e777bde143"],["static/fonts/roboto/Roboto-Regular.ttf","ac3f799d5bbaf5196fab15ab8de8431c"],["static/images/card_media_player_bg.png","a34281d1c1835d338a642e90930e61aa"],["static/webcomponents-lite.min.js","b0f32ad3c7749c40d486603f31c9d8b1"]]; /* eslint-enable quotes, comma-spacing */ var CacheNamePrefix = 'sw-precache-v1--' + (self.registration ? self.registration.scope : '') + '-'; diff --git a/homeassistant/components/frontend/www_static/service_worker.js.gz b/homeassistant/components/frontend/www_static/service_worker.js.gz index 0aecb108c25..b632b6745f8 100644 Binary files a/homeassistant/components/frontend/www_static/service_worker.js.gz and b/homeassistant/components/frontend/www_static/service_worker.js.gz differ