evcc-io/dist/js/index.9033e567.js
2021-08-20 17:41:39 +02:00

2 lines
No EOL
52 KiB
JavaScript

(function(t){function e(e){for(var s,n,r=e[0],l=e[1],c=e[2],u=0,p=[];u<r.length;u++)n=r[u],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&p.push(o[n][0]),o[n]=0;for(s in l)Object.prototype.hasOwnProperty.call(l,s)&&(t[s]=l[s]);d&&d(e);while(p.length)p.shift()();return i.push.apply(i,c||[]),a()}function a(){for(var t,e=0;e<i.length;e++){for(var a=i[e],s=!0,r=1;r<a.length;r++){var l=a[r];0!==o[l]&&(s=!1)}s&&(i.splice(e--,1),t=n(n.s=a[0]))}return t}var s={},o={index:0},i=[];function n(e){if(s[e])return s[e].exports;var a=s[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=t,n.c=s,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(a,s,function(e){return t[e]}.bind(null,s));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],l=r.push.bind(r);r.push=e,r=r.slice();for(var c=0;c<r.length;c++)e(r[c]);var d=l;i.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("9e0e")},1042:function(t,e,a){},"15b5":function(t,e,a){"use strict";a("616a")},2504:function(t,e,a){"use strict";a("b743")},"251b":function(t,e,a){},"3cbf":function(t,e,a){"use strict";a("826b")},"3e58":function(t,e,a){"use strict";a("8000")},"46d4":function(t,e,a){"use strict";a("ec98")},"481e":function(t,e,a){"use strict";a("1042")},6062:function(t,e,a){"use strict";a("251b")},"616a":function(t,e,a){},"702d":function(t,e,a){"use strict";a("ed92")},8e3:function(t,e,a){},"826b":function(t,e,a){},"9e0e":function(t,e,a){"use strict";a.r(e);a("ab8b"),a("7b17"),a("b19f");var s=a("2b0e"),o=a("58ca"),i=a("bc3a"),n=a.n(i),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app d-flex flex-column justify-content-between overflow-hidden"},[a("div",{staticClass:"flex-grow-1 d-flex flex-column justify-content-between"},[a("nav",{staticClass:"navbar navbar-expand-lg navbar-dark bg-dark"},[a("div",{staticClass:"container"},[a("a",{staticClass:"navbar-brand",attrs:{href:"https://github.com/andig/evcc"}},[a("Logo",{staticClass:"logo"})],1),a("div",{staticClass:"d-flex"},[a("div",{staticClass:"d-flex"},[a("Notifications",{attrs:{notifications:t.notifications}}),t._m(0)],1),a("div",{staticClass:"collapse navbar-collapse flex-lg-grow-0",attrs:{id:"navbarNavAltMarkup"}},[a("ul",{staticClass:"navbar-nav"},[a("li",{staticClass:"nav-item"},[a("a",{staticClass:"nav-link",attrs:{href:"https://github.com/andig/evcc/discussions",target:"_blank"}},[t._v(" "+t._s(t.$t("header.support"))+" ")])])])])])])]),a("router-view",{staticClass:"flex-grow-1 d-flex flex-column justify-content-stretch"})],1),a("Footer",{attrs:{version:t.version,sponsor:t.sponsor}})],1)},l=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("button",{staticClass:"navbar-toggler",attrs:{type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarNavAltMarkup","aria-controls":"navbarNavAltMarkup","aria-expanded":"false","aria-label":"Toggle navigation"}},[a("span",{staticClass:"navbar-toggler-icon"})])}],c=a("ad3d"),d=a("ecee"),u=a("8475"),p=a("39f0"),m=a("8718"),h=a("7c8d"),v=a("c6b3"),f=a("aeda"),g=a("5d61"),b=a("5dae"),C=a("8560"),_=a("af2b"),w=a("f303"),y=a("7116"),S=a("fdca"),x=a("6023"),k=a("91fb"),D=a("184c"),N=a("ba01"),E=a("a17a"),$=a("f15f"),A=a("6c88"),P=a("adbc"),j=a("a819"),T=a("23dc");d["c"].add(g["faAngleDown"],f["faAngleUp"],u["faBatteryEmpty"],p["faBatteryFull"],m["faBatteryHalf"],h["faBatteryQuarter"],v["faBatteryThreeQuarters"],N["faBox"],$["faCar"],j["faAngleDoubleLeft"],T["faAngleDoubleRight"],b["faClock"],P["faExclamationCircle"],C["faExclamationTriangle"],D["faGift"],E["faHome"],x["faHeart"],k["faHeart"],A["faSquare"],_["faSun"],w["faTemperatureHigh"],y["faTemperatureLow"],S["faThermometerHalf"]),s["a"].component("fa-icon",c["a"]);var M=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("svg",{attrs:{viewBox:"0 0 122 35",xmlns:"http://www.w3.org/2000/svg","fill-rule":"evenodd","clip-rule":"evenodd","stroke-linejoin":"round","stroke-miterlimit":"2"}},[a("path",{attrs:{d:"M13.082 29.071a12.384 12.384 0 01-9-3.42 12.192 12.192 0 01-3.54-9.12v-.64a15.394 15.394 0 011.47-6.83 10.825 10.825 0 014.17-4.64 11.64 11.64 0 016.15-1.63 10.45 10.45 0 018.21 3.26c2 2.194 3 5.297 3 9.31v2.76H7.382a6.348 6.348 0 002 4 5.997 5.997 0 004.16 1.49 7.305 7.305 0 006.1-2.84l3.31 3.73a10 10 0 01-4.13 3.39 13.309 13.309 0 01-5.74 1.18zm-.77-20.84a4.216 4.216 0 00-3.26 1.37 7.141 7.141 0 00-1.6 3.91h9.39v-.55a5.005 5.005 0 00-1.22-3.49 4.304 4.304 0 00-3.31-1.24zM36.452 20.331l4.7-17.09h7l-8.48 25.36h-6.44l-8.52-25.36h7l4.74 17.09zM85.542 23.611a4.444 4.444 0 003-1 3.638 3.638 0 001.22-2.75h6.32a8.668 8.668 0 01-1.4 4.73 9.145 9.145 0 01-3.79 3.3 11.736 11.736 0 01-5.29 1.19 10.912 10.912 0 01-8.54-3.46c-2.087-2.3-3.13-5.483-3.13-9.55v-.45c0-3.9 1.033-7.016 3.1-9.35a10.868 10.868 0 018.51-3.5c2.791-.134 5.524.84 7.6 2.71a9.626 9.626 0 012.9 7.21h-6.3a4.663 4.663 0 00-1.2-3.22 4.005 4.005 0 00-3.08-1.24 4.068 4.068 0 00-3.56 1.73c-.8 1.15-1.2 3-1.2 5.6v.7c0 2.61.39 4.49 1.19 5.63a4.092 4.092 0 003.65 1.72zM110.422 23.611a4.454 4.454 0 003-1 3.63 3.63 0 001.21-2.75h6.33a8.668 8.668 0 01-1.4 4.73 9.143 9.143 0 01-3.73 3.3 11.76 11.76 0 01-5.29 1.18 10.912 10.912 0 01-8.54-3.46c-2.087-2.3-3.13-5.483-3.13-9.55v-.45c0-3.9 1.033-7.016 3.1-9.35a10.85 10.85 0 018.57-3.49 10.575 10.575 0 017.6 2.71 9.598 9.598 0 012.91 7.21h-6.33a4.651 4.651 0 00-1.21-3.22 4.492 4.492 0 00-6.64.49c-.8 1.15-1.21 3-1.21 5.6v.7c0 2.607.4 4.484 1.2 5.63a4.09 4.09 0 003.56 1.72z",fill:"#fff","fill-rule":"nonzero"}}),a("path",{attrs:{d:"M58.462.751h9.22l-6.14 12.3h6.15l-11.53 21.51 2.3-15.36h-7.68l7.68-18.45z",fill:"#0fdd42","fill-rule":"nonzero"}}),a("path",{attrs:{fill:"none",d:"M-24.458-22.109h170v76h-170z"}})])},L=[],V={name:"Logo"},B=V,I=a("2877"),U=Object(I["a"])(B,M,L,!1,null,null,null),z=U.exports,O=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("footer",{staticClass:"container"},[a("div",{staticClass:"py-3 py-md-5 mt-3 mt-md-5 border-top"},[a("div",{staticClass:"d-flex justify-content-between"},[a("Version",t._b({},"Version",t.version,!1)),a("Sponsor",{attrs:{sponsor:t.sponsor}})],1)])])},R=[],H=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.newVersionAvailable?a("button",{staticClass:"btn btn-link ps-0 text-decoration-none link-dark text-nowrap",attrs:{href:"#","data-bs-toggle":"modal","data-bs-target":"#updateModal"}},[a("fa-icon",{staticClass:"icon me-1",attrs:{icon:"gift"}}),a("span",{staticClass:"d-none d-sm-inline"},[t._v(" "+t._s(t.$t("footer.version.availableLong"))+": ")]),a("span",{staticClass:"d-inline d-sm-none"},[t._v(" "+t._s(t.$t("footer.version.availableShort"))+": ")]),t._v(" "+t._s(t.available)+" ")],1):a("a",{staticClass:"btn btn-link ps-0 text-decoration-none link-dark text-nowrap",attrs:{href:t.releaseNotesUrl(t.installed),target:"_blank"}},[t._v(" "+t._s(t.$t("footer.version.version"))+" "+t._s(t.installed)+" ")]),a("div",{staticClass:"modal fade",attrs:{id:"updateModal",tabindex:"-1",role:"dialog","aria-hidden":"true"}},[a("div",{staticClass:"modal-dialog modal-dialog-centered modal-dialog-scrollable",attrs:{role:"document"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("h5",{staticClass:"modal-title"},[t._v(t._s(t.$t("footer.version.modalTitle")))]),a("button",{staticClass:"btn-close",attrs:{type:"button","data-bs-dismiss":"modal","aria-label":"Close"}})]),a("div",{staticClass:"modal-body"},[t.updateStarted?a("div",[a("p",[t._v(t._s(t.$t("footer.version.modalUpdateStarted")))]),a("div",{staticClass:"progress my-3"},[a("div",{staticClass:"progress-bar progress-bar-striped progress-bar-animated",style:{width:t.uploadProgress+"%"},attrs:{role:"progressbar"}})]),a("p",[t._v(t._s(t.updateStatus)+t._s(t.uploadMessage))])]):a("div",[a("p",[a("small",[t._v(" "+t._s(t.$t("footer.version.modalInstalledVersion"))+": "+t._s(t.installed)+" ")])]),t.releaseNotes?a("div",{domProps:{innerHTML:t._s(t.releaseNotes)}}):a("p",[t._v(" "+t._s(t.$t("footer.version.modalNoReleaseNotes"))+" "),a("a",{attrs:{href:t.releaseNotesUrl(t.available)}},[t._v("GitHub")]),t._v(". ")])])]),a("div",{staticClass:"modal-footer d-flex justify-content-between"},[a("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button",disabled:t.updateStarted,"data-bs-dismiss":"modal"}},[t._v(" "+t._s(t.$t("footer.version.modalCancel"))+" ")]),a("div",[t.hasUpdater?a("button",{staticClass:"btn btn-primary",attrs:{type:"button",disabled:t.updateStarted},on:{click:t.update}},[t.updateStarted?a("span",[a("span",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status","aria-hidden":"true"}}),t._v(" "+t._s(t.$t("footer.version.modalUpdate"))+" ")]):a("span",[t._v(t._s(t.$t("footer.version.modalUpdateNow")))])]):a("a",{staticClass:"btn btn-primary",attrs:{href:t.releaseNotesUrl(t.available)}},[t._v(" "+t._s(t.$t("footer.version.modalDownload"))+" ")])])])])])])])},F=[],W={name:"Version",props:{installed:String,available:String,releaseNotes:String,hasUpdater:Boolean,uploadMessage:String,uploadProgress:Number},data:function(){return{updateStarted:!1,updateStatus:""}},methods:{update:async function(){try{await n.a.post("update"),this.updateStatus=this.$t("footer.version.modalUpdateStatusStart"),this.updateStarted=!0}catch(t){this.updateStatus=this.$t("footer.version.modalUpdateStatusStart")+t}},releaseNotesUrl:function(t){return"https://github.com/andig/evcc/releases/tag/"+t}},computed:{newVersionAvailable:function(){return this.available&&"[[.Version]]"!=this.installed&&"0.0.1-alpha"!=this.installed&&this.available!=this.installed}}},K=W,q=(a("15b5"),Object(I["a"])(K,H,F,!1,null,"99c2e68a",null)),G=q.exports,Z=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.sponsor?a("div",{ref:"sponsor",staticClass:"btn btn-link pe-0 text-decoration-none link-dark text-nowrap sponsor-button",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.surprise.apply(null,arguments)}}},[a("span",{staticClass:"d-inline d-sm-none"},[t._v(t._s(t.$t("footer.sponsor.sponsoredShort")))]),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.$t("footer.sponsor.sponsoredLong",{sponsor:t.sponsor})))]),a("fa-icon",{staticClass:"icon ms-1",attrs:{icon:["fas","heart"]}})],1):a("a",{staticClass:"btn btn-link pe-0 text-decoration-none link-dark text-nowrap support-button",attrs:{href:"https://github.com/sponsors/andig",target:"_blank"}},[a("span",{staticClass:"d-inline d-sm-none"},[t._v(t._s(t.$t("footer.sponsor.supportProjectShort")))]),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.$t("footer.sponsor.supportProjectLong")))]),a("fa-icon",{staticClass:"icon ms-1 outline",attrs:{icon:["far","heart"]}}),a("fa-icon",{staticClass:"icon ms-1 solid",attrs:{icon:["fas","heart"]}})],1)},J=[],Q=a("7129"),Y={name:"sponsor",props:{sponsor:String},methods:{surprise:function(){console.log(this.$refs.sponsor);const{top:t,height:e,left:a,width:s}=this.$refs.sponsor.getBoundingClientRect(),o=(a+s/2)/window.innerWidth,i=(t+e/2)/window.innerHeight,n={x:o,y:i};Object(Q["a"])({origin:n,angle:90+35*Math.random(),particleCount:75+50*Math.random(),spread:50+50*Math.random(),drift:-.5,scalar:1.3,colors:["#0d6efd","#0fdd42","#408458","#4923BA","#5BC8EC","#C54482","#CC444A","#EE8437","#F7C144","#FFFD54"]})}}},X=Y,tt=(a("6062"),Object(I["a"])(X,Z,J,!1,null,"1eecc7b7",null)),et=tt.exports,at={name:"Footer",components:{Version:G,Sponsor:et},props:{version:Object,sponsor:String}},st=at,ot=Object(I["a"])(st,O,R,!1,null,null,null),it=ot.exports,nt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("button",{directives:[{name:"show",rawName:"v-show",value:t.iconVisible,expression:"iconVisible"}],staticClass:"btn btn-link text-decoration-none link-light text-nowrap",attrs:{href:"#","data-bs-toggle":"modal","data-bs-target":"#notificationModal"}},[a("fa-icon",{class:t.iconClass,attrs:{icon:"exclamation-triangle"}})],1),a("div",{staticClass:"modal fade",attrs:{id:"notificationModal",tabindex:"-1",role:"dialog","aria-hidden":"true"}},[a("div",{staticClass:"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable",attrs:{role:"document"}},[a("div",{staticClass:"modal-content"},[a("div",{staticClass:"modal-header"},[a("h5",{staticClass:"modal-title"},[t._v(t._s(t.$t("notifications.modalTitle")))]),a("button",{staticClass:"btn-close",attrs:{type:"button","data-bs-dismiss":"modal","aria-label":"Close"}})]),a("div",{staticClass:"modal-body"},t._l(t.notifications,(function(e,s){return a("div",{key:s},[a("small",{staticClass:"d-flex justify-content-end mt-3",attrs:{title:t.fmtAbsoluteDate(e.time)}},[t._v(" "+t._s(t.fmtTimeAgo(e.time))+" ")]),a("p",{staticClass:"d-flex align-items-baseline"},[a("fa-icon",{staticClass:"flex-grow-0 d-block",class:{"text-danger":"error"===e.type,"text-warning":"warn"===e.type},attrs:{icon:"exclamation-triangle"}}),a("span",{staticClass:"flex-grow-1 px-2 py-1 text-break"},[t._v(" "+t._s(e.message)+" ")]),e.count>1?a("span",{staticClass:"badge rounded-pill bg-secondary"},[t._v(" "+t._s(e.count)+" ")]):t._e()],1)])})),0),a("div",{staticClass:"modal-footer"},[a("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button","data-bs-dismiss":"modal","aria-label":"Close"},on:{click:t.clear}},[t._v(" "+t._s(t.$t("notifications.dismissAll"))+" ")])])])])])])},rt=[],lt={data:function(){return{fmtLimit:100,fmtDigits:1}},methods:{round:function(t,e){var a=10**e;return(Math.round(t*a)/a).toFixed(e)},fmt:function(t){return void 0===t||null===t?0:(t=Math.abs(t),t>=this.fmtLimit?this.round(t/1e3,this.fmtDigits):this.round(t,0))},fmtKw:function(t,e=!0,a=!0){const s=e?1:0,o=e?t/1e3:t;let i="";return a&&(i=e?" kW":" W"),this.$n(o,{minimumFractionDigits:s,maximumFractionDigits:s})+i},fmtUnit:function(t){return Math.abs(t)>=this.fmtLimit?"k":""},fmtDuration:function(t){if(t<=0||null==t)return"—";var e="0"+t%60,a="0"+Math.floor(t/60)%60,s=""+Math.floor(t/3600);return s.length<2&&(s="0"+s),s+":"+a.substr(-2)+":"+e.substr(-2)},fmtShortDuration:function(t){if(t<=0||null==t)return"—";var e,a=Math.floor(t/60)%60,s=Math.floor(t/3600);if(s>=1)a="0"+a,e=s+":"+a.substr(-2);else{var o="0"+t%60;e=a+":"+o.substr(-2)}return e},fmtShortDurationUnit:function(t){if(t<=0||null==t)return"";var e=Math.floor(t/3600);return e>=1?"h":"m"},fmtDayString:function(t){const e=""+t.getFullYear(),a=(""+(t.getMonth()+1)).padStart(2,"0"),s=(""+t.getDate()).padStart(2,"0");return`${e}-${a}-${s}`},fmtTimeString:function(t){const e=(""+t.getHours()).padStart(2,"0"),a=(""+t.getMinutes()).padStart(2,"0");return`${e}:${a}`},fmtAbsoluteDate:function(t){return new Intl.DateTimeFormat("default",{weekday:"short",hour:"numeric",minute:"numeric"}).format(t)},fmtTimeAgo:function(t){const e={year:31536e6,month:2628e6,day:864e5,hour:36e5,minute:6e4,second:1e3},a=new Intl.RelativeTimeFormat("default",{numeric:"auto"}),s=t-new Date;for(var o in e)if(Math.abs(s)>e[o]||"second"==o)return a.format(Math.round(s/e[o]),o)}}},ct={name:"Notifications",props:{notifications:Array},computed:{iconVisible:function(){return this.notifications.length>0},iconClass:function(){return this.notifications.find(t=>"error"===t.type)?"text-danger":"text-warning"}},methods:{clear:function(){window.app&&window.app.clear()}},created:function(){this.interval=setInterval(()=>{this.$forceUpdate()},1e4)},destroyed:function(){clearTimeout(this.interval)},mixins:[lt]},dt=ct,ut=Object(I["a"])(dt,nt,rt,!1,null,null,null),pt=ut.exports;function mt(t,e,a){const o=e.shift();t[o]||s["a"].set(t,o,{}),e.length?mt(t[o],e,a):a&&"object"===typeof a&&!Array.isArray(a)?t[o]={...t[o],...a}:t[o]=a}const ht={state:{loadpoints:[]},update:function(t){Object.keys(t).forEach((function(e){"function"===typeof window.app[e]?window.app[e]({message:t[e]}):mt(ht.state,e.split("."),t[e])}))}};var vt=ht,ft={name:"App",components:{Logo:z,Footer:it,Notifications:pt},data:function(){return{compact:!1,store:this.$root.$data.store,installedVersion:window.evcc.version}},methods:{connect:function(){const t=window.location,e="https:"==t.protocol?"wss:":"ws:",a=e+"//"+t.hostname+(t.port?":"+t.port:"")+t.pathname+"ws",s=new WebSocket(a),o=this;s.onerror=function(){s.close()},s.onclose=function(){window.setTimeout(o.connect,1e3)},s.onmessage=function(t){try{var e=JSON.parse(t.data);vt.update(e)}catch(a){window.app.error(a,t.data)}}},reload(){window.location.reload()}},metaInfo(){return{title:this.title?"evcc | "+this.title:"evcc"}},computed:{version:function(){return{installed:this.installedVersion,available:this.store.state.availableVersion,releaseNotes:this.store.state.releaseNotes,hasUpdater:this.store.state.hasUpdater,uploadMessage:this.store.state.uploadMessage,uploadProgress:this.store.state.uploadProgress}},title:function(){return this.store.state.siteTitle},sponsor:function(){return this.store.state.sponsor}},props:{notifications:Array},created:function(){const t=new URLSearchParams(window.location.search);this.compact=t.get("compact"),this.connect()}},gt=ft,bt=(a("481e"),Object(I["a"])(gt,r,l,!1,null,"39045b4c",null)),Ct=bt.exports,_t=a("8c4f"),wt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[t.configured?a("Site",t._b({},"Site",t.state,!1)):a("div",[a("div",{staticClass:"row py-5"},[a("div",{staticClass:"col12"},[a("p",{staticClass:"h1 pt-5 pb-2 border-bottom"},[t._v("Willkommen bei evcc")]),a("p",{staticClass:"lead pt-2"},[a("b",[t._v("evcc")]),t._v(" ist dient zur flexiblen Ladesteuerung von Elektrofahrzeugen. ")]),a("p",{staticClass:"pt-2"},[t._v(" Es sieht aus, als wäre Dein "),a("b",[t._v("evcc")]),t._v(" noch nicht konfiguriert. Um "),a("b",[t._v("evcc")]),t._v(" zu konfigurieren sind die folgenden Schritte notwendig: ")]),a("ol",{staticClass:"pt-2"},[a("li",[t._v(" Erzeugen einer Konfigurationsdatei mit Namen "),a("code",[t._v("evcc.yaml")]),t._v(". Die Standardkonfiguration "),a("code",[t._v("evcc.dist.yaml")]),t._v(" kann dafür als Vorlage dienen ("),a("a",{attrs:{href:"https://github.com/andig/evcc/blob/master/evcc.dist.yaml"}},[t._v("Download")]),t._v("). ")]),a("li",[t._v("Konfiguration der Wallbox als "),a("code",[t._v("chargers")]),t._v(".")]),a("li",[t._v(" Konfiguration des EVU Zählers und evtl. weiterer Zähler unter "),a("code",[t._v("meters")]),t._v(". ")]),a("li",[t._v(" Konfiguration des Netzanschlusses unter "),a("code",[t._v("site")]),t._v(". In einer Site wird der Netzanschluss mit dem konfigurierten EVU Zähler ("),a("code",[t._v("meter")]),t._v(") verbunden. ")]),a("li",[t._v(" Konfiguration eines Ladepunktes unter "),a("code",[t._v("loadpoints")]),t._v(". In einem Ladepunkt wird die konfigurierte Wallbox ("),a("code",[t._v("charger")]),t._v(") mit dem Ladepunkt verbunden. ")]),a("li",[t._v(" Start von "),a("b",[t._v("evcc")]),t._v(" mit der neu erstellten Konfiguration: "),a("code",[t._v("evcc -c evcc.yaml")])])]),a("p",[t._v("Minimale Beispielkonfiguration für "),a("b",[t._v("evcc")]),t._v(":")]),a("p",[a("code",[a("pre",{staticClass:"mx-3"},[t._v(" uri: localhost:7070 # Adresse für UI\n interval: 10s # Regelintervall\n meters:\n - name: evu-zähler\n type: ... # Detailkonfiguration des EVU Zählers\n - name: ladezähler\n type: ... # Detailkonfiguration des Ladezählers (optional)\n chargers:\n - name: wallbox\n type: ... # Detailkonfiguration der Wallbox\n site:\n title: Home\n meters:\n grid: evu-zähler # EVU Zähler\n loadpoints:\n - title: Ladepunkt # ui display name\n charger: wallbox # charger\n meters:\n charge: ladezähler # Ladezählers (optional)\n ")])])]),a("p",[t._v(" Viel Spass mit "),a("b",[t._v("evcc")]),t._v("! Bei Problemen kannst Du uns auf "),a("a",{attrs:{href:"https://github.com/andig/evcc/issues"}},[t._v("GitHub")]),t._v(" erreichen. ")])])])])],1)},yt=[],St=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"flex-grow-1 d-flex flex-column"},[a("h3",{staticClass:"d-none d-md-block my-4"},[t._v(" "+t._s(t.siteTitle||"Home")+" ")]),a("Energyflow",t._b({},"Energyflow",t.energyflow,!1)),a("hr",{staticClass:"w-100 my-4"}),a("div",{staticClass:"flex-grow-1 d-flex justify-content-around flex-column"},[t._l(t.loadpoints,(function(e,s){return[s>0?a("hr",{key:s+"_hr",staticClass:"w-100 my-4"}):t._e(),a("Loadpoint",t._b({key:s,attrs:{single:1===t.loadpoints.length,id:s}},"Loadpoint",e,!1))]}))],2)],1)},xt=[],kt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"row align-items-start align-items-md-center mt-4 energyflow",on:{click:t.toggleDetails}},[a("Visualization",{staticClass:"\n\t\t\t\tcol-12\n\t\t\t\toffset-md-1\n\t\t\t\tcol-md-6\n\t\t\t\toffset-lg-1\n\t\t\t\tcol-lg-8\n\t\t\t\toffset-xl-1\n\t\t\t\tcol-xl-6\n\t\t\t\toffset-xxl-1\n\t\t\t\tcol-xl-8\n\t\t\t\torder-md-2\n\t\t\t",attrs:{showDetails:t.showDetails,gridImport:t.gridImport,selfConsumption:t.selfConsumption,pvExport:t.pvExport,batteryCharge:t.batteryCharge,batteryDischarge:t.batteryDischarge,pvProduction:t.pvProduction,houseConsumption:t.houseConsumption,batterySoC:t.batterySoC,valuesInKw:t.valuesInKw}}),a("div",{staticClass:"col-12 col-sm-6 col-md-5 col-lg-3 col-xl-3 order-md-1 mt-2 mt-md-0",class:t.showDetails?"d-block":"d-none d-md-block"},[a("div",{staticClass:"d-flex justify-content-between",attrs:{"data-test-pv-production":""}},[a("span",{staticClass:"details-icon text-muted"},[a("fa-icon",{attrs:{icon:"sun"}})],1),a("span",{staticClass:"text-nowrap flex-grow-1"},[t._v(t._s(t.$t("main.energyflow.pvProduction")))]),a("span",{staticClass:"text-end text-nowrap ps-1"},[t._v(t._s(t.kw(t.pvProduction)))])]),a("div",{staticClass:"d-flex justify-content-between",attrs:{"data-test-house-consumption":""}},[a("span",{staticClass:"details-icon text-muted"},[a("fa-icon",{attrs:{icon:"home"}})],1),a("span",{staticClass:"text-nowrap flex-grow-1"},[t._v(t._s(t.$t("main.energyflow.houseConsumption")))]),a("span",{staticClass:"text-end text-nowrap ps-1"},[t._v(t._s(t.kw(t.houseConsumption)))])]),t.batteryConfigured?a("div",{staticClass:"d-flex justify-content-between",attrs:{"data-test-battery":""}},[a("span",{staticClass:"details-icon text-muted"},[a("BatteryIcon",{attrs:{soc:t.batterySoC,charge:t.batteryCharge>0,discharge:t.batteryDischarge>0}})],1),a("span",{staticClass:"text-nowrap flex-grow-1 text-truncate"},[t.batteryCharge?a("span",[t._v(t._s(t.$t("main.energyflow.batteryCharge")))]):t.batteryDischarge?a("span",[t._v(t._s(t.$t("main.energyflow.batteryDischarge")))]):a("span",[t._v(t._s(t.$t("main.energyflow.battery")))])]),a("span",{staticClass:"text-end text-nowrap ps-1"},[t._v(" "+t._s(t.batterySoC)+"% / "+t._s(t.kw(Math.abs(t.batteryPower)))+" ")])]):t._e()]),t.showDetails?a("div",{staticClass:"\n\t\t\t\tcol-12 col-sm-6\n\t\t\t\toffset-md-6\n\t\t\t\tcol-md-6\n\t\t\t\toffset-lg-4\n\t\t\t\tcol-lg-8\n\t\t\t\td-block d-md-flex\n\t\t\t\torder-md-3\n\t\t\t\tjustify-content-between\n\t\t\t\tmt-2\n\t\t\t"},[a("div",{staticClass:"text-nowrap d-flex d-md-block",attrs:{"data-test-grid-import":""}},[a("span",{staticClass:"color-grid details-icon"},[a("fa-icon",{attrs:{icon:"square"}})],1),a("span",{staticClass:"text-nowrap flex-grow-1"},[t._v(t._s(t.$t("main.energyflow.gridImport")))]),a("span",{staticClass:"text-end text-nowrap d-md-none"},[t._v(" "+t._s(t.kw(t.gridImport))+" ")])]),a("div",{staticClass:"text-nowrap d-flex d-md-block",attrs:{"data-test-self-consumption":""}},[a("span",{staticClass:"color-self details-icon"},[a("fa-icon",{attrs:{icon:"square"}})],1),a("span",{staticClass:"text-nowrap flex-grow-1"},[t._v(t._s(t.$t("main.energyflow.selfConsumption")))]),a("span",{staticClass:"text-end text-nowrap d-md-none"},[t._v(" "+t._s(t.kw(t.selfConsumption))+" ")])]),a("div",{staticClass:"text-nowrap d-flex d-md-block",attrs:{"data-test-pv-export":""}},[a("span",{staticClass:"color-export details-icon"},[a("fa-icon",{attrs:{icon:"square"}})],1),a("span",{staticClass:"text-nowrap flex-grow-1"},[t._v(t._s(t.$t("main.energyflow.pvExport")))]),a("span",{staticClass:"text-end text-nowrap d-md-none"},[t._v(" "+t._s(t.kw(t.pvExport))+" ")])])]):t._e()],1)])},Dt=[],Nt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"visualization",class:{"visualization--ready":t.visualizationReady}},[a("div",{staticClass:"label-scale"},[a("div",{staticClass:"d-flex justify-content-end"},[t.batteryDischarge?a("div",{staticClass:"label-bar label-bar--down",class:{"label-bar--hide-icon":t.hideLabelIcon(t.batteryDischarge,44)},style:{width:t.widthTotal(t.batteryDischarge)}},[a("div",{staticClass:"label-bar-scale"},[a("div",{staticClass:"label-bar-icon"},[a("BatteryIcon",{attrs:{soc:t.batterySoC,discharge:""}})],1)])]):t._e(),t.pvProduction?a("div",{staticClass:"label-bar label-bar--down",class:{"label-bar--hide-icon":t.hideLabelIcon(t.pvProduction)},style:{width:t.widthTotal(t.pvProduction)}},[a("div",{staticClass:"label-bar-scale"},[a("div",{staticClass:"label-bar-icon"},[a("fa-icon",{attrs:{icon:"sun"}})],1)])]):t._e()])]),a("div",{ref:"site_progress",staticClass:"site-progress"},[a("div",{staticClass:"site-progress-bar grid-import",style:{width:t.widthTotal(t.gridImportAdjusted)}},[t.powerLabelEnoughSpace(t.gridImport)?a("span",{staticClass:"power"},[t._v(" "+t._s(t.kw(t.gridImport))+" ")]):t.powerLabelSomeSpace(t.gridImport)?a("span",{staticClass:"power"},[t._v(" "+t._s(t.kwNoUnit(t.gridImport))+" ")]):t._e()]),a("div",{staticClass:"site-progress-bar self-consumption",style:{width:t.widthTotal(t.selfConsumptionAdjusted)}},[t.powerLabelEnoughSpace(t.selfConsumption)?a("span",{staticClass:"power"},[t._v(" "+t._s(t.kw(t.selfConsumption))+" ")]):t.powerLabelSomeSpace(t.selfConsumption)?a("span",{staticClass:"power"},[t._v(" "+t._s(t.kwNoUnit(t.selfConsumption))+" ")]):t._e()]),a("div",{staticClass:"site-progress-bar pv-export",style:{width:t.widthTotal(t.pvExportAdjusted)}},[t.powerLabelEnoughSpace(t.pvExport)?a("span",{staticClass:"power"},[t._v(" "+t._s(t.kw(t.pvExport))+" ")]):t.powerLabelSomeSpace(t.pvExport)?a("span",{staticClass:"power"},[t._v(" "+t._s(t.kwNoUnit(t.pvExport))+" ")]):t._e()]),t.totalAdjusted<=0?a("div",{staticClass:"site-progress-bar bg-light border no-wrap w-100"},[a("span",[t._v(t._s(t.$t("main.energyflow.noEnergy")))])]):t._e()]),a("div",{staticClass:"label-scale"},[a("div",{staticClass:"d-flex justify-content-start"},[t.houseConsumption?a("div",{staticClass:"label-bar label-bar--up",class:{"label-bar--hide-icon":t.hideLabelIcon(t.houseConsumption)},style:{width:t.widthTotal(t.houseConsumption)}},[a("div",{staticClass:"label-bar-scale"},[a("div",{staticClass:"label-bar-icon"},[a("fa-icon",{attrs:{icon:"home"}})],1)])]):t._e(),t.batteryCharge?a("div",{staticClass:"label-bar label-bar--up",class:{"label-bar--hide-icon":t.hideLabelIcon(t.batteryCharge,44)},style:{width:t.widthTotal(t.batteryCharge)}},[a("div",{staticClass:"label-bar-scale"},[a("div",{staticClass:"label-bar-icon"},[a("BatteryIcon",{attrs:{soc:t.batterySoC,charge:""}})],1)])]):t._e()])])])},Et=[],$t=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{class:{"power--in":t.charge,"power--out":t.discharge}},[a("fa-icon",{staticClass:"battery",attrs:{icon:t.batteryIcon}}),a("fa-icon",{staticClass:"arrow",attrs:{icon:"angle-double-right"}})],1)},At=[],Pt={name:"BatteryIcon",props:{discharge:{type:Boolean},charge:{type:Boolean},soc:{type:Number,default:0}},computed:{batteryIcon:function(){return this.soc>80?"battery-full":this.soc>60?"battery-three-quarters":this.soc>40?"battery-half":this.soc>20?"battery-quarter":"battery-empty"}}},jt=Pt,Tt=(a("702d"),Object(I["a"])(jt,$t,At,!1,null,"2dcca16c",null)),Mt=Tt.exports,Lt={name:"Visualization",components:{BatteryIcon:Mt},props:{showDetails:Boolean,gridImport:{type:Number,default:0},selfConsumption:{type:Number,default:0},pvExport:{type:Number,default:0},batteryCharge:{type:Number,default:0},batteryDischarge:{type:Number,default:0},pvProduction:{type:Number,default:0},houseConsumption:{type:Number,default:0},batterySoC:{type:Number,default:0},valuesInKw:{type:Boolean,default:!1}},data:function(){return{width:0,visualizationReady:!1}},mounted:function(){this.$nextTick((function(){window.addEventListener("resize",this.updateElementWidth),this.updateElementWidth()}))},beforeDestroy(){window.removeEventListener("resize",this.updateElementWidth)},mixins:[lt],computed:{totalRaw:function(){return this.gridImport+this.selfConsumption+this.pvExport},gridImportAdjusted:function(){return this.applyThreshold(this.gridImport)},selfConsumptionAdjusted:function(){return this.applyThreshold(this.selfConsumption)},pvExportAdjusted:function(){return this.applyThreshold(this.pvExport)},totalAdjusted:function(){return this.gridImportAdjusted+this.selfConsumptionAdjusted+this.pvExportAdjusted}},watch:{showDetails:function(){this.$nextTick(()=>this.updateElementWidth())},totalAdjusted:function(){!this.visualizationReady&&this.totalAdjusted>0&&setTimeout(()=>{this.visualizationReady=!0},500)}},methods:{widthTotal:function(t){return 0===this.totalAdjusted?"0%":100/this.totalAdjusted*t+"%"},kw:function(t){return this.fmtKw(t,this.valuesInKw,!0)},kwNoUnit:function(t){return this.fmtKw(t,this.valuesInKw,!1)},powerLabelAvailableSpace(t){if(0===this.totalAdjusted)return 0;const e=100/this.totalAdjusted*t;return this.width/100*e},powerLabelEnoughSpace(t){return this.powerLabelAvailableSpace(t)>60},powerLabelSomeSpace(t){return this.powerLabelAvailableSpace(t)>35},hideLabelIcon(t,e=32){if(0===this.totalAdjusted)return!0;const a=100/this.totalAdjusted*t;return this.width/100*a<e},applyThreshold(t){const e=100/this.totalRaw*t;return e<2?0:t},updateElementWidth(){this.width=this.$refs.site_progress.getBoundingClientRect().width}}},Vt=Lt,Bt=(a("3cbf"),Object(I["a"])(Vt,Nt,Et,!1,null,"034e0a25",null)),It=Bt.exports,Ut={name:"Energyflow",components:{Visualization:It,BatteryIcon:Mt},props:{gridConfigured:Boolean,gridPower:{type:Number,default:0},pvConfigured:Boolean,pvPower:{type:Number,default:0},batteryConfigured:Boolean,batteryPower:{type:Number,default:0},batterySoC:{type:Number,default:0}},data:function(){return{showDetails:!1}},mixins:[lt],computed:{gridImport:function(){return Math.max(0,this.gridPower)},pvProduction:function(){return this.pvConfigured?Math.abs(this.pvPower):this.pvExport},pvConsumption:function(){return Math.min(this.pvProduction,this.pvProduction+this.gridPower-this.batteryCharge)},batteryPowerAdjusted:function(){const t=50;return Math.abs(this.batteryPower)<t?0:this.batteryPower},batteryDischarge:function(){return Math.max(0,this.batteryPowerAdjusted)},batteryCharge:function(){return-1*Math.min(0,this.batteryPowerAdjusted)},houseConsumption:function(){return Math.max(0,this.gridImport+this.pvConsumption+this.batteryDischarge)},selfConsumption:function(){return Math.max(0,this.batteryDischarge+this.pvConsumption+this.batteryCharge)},pvExport:function(){return Math.max(0,-1*this.gridPower)},valuesInKw:function(){return this.gridImport+this.selfConsumption+this.pvExport>1e3}},methods:{kw:function(t){return this.fmtKw(t,this.valuesInKw)},toggleDetails(){this.showDetails=!this.showDetails}}},zt=Ut,Ot=(a("3e58"),Object(I["a"])(zt,kt,Dt,!1,null,"2d1d1a46",null)),Rt=Ot.exports,Ht=Rt,Ft=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("p",{staticClass:"h3 mb-4 d-sm-block",class:{"d-none":t.single}},[t._v(" "+t._s(t.title||t.$t("main.loadpoint.fallbackName"))+" ")]),"soft"==t.remoteDisabled?a("div",{staticClass:"alert alert-warning mt-4 mb-2",attrs:{role:"alert"}},[t._v(" "+t._s(t.$t("main.loadpoint.remoteDisabledSoft",{source:t.remoteDisabledSource}))+" ")]):t._e(),"hard"==t.remoteDisabled?a("div",{staticClass:"alert alert-danger mt-4 mb-2",attrs:{role:"alert"}},[t._v(" "+t._s(t.$t("main.loadpoint.remoteDisabledHard",{source:t.remoteDisabledSource}))+" ")]):t._e(),a("div",{staticClass:"row"},[a("Mode",{staticClass:"col-12 col-md-6 col-lg-4 mb-4",attrs:{mode:t.mode},on:{updated:t.setTargetMode}}),a("Vehicle",t._b({staticClass:"col-12 col-md-6 col-lg-8 mb-4",on:{"target-soc-updated":t.setTargetSoC}},"Vehicle",t.vehicle,!1))],1),a("LoadpointDetails",t._b({},"LoadpointDetails",t.details,!1))],1)},Wt=[],Kt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"mb-3"},[t._v(t._s(t.$t("main.mode.title")))]),a("div",{staticClass:"btn-group w-100",attrs:{role:"group"}},[a("button",{staticClass:"btn btn-outline-secondary",class:{active:"off"==t.mode},attrs:{type:"button"},on:{click:function(e){return t.setTargetMode("off")}}},[t._v(" "+t._s(t.$t("main.mode.stop"))+" ")]),a("button",{staticClass:"btn btn-outline-secondary",class:{active:"now"==t.mode},attrs:{type:"button"},on:{click:function(e){return t.setTargetMode("now")}}},[t._v(" "+t._s(t.$t("main.mode.now"))+" ")]),a("button",{staticClass:"btn btn-outline-secondary",class:{active:"minpv"==t.mode},attrs:{type:"button"},on:{click:function(e){return t.setTargetMode("minpv")}}},[a("span",{staticClass:"d-inline d-sm-none"},[t._v(" "+t._s(t.$t("main.mode.minpvShort"))+" ")]),a("span",{staticClass:"d-none d-sm-inline"},[t._v(" "+t._s(t.$t("main.mode.minpvLong"))+" ")])]),a("button",{staticClass:"btn btn-outline-secondary",class:{active:"pv"==t.mode},attrs:{type:"button"},on:{click:function(e){return t.setTargetMode("pv")}}},[a("span",{staticClass:"d-inline d-sm-none"},[t._v(" "+t._s(t.$t("main.mode.pvShort"))+" ")]),a("span",{staticClass:"d-none d-sm-inline"},[t._v(" "+t._s(t.$t("main.mode.pvLong"))+" ")])])])])},qt=[],Gt={name:"Mode",props:{mode:String},methods:{setTargetMode:function(t){this.$emit("updated",t)}}},Zt=Gt,Jt=(a("46d4"),Object(I["a"])(Zt,Kt,qt,!1,null,"1ff39d22",null)),Qt=Jt.exports,Yt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"mb-3"},[t._v(" "+t._s(t.socTitle||t.$t("main.vehicle.fallbackName"))+" ")]),a("VehicleSoc",t._b({on:{"target-soc-updated":t.targetSocUpdated}},"VehicleSoc",t.vehicleSoc,!1)),a("VehicleSubline",t._b({staticClass:"my-1"},"VehicleSubline",t.vehicleSubline,!1))],1)},Xt=[],te={methods:{collectProps:function(t){let e={};for(var a in t.props)e[a]=this[a];return e}}},ee=function(){var t,e,a=this,s=a.$createElement,o=a._self._c||s;return o("div",{staticClass:"vehicle-soc"},[o("div",{staticClass:"progress"},[o("div",{staticClass:"progress-bar",class:(t={"progress-bar-striped":a.charging,"progress-bar-animated":a.charging},t[a.progressColor]=!0,t),style:{width:a.socChargeDisplayWidth+"%"},attrs:{role:"progressbar"}},[a._v(" "+a._s(a.socChargeDisplayValue)+" ")]),a.remainingSoCWidth>0&&a.enabled?o("div",{staticClass:"progress-bar",class:(e={},e[a.progressColor]=!0,e["bg-muted"]=!0,e),style:{width:a.remainingSoCWidth+"%",transition:"none"},attrs:{role:"progressbar"}}):a._e()]),a.connected&&a.hasVehicle&&a.visibleTargetSoC?o("div",{staticClass:"target",class:{"target--slider-hidden":a.allowSliderHiding&&100===a.visibleTargetSoC}},[o("div",{staticClass:"target-label d-flex align-items-center justify-content-center",style:{left:a.visibleTargetSoC+"%"}},[a._v(" "+a._s(a.visibleTargetSoC)+"% ")]),o("input",{staticClass:"target-slider",attrs:{type:"range",min:"0",max:"100",step:"5"},domProps:{value:a.visibleTargetSoC},on:{input:a.movedTargetSoC,change:a.setTargetSoC}})]):a._e()])},ae=[],se={name:"VehicleSoc",props:{connected:Boolean,hasVehicle:Boolean,socCharge:Number,enabled:Boolean,charging:Boolean,minSoC:Number,targetSoC:Number},data:function(){return{selectedTargetSoC:null,allowSliderHiding:!1}},mounted:function(){setTimeout(()=>{this.allowSliderHiding=!0},1e3)},computed:{socChargeDisplayWidth:function(){return this.hasVehicle&&this.socCharge>=0?this.socCharge:100},socChargeDisplayValue:function(){if(!this.hasVehicle||!this.socCharge||this.socCharge<0){let t=this.$t("main.vehicleSoc.disconnected");return this.charging?t=this.$t("main.vehicleSoc.charging"):this.enabled?t=this.$t("main.vehicleSoc.ready"):this.connected&&(t=this.$t("main.vehicleSoc.connected")),t}let t=this.socCharge;return t>=10&&(t+="%"),t},progressColor:function(){return this.connected?this.minSoCActive?"bg-danger":"bg-primary":"bg-light border"},minSoCActive:function(){return this.minSoC>0&&this.socCharge<this.minSoC},remainingSoCWidth:function(){return 100===this.socChargeDisplayWidth?null:this.minSoCActive?this.minSoC-this.socCharge:this.visibleTargetSoC>this.socCharge?this.visibleTargetSoC-this.socCharge:null},visibleTargetSoC:function(){return Number(this.selectedTargetSoC||this.targetSoC)}},methods:{movedTargetSoC:function(t){const e=40;return t.target.value<e?(t.target.value=e,this.selectedTargetSoC=t.target.value,t.preventDefault(),!1):(this.selectedTargetSoC=t.target.value,!0)},setTargetSoC:function(t){this.$emit("target-soc-updated",t.target.value)}}},oe=se,ie=(a("2504"),Object(I["a"])(oe,ee,ae,!1,null,"3c09ac1a",null)),ne=ie.exports,re=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"d-flex justify-content-between align-items-center"},[a("small",{staticClass:"text-secondary"},[t.minSoCActive?a("span",[a("fa-icon",{staticClass:"text-muted me-1",attrs:{icon:"exclamation-circle"}}),t._v(" "+t._s(t.$t("main.vehicleSubline.mincharge",{soc:t.minSoC}))+" ")],1):t._e()]),t.targetChargeEnabled?a("small",{class:{invisible:!t.targetSoC,"text-primary":t.timerActive,"text-secondary":!t.timerActive}},[t._v(" "+t._s(t.targetTimeLabel())+" "),a("fa-icon",{staticClass:"ms-1",attrs:{icon:"clock"}})],1):t._e()])},le=[],ce={name:"VehicleSubline",props:{socCharge:Number,minSoC:Number,timerActive:Boolean,timerSet:Boolean,targetTime:String,targetSoC:Number},computed:{minSoCActive:function(){return this.minSoC>0&&this.socCharge<this.minSoC},targetChargeEnabled:function(){return this.targetTime&&this.timerSet}},methods:{targetTimeLabel:function(){const t=new Date(this.targetTime);return`bis ${this.fmtAbsoluteDate(t)} Uhr`}},mixins:[lt]},de=ce,ue=Object(I["a"])(de,re,le,!1,null,null,null),pe=ue.exports,me={name:"Vehicle",components:{VehicleSoc:ne,VehicleSubline:pe},props:{connected:Boolean,hasVehicle:Boolean,socCharge:Number,enabled:Boolean,charging:Boolean,minSoC:Number,socTitle:String,timerActive:Boolean,timerSet:Boolean,targetTime:String,targetSoC:Number},computed:{vehicleSoc:function(){return this.collectProps(ne)},vehicleSubline:function(){return this.collectProps(pe)}},methods:{targetSocUpdated:function(t){this.$emit("target-soc-updated",t)}},mixins:[te]},he=me,ve=Object(I["a"])(he,Yt,Xt,!1,null,null,null),fe=ve.exports,ge=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"row"},[a("div",{staticClass:"col-6 col-sm-3 col-lg-2 mt-3 offset-lg-4"},[a("div",{staticClass:"mb-2 value"},[t._v(" "+t._s(t.$t("main.loadpointDetails.power"))+" "),"heating"==t.climater?a("fa-icon",{staticClass:"text-primary ms-1",attrs:{icon:"temperature-low"}}):t._e(),"cooling"==t.climater?a("fa-icon",{staticClass:"text-primary ms-1",attrs:{icon:"temperature-high"}}):t._e(),"on"==t.climater?a("fa-icon",{staticClass:"text-primary ms-1",attrs:{icon:"thermometer-half"}}):t._e()],1),a("h3",{staticClass:"value"},[t._v(" "+t._s(t.fmt(t.chargePower))+" "),a("small",{staticClass:"text-muted"},[t._v(t._s(t.fmtUnit(t.chargePower))+"W")])])]),a("div",{staticClass:"col-6 col-sm-3 col-lg-2 mt-3"},[a("div",{staticClass:"mb-2 value"},[t._v(t._s(t.$t("main.loadpointDetails.charged")))]),a("h3",{staticClass:"value"},[t._v(" "+t._s(t.fmt(t.chargedEnergy))+" "),a("small",{staticClass:"text-muted"},[t._v(t._s(t.fmtUnit(t.chargedEnergy))+"Wh")])])]),t.range&&t.range>=0?a("div",{staticClass:"col-6 col-sm-3 col-lg-2 mt-3"},[a("div",{staticClass:"mb-2 value"},[t._v(t._s(t.$t("main.loadpointDetails.range")))]),a("h3",{staticClass:"value"},[t._v(" "+t._s(Math.round(t.range))+" "),a("small",{staticClass:"text-muted"},[t._v("km")])])]):a("div",{staticClass:"col-6 col-sm-3 col-lg-2 mt-3"},[a("div",{staticClass:"mb-2 value"},[t._v(t._s(t.$t("main.loadpointDetails.duration")))]),a("h3",{staticClass:"value"},[t._v(" "+t._s(t.fmtShortDuration(t.chargeDuration))+" "),a("small",{staticClass:"text-muted"},[t._v(t._s(t.fmtShortDurationUnit(t.chargeDuration)))])])]),t.hasVehicle?a("div",{staticClass:"col-6 col-sm-3 col-lg-2 mt-3"},[a("div",{staticClass:"mb-2 value"},[t._v(t._s(t.$t("main.loadpointDetails.remaining")))]),a("h3",{staticClass:"value"},[t._v(" "+t._s(t.fmtShortDuration(t.chargeEstimate))+" "),a("small",{staticClass:"text-muted"},[t._v(t._s(t.fmtShortDurationUnit(t.chargeEstimate)))])])]):t._e()])])},be=[],Ce={name:"LoadpointDetails",props:{chargedEnergy:Number,chargeDuration:Number,chargeEstimate:Number,chargePower:Number,climater:String,hasVehicle:Boolean,range:Number},mixins:[lt]},_e=Ce,we=Object(I["a"])(_e,ge,be,!1,null,null,null),ye=we.exports,Se={name:"Loadpoint",props:{id:Number,single:Boolean,title:String,mode:String,targetSoC:Number,remoteDisabled:Boolean,remoteDisabledSource:String,chargeDuration:Number,charging:Boolean,connected:Boolean,enabled:Boolean,socTitle:String,socCharge:Number,minSoC:Number,timerSet:Boolean,timerActive:Boolean,targetTime:String,chargePower:Number,chargedEnergy:Number,hasVehicle:Boolean,climater:String,range:Number,chargeEstimate:Number,phases:Number,minCurrent:Number,maxCurrent:Number,activePhases:Number,chargeCurrent:Number,socCapacity:Number,connectedDuration:Number,chargeCurrents:Array,chargeConfigured:Boolean,chargeRemainingEnergy:Number},components:{LoadpointDetails:ye,Mode:Qt,Vehicle:fe},mixins:[lt,te],data:function(){return{tickerHandle:null,chargeDurationDisplayed:null}},computed:{details:function(){return this.collectProps(ye)},vehicle:function(){return this.collectProps(fe)}},watch:{chargeDuration:function(){window.clearInterval(this.tickerHandle),this.charging&&this.chargeDuration>=0&&(this.chargeDurationDisplayed=this.chargeDuration,this.tickerHandle=window.setInterval(function(){this.chargeDurationDisplayed+=1}.bind(this),1e3))}},methods:{api:function(t){return"loadpoints/"+this.id+"/"+t},setTargetMode:function(t){n.a.post(this.api("mode")+"/"+t).then(function(t){this.mode=t.data.mode}.bind(this)).catch(window.app.error)},setTargetSoC:function(t){n.a.post(this.api("targetsoc")+"/"+t).then(function(t){this.targetSoC=t.data.targetSoC}.bind(this)).catch(window.app.error)}},destroyed:function(){window.clearInterval(this.tickerHandle)}},xe=Se,ke=Object(I["a"])(xe,Ft,Wt,!1,null,null,null),De=ke.exports,Ne={name:"Site",props:{loadpoints:Array,gridConfigured:Boolean,gridPower:Number,pvConfigured:Boolean,pvPower:Number,batteryConfigured:Boolean,batteryPower:Number,batterySoC:Number,gridCurrents:Array,prioritySoC:Number,siteTitle:String},components:{Loadpoint:De,Energyflow:Ht},mixins:[lt,te],computed:{energyflow:function(){return this.collectProps(Ht)}}},Ee=Ne,$e=Object(I["a"])(Ee,St,xt,!1,null,null,null),Ae=$e.exports,Pe={name:"Main",components:{Site:Ae},data:function(){return this.$root.$data.store},computed:{configured:function(){const t=window.evcc.configured;return t==window.evcc.configured||!isNaN(parseInt(t))&&parseInt(t)>0}}},je=Pe,Te=Object(I["a"])(je,wt,yt,!1,null,null,null),Me=Te.exports,Le=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container"},[a("div",{staticClass:"row mt-4 border-bottom"},[a("div",{staticClass:"col-12"},[a("p",{staticClass:"h1"},[t._v(t._s(t.title||"Home"))])])]),a("div",{staticClass:"row h5"},[a("div",{staticClass:"col-md-4"}),a("div",{staticClass:"col-6 col-md-2 py-3"},[t._v(" Netzzähler: "),t.gridConfigured?a("span",{staticClass:"text-primary"},[t._v("✓")]):a("span",{staticClass:"text-primary"},[t._v("—")])]),a("div",{staticClass:"col-6 col-md-2 py-3"},[t._v(" PV Zähler: "),t.pvConfigured?a("span",{staticClass:"text-primary"},[t._v("✓")]):a("span",{staticClass:"text-primary"},[t._v("—")])]),a("div",{staticClass:"col-6 col-md-2 py-3"},[t._v(" Batteriezähler: "),t.batteryConfigured?a("span",{staticClass:"text-primary"},[t._v("✓")]):a("span",{staticClass:"text-primary"},[t._v("—")])])]),t._l(t.loadpoints,(function(e,s){return a("div",{key:s,attrs:{loadpoint:e,id:"loadpoint-"+s}},[a("div",{staticClass:"row mt-4 border-bottom"},[a("div",{staticClass:"col-12"},[a("p",{staticClass:"h1"},[t._v(t._s(e.title||"Ladepunkt"))])])]),a("div",{staticClass:"row h5"},[a("div",{staticClass:"col-md-4"}),a("div",{staticClass:"col-6 col-md-2 py-3"},[t._v(" Ladezähler: "),e.chargeConfigured?a("span",{staticClass:"text-primary"},[t._v("✓")]):a("span",{staticClass:"text-primary"},[t._v("—")])]),a("div",{staticClass:"col-6 col-md-2 py-3"},[t._v(" Phasen: "),a("span",{staticClass:"text-primary"},[t._v(t._s(e.phases)+"p")])]),a("div",{staticClass:"col-6 col-md-2 py-3"},[t._v(" Min. Strom: "),a("span",{staticClass:"text-primary"},[t._v(t._s(e.minCurrent)+"A")])]),a("div",{staticClass:"col-6 col-md-2 py-3"},[t._v(" Max. Strom: "),a("span",{staticClass:"text-primary"},[t._v(t._s(e.maxCurrent)+"A")])])]),a("div",{staticClass:"row h5"},[a("div",{staticClass:"col-md-4"}),a("div",{staticClass:"col-md-8 h2"},[t._m(0,!0),a("div",{staticClass:"row h5"},[a("div",{staticClass:"col-6 py-3"},[t._v(" Modell: "),a("span",{staticClass:"text-primary"},[t._v(t._s(e.socTitle||"—"))])]),a("div",{staticClass:"col-6 py-3"},[t._v(" Kapazität: "),a("span",{staticClass:"text-primary"},[t._v(t._s(e.socCapacity)+"kWh")])])])])])])}))],2)},Ve=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"row py-3 h2 border-bottom"},[a("div",{staticClass:"col-12"},[t._v("Fahrzeug")])])}],Be={name:"Config",data:function(){return this.$root.$data.store.state}},Ie=Be,Ue=Object(I["a"])(Ie,Le,Ve,!1,null,null,null),ze=Ue.exports;s["a"].use(_t["a"]);const Oe=[{path:"/",component:Me},{path:"/config",component:ze}];var Re=new _t["a"]({routes:Oe,linkExactActiveClass:"active"}),He=a("a925"),Fe={header:{support:"Support"},footer:{version:{version:"Version",availableShort:"verfügbar",availableLong:"Update verfügbar",modalTitle:"Update verfügbar",modalUpdateStarted:"Nach der Aktualisierung wird evcc neu gestartet.",modalInstalledVersion:"Aktuell installierte Version",modalNoReleaseNotes:"Keine Releasenotes verfügbar. Mehr Informationen zur neuen Version findest du hier:",modalCancel:"Abbrechen",modalUpdate:"Aktualisieren",modalUpdateNow:"Jetzt aktualisieren",modalDownload:"Download",modalUpdateStatusStart:"Aktualisierung gestartet: ",modalUpdateStatusFailed:"Aktualisierung nicht möglich: "},sponsor:{sponsoredShort:"Danke",sponsoredLong:"Danke {sponsor}",supportProjectShort:"unterstützen",supportProjectLong:"Projekt unterstützen"}},notifications:{modalTitle:"Meldungen",dismissAll:"Meldungen entfernen"},main:{energyflow:{noEnergy:"Kein Energiefluss",houseConsumption:"Verbrauch",pvProduction:"Erzeugung",battery:"Batterie",batteryCharge:"Batterie laden",batteryDischarge:"Batterie entladen",gridImport:"Netzbezug",selfConsumption:"Eigenverbrauch",pvExport:"Einspeisung"},mode:{title:"Modus",stop:"Stop",now:"Sofort",minpvShort:"Min",minpvLong:"Min + PV",pvShort:"PV",pvLong:"Nur PV"},loadpoint:{fallbackName:"Ladepunkt",remoteDisabledSoft:"{source}: Adaptives PV-Laden deaktiviert",remoteDisabledHard:"{source}: Deaktiviert"},vehicle:{fallbackName:"Fahrzeug"},vehicleSoc:{disconnected:"getrennt",charging:"lädt",ready:"bereit",connected:"verbunden"},vehicleSubline:{mincharge:"Mindestladung bis {soc}%"},loadpointDetails:{power:"Leistung",range:"Reichweite",charged:"Geladen",duration:"Dauer",remaining:"Restzeit"}}},We={header:{support:"Support"},footer:{version:{version:"version",availableShort:"available",availableLong:"update available",modalTitle:"Update available",modalUpdateStarted:"Evcc will restart after the update..",modalInstalledVersion:"Currently installed version",modalNoReleaseNotes:"No release notes available. More information about the new version can be found here:",modalCancel:"Cancel",modalUpdate:"Update",modalUpdateNow:"Update now",modalDownload:"Download",modalUpdateStatusStart:"Update started: ",modalUpdateStatusFailed:"Update failed: "},sponsor:{sponsoredShort:"thanks",sponsoredLong:"thanks {sponsor}",supportProjectShort:"support",supportProjectLong:"support the project"}},notifications:{modalTitle:"Notifications",dismissAll:"Dismiss all"},main:{energyflow:{noEnergy:"No Energyflow",houseConsumption:"Consumption",pvProduction:"Production",battery:"Battery",batteryCharge:"Battery charge",batteryDischarge:"Battery discharge",gridImport:"Grid import",selfConsumption:"Self consumption",pvExport:"Grid export"},mode:{title:"Mode",stop:"Stop",now:"Now",minpvShort:"Min",minpvLong:"Min + PV",pvShort:"PV",pvLong:"PV only"},loadpoint:{fallbackName:"Loadpoint",remoteDisabledSoft:"{source}: adaptive PV charging disabled",remoteDisabledHard:"{source}: disabled"},vehicle:{fallbackName:"Vehicle"},vehicleSoc:{disconnected:"disconnected",charging:"charging",ready:"ready",connected:"connected"},vehicleSubline:{mincharge:"minimum charging to {soc}%"},loadpointDetails:{power:"Power",range:"Range",charged:"Charged",duration:"Duration",remaining:"Remaining"}}},Ke={header:{support:"Support"},footer:{version:{version:"versione",availableShort:"disponibile",availableLong:"aggiornamento disponibile",modalTitle:"Aggiornamento disponibile",modalUpdateStarted:"Evcc ripartirà dopo l'aggiornamento..",modalInstalledVersion:"Versione correntemente installata",modalNoReleaseNotes:"Non ci sono note di rilascio disponibili. Altre informazioni circa la nuova versione si trovano qui:",modalCancel:"Cancella",modalUpdate:"Aggiorna",modalUpdateNow:"Aggiorna ora",modalDownload:"Download",modalUpdateStatusStart:"Aggiornamento iniziato: ",modalUpdateStatusFailed:"Aggiornamento fallito: "},sponsor:{sponsoredShort:"grazie",sponsoredLong:"grazie {sponsor}",supportProjectShort:"supporto",supportProjectLong:"supporta questo progetto"}},notifications:{modalTitle:"Notifiche",dismissAll:"Rimuovi tutte"},main:{energyflow:{noEnergy:"No Energyflow",houseConsumption:"Consumption",pvProduction:"Produzione",battery:"Batteria",batteryCharge:"Battery charge",batteryDischarge:"Battery discharge",gridImport:"Grid import",selfConsumption:"Self consumption",pvExport:"Grid export"},mode:{title:"Modalità",stop:"Stop",now:"Ora",minpvShort:"Min",minpvLong:"Min + FV",pvShort:"FV",pvLong:"Solo FV"},loadpoint:{fallbackName:"Punto di carica",remoteDisabledSoft:"{source}: Ricarica FV adattiva disabilitata",remoteDisabledHard:"{source}: Disabilitato"},vehicle:{fallbackName:"Veicolo"},vehicleSoc:{disconnected:"disconesso",charging:"carica",ready:"pronto",connected:"collegato"},vehicleSubline:{mincharge:"carica minima fino a {soc}%"},loadpointDetails:{power:"Potenza",range:"Autonomia",charged:"Ricaricato",duration:"Duarata",remaining:"Rimanenti"}}};function qe(){const t=void 0!==navigator.languages?navigator.languages[0]:navigator.language;if(!t)return;const e=t.trim().split(/-|_/)[0];return e}s["a"].use(He["a"]);var Ge=new He["a"]({locale:qe(),fallbackLocale:"en",messages:{de:Fe,en:We,it:Ke}});s["a"].use(o["a"]);const Ze=window.location;n.a.defaults.baseURL=Ze.protocol+"//"+Ze.hostname+(Ze.port?":"+Ze.port:"")+Ze.pathname+"api",n.a.defaults.headers.post["Content-Type"]="application/json",window.app=new s["a"]({el:"#app",router:Re,i18n:Ge,data:{store:vt,notifications:[]},render:function(t){return t(Ct,{props:{notifications:this.notifications}})},methods:{raise:function(t){console[t.type](t);const e=new Date,a=this.notifications[0];a&&a.message===t.message?(a.count++,a.time=e):this.notifications=[{...t,count:1,time:e},...this.notifications]},clear:function(){this.notifications=[]},error:function(t){t.type="error",this.raise(t)},warn:function(t){t.type="warn",this.raise(t)}}}),window.setInterval((function(){n.a.get("health").catch((function(){window.app.error({message:"Server unavailable"})}))}),5e3)},b19f:function(t,e,a){},b743:function(t,e,a){},ec98:function(t,e,a){},ed92:function(t,e,a){}});
//# sourceMappingURL=index.9033e567.js.map