diff --git a/packages/helpermodules/subdata.py b/packages/helpermodules/subdata.py index f6855c393e..9c524910a9 100644 --- a/packages/helpermodules/subdata.py +++ b/packages/helpermodules/subdata.py @@ -315,19 +315,7 @@ def process_vehicle_topic(self, client: mqtt.Client, var: Dict[str, ev.Ev], msg: Pub().pub("openWB/system/subdata_initialized", True) self.event_soc.set() else: - # temporäres ChargeTemplate aktualisieren, wenn dem Fahrzeug ein anderes Ladeprofil zugeordnet - # wird self.set_json_payload_class(var["ev"+index].data, msg) - if re.search("/vehicle/[0-9]+/charge_template$", msg.topic) is not None: - charge_template_id = int(decode_payload(msg.payload)) - if var["ev"+index].data.charge_template != charge_template_id: - ev_id = get_index(msg.topic) - for cp in self.cp_data.values(): - if ((cp.chargepoint.data.set.charging_ev != -1 and - cp.chargepoint.data.set.charging_ev == ev_id) or - cp.chargepoint.data.config.ev == ev_id): - cp.chargepoint.update_charge_template( - self.ev_charge_template_data[f"ct{charge_template_id}"]) except Exception: log.exception("Fehler im subdata-Modul") @@ -350,20 +338,6 @@ def process_vehicle_charge_template_topic(self, var: Dict[str, ChargeTemplate], if "ct"+index not in var: var["ct"+index] = ChargeTemplate() var["ct"+index].data = dataclass_from_dict(ChargeTemplateData, decode_payload(msg.payload)) - # Temporäres ChargeTemplate aktualisieren, wenn persistentes geändert wird - for vehicle in self.ev_data.values(): - if vehicle.data.charge_template == int(index): - for cp in self.cp_data.values(): - if ((cp.chargepoint.data.set.charging_ev != -1 and - cp.chargepoint.data.set.charging_ev == vehicle.num) or - cp.chargepoint.data.config.ev == vehicle.num): - # UI sendet immer alle Topics, auch nicht geänderte. Damit die temporären Topics nicht - # mehrfach gepbulished werden, muss das publishen der temporären Topics 1:1 erfolgen. - if re.search("/vehicle/template/charge_template/[0-9]+$", msg.topic) is not None: - if decode_payload(msg.payload) == "": - Pub().pub(f"openWB/chargepoint/{cp.chargepoint.num}/set/charge_template", "") - else: - cp.chargepoint.update_charge_template(var["ct"+index]) except Exception: log.exception("Fehler im subdata-Modul") diff --git a/packages/modules/common/store/_chargepoint_internal.py b/packages/modules/common/store/_chargepoint_internal.py index b4f3cc5560..a6acb53824 100644 --- a/packages/modules/common/store/_chargepoint_internal.py +++ b/packages/modules/common/store/_chargepoint_internal.py @@ -25,6 +25,7 @@ def update(self): pub_to_broker(f"{topic_prefix}/charge_state", self.state.charge_state, 2) pub_to_broker(f"{topic_prefix}/plug_state", self.state.plug_state, 2) pub_to_broker(f"{topic_prefix}/vehicle_id", self.state.vehicle_id) + pub_to_broker(f"{topic_prefix}/rfid", self.state.rfid) pub_to_broker(f"{topic_prefix}/serial_number", self.state.serial_number) pub_to_broker(f"{topic_prefix}/evse_current", self.state.evse_current, 2) pub_to_broker(f"{topic_prefix}/max_evse_current", self.state.max_evse_current, 2) @@ -36,7 +37,6 @@ def update(self): if self.state.soc_timestamp is not None: pub_to_broker(f"{topic_prefix}/soc_timestamp", self.state.soc_timestamp) if self.state.rfid_timestamp is not None: - pub_to_broker(f"{topic_prefix}/rfid", self.state.rfid) pub_to_broker(f"{topic_prefix}/rfid_timestamp", self.state.rfid_timestamp) diff --git a/packages/modules/display_themes/cards/source/src/views/ChargePointsView.vue b/packages/modules/display_themes/cards/source/src/views/ChargePointsView.vue index 8d5c8c8e43..06f509c38f 100644 --- a/packages/modules/display_themes/cards/source/src/views/ChargePointsView.vue +++ b/packages/modules/display_themes/cards/source/src/views/ChargePointsView.vue @@ -1304,7 +1304,7 @@ export default { @click=" setChargePointConnectedVehicleScheduledChargingPlanActive( modalChargePointId, - plan.id, + planKey, !plan.active, ) " @@ -1444,7 +1444,7 @@ export default { @click=" setChargePointConnectedVehicleTimeChargingPlanActive( modalChargePointId, - plan.id, + planKey, !plan.active, ) " diff --git a/packages/modules/display_themes/cards/web/assets/ChargeModeModal-CNWdoEpw.js b/packages/modules/display_themes/cards/web/assets/ChargeModeModal-D_G7wsgY.js similarity index 97% rename from packages/modules/display_themes/cards/web/assets/ChargeModeModal-CNWdoEpw.js rename to packages/modules/display_themes/cards/web/assets/ChargeModeModal-D_G7wsgY.js index e503872c3b..5573a3a0a9 100644 --- a/packages/modules/display_themes/cards/web/assets/ChargeModeModal-CNWdoEpw.js +++ b/packages/modules/display_themes/cards/web/assets/ChargeModeModal-D_G7wsgY.js @@ -1 +1 @@ -import{u as V}from"./index-C0J-ZJ88.js";import{_ as q}from"./vendor-inkline-S9CBmrTS.js";import{l as C,q as o,p as l,o as s,s as i,e as S,F as M,A as b,k as d,x as p}from"./vendor-Bzn5cd2Y.js";const T=q({name:"ChargeModeModal",props:{modelValue:{required:!0,type:Boolean,default:!1},chargePointId:{type:Number,required:!0}},emits:["update:modelValue"],data:()=>({mqttStore:V(),simpleChargeModes:["instant_charging","pv_charging","stop"]}),computed:{filteredChargeModes(){return this.mqttStore.getSimpleChargePointView?this.mqttStore.chargeModeList().filter(t=>this.simpleChargeModes.includes(t.id)):this.mqttStore.chargeModeList()}},methods:{updateChargePointChargeTemplate(t,e,r=void 0){const g=this.mqttStore.updateState(`openWB/chargepoint/${t}/set/charge_template`,e,r);this.$root.sendTopicToBroker(`openWB/chargepoint/${t}/set/charge_template`,g)},setChargePointConnectedVehicleChargeMode(t){t!=this.mqttStore.getChargePointConnectedVehicleChargeMode(this.chargePointId)&&this.updateChargePointChargeTemplate(this.chargePointId,t,"chargemode.selected")},setChargePointConnectedVehiclePriority(t){t!=this.mqttStore.getChargePointConnectedVehiclePriority(this.chargePointId)&&this.updateChargePointChargeTemplate(this.chargePointId,t,"prio")}}},[["render",function(t,e,r,g,n,h){const c=l("i-button"),u=l("i-button-group"),m=l("i-form-group"),P=l("i-form-label"),_=l("i-form"),f=l("i-modal");return s(),C(f,{"model-value":r.modelValue,size:"lg","onUpdate:modelValue":e[2]||(e[2]=a=>t.$emit("update:modelValue",a))},{header:o(()=>[d(' Lademodus für "'+p(n.mqttStore.getChargePointConnectedVehicleName(r.chargePointId))+'" auswählen ',1)]),default:o(()=>[i(_,null,{default:o(()=>[i(m,null,{default:o(()=>[i(u,{block:"",vertical:""},{default:o(()=>[(s(!0),S(M,null,b(h.filteredChargeModes,a=>(s(),C(c,{key:a.id,size:"lg",class:"large-button",outline:"",color:a.class!="dark"?a.class:"light",active:n.mqttStore.getChargePointConnectedVehicleChargeMode(r.chargePointId)!=null&&a.id==n.mqttStore.getChargePointConnectedVehicleChargeMode(r.chargePointId).mode,onClick:I=>h.setChargePointConnectedVehicleChargeMode(a.id)},{default:o(()=>[d(p(a.label),1)]),_:2},1032,["color","active","onClick"]))),128))]),_:1})]),_:1}),i(m,null,{default:o(()=>[i(P,null,{default:o(()=>e[3]||(e[3]=[d("Priorität",-1)])),_:1,__:[3]}),i(u,{block:""},{default:o(()=>[i(c,{size:"lg",class:"large-button",color:n.mqttStore.getChargePointConnectedVehiclePriority(r.chargePointId)!==!0?"danger":"",onClick:e[0]||(e[0]=a=>h.setChargePointConnectedVehiclePriority(!1))},{default:o(()=>e[4]||(e[4]=[d(" Nein ",-1)])),_:1,__:[4]},8,["color"]),i(c,{color:n.mqttStore.getChargePointConnectedVehiclePriority(r.chargePointId)===!0?"success":"",onClick:e[1]||(e[1]=a=>h.setChargePointConnectedVehiclePriority(!0))},{default:o(()=>e[5]||(e[5]=[d(" Ja ",-1)])),_:1,__:[5]},8,["color"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])}],["__scopeId","data-v-bd48ea1b"]]);export{T as C}; +import{u as V}from"./index-Rkba6Ib0.js";import{_ as q}from"./vendor-inkline-S9CBmrTS.js";import{l as C,q as o,p as l,o as s,s as i,e as S,F as M,A as b,k as d,x as p}from"./vendor-Bzn5cd2Y.js";const T=q({name:"ChargeModeModal",props:{modelValue:{required:!0,type:Boolean,default:!1},chargePointId:{type:Number,required:!0}},emits:["update:modelValue"],data:()=>({mqttStore:V(),simpleChargeModes:["instant_charging","pv_charging","stop"]}),computed:{filteredChargeModes(){return this.mqttStore.getSimpleChargePointView?this.mqttStore.chargeModeList().filter(t=>this.simpleChargeModes.includes(t.id)):this.mqttStore.chargeModeList()}},methods:{updateChargePointChargeTemplate(t,e,r=void 0){const g=this.mqttStore.updateState(`openWB/chargepoint/${t}/set/charge_template`,e,r);this.$root.sendTopicToBroker(`openWB/chargepoint/${t}/set/charge_template`,g)},setChargePointConnectedVehicleChargeMode(t){t!=this.mqttStore.getChargePointConnectedVehicleChargeMode(this.chargePointId)&&this.updateChargePointChargeTemplate(this.chargePointId,t,"chargemode.selected")},setChargePointConnectedVehiclePriority(t){t!=this.mqttStore.getChargePointConnectedVehiclePriority(this.chargePointId)&&this.updateChargePointChargeTemplate(this.chargePointId,t,"prio")}}},[["render",function(t,e,r,g,n,h){const c=l("i-button"),u=l("i-button-group"),m=l("i-form-group"),P=l("i-form-label"),_=l("i-form"),f=l("i-modal");return s(),C(f,{"model-value":r.modelValue,size:"lg","onUpdate:modelValue":e[2]||(e[2]=a=>t.$emit("update:modelValue",a))},{header:o(()=>[d(' Lademodus für "'+p(n.mqttStore.getChargePointConnectedVehicleName(r.chargePointId))+'" auswählen ',1)]),default:o(()=>[i(_,null,{default:o(()=>[i(m,null,{default:o(()=>[i(u,{block:"",vertical:""},{default:o(()=>[(s(!0),S(M,null,b(h.filteredChargeModes,a=>(s(),C(c,{key:a.id,size:"lg",class:"large-button",outline:"",color:a.class!="dark"?a.class:"light",active:n.mqttStore.getChargePointConnectedVehicleChargeMode(r.chargePointId)!=null&&a.id==n.mqttStore.getChargePointConnectedVehicleChargeMode(r.chargePointId).mode,onClick:I=>h.setChargePointConnectedVehicleChargeMode(a.id)},{default:o(()=>[d(p(a.label),1)]),_:2},1032,["color","active","onClick"]))),128))]),_:1})]),_:1}),i(m,null,{default:o(()=>[i(P,null,{default:o(()=>e[3]||(e[3]=[d("Priorität",-1)])),_:1,__:[3]}),i(u,{block:""},{default:o(()=>[i(c,{size:"lg",class:"large-button",color:n.mqttStore.getChargePointConnectedVehiclePriority(r.chargePointId)!==!0?"danger":"",onClick:e[0]||(e[0]=a=>h.setChargePointConnectedVehiclePriority(!1))},{default:o(()=>e[4]||(e[4]=[d(" Nein ",-1)])),_:1,__:[4]},8,["color"]),i(c,{color:n.mqttStore.getChargePointConnectedVehiclePriority(r.chargePointId)===!0?"success":"",onClick:e[1]||(e[1]=a=>h.setChargePointConnectedVehiclePriority(!0))},{default:o(()=>e[5]||(e[5]=[d(" Ja ",-1)])),_:1,__:[5]},8,["color"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])}],["__scopeId","data-v-bd48ea1b"]]);export{T as C}; diff --git a/packages/modules/display_themes/cards/web/assets/ChargePointPlugBadge-Dsdv-7Vn.js b/packages/modules/display_themes/cards/web/assets/ChargePointPlugBadge-Cea5-sTy.js similarity index 98% rename from packages/modules/display_themes/cards/web/assets/ChargePointPlugBadge-Dsdv-7Vn.js rename to packages/modules/display_themes/cards/web/assets/ChargePointPlugBadge-Cea5-sTy.js index bc1e9b8061..3832a95967 100644 --- a/packages/modules/display_themes/cards/web/assets/ChargePointPlugBadge-Dsdv-7Vn.js +++ b/packages/modules/display_themes/cards/web/assets/ChargePointPlugBadge-Cea5-sTy.js @@ -1 +1 @@ -import{e as c,f,i as x,F as P,A as w,o as h,z as m,O as S,l as C,q as v,p as d,s as b,x as g}from"./vendor-Bzn5cd2Y.js";import{_ as y}from"./vendor-inkline-S9CBmrTS.js";import{u as k}from"./index-C0J-ZJ88.js";import{F as D,l as I,C as q,D as $,E as z}from"./vendor-fortawesome-C1Wk2aFl.js";const l={props:{data:{required:!1,type:Array,default:void 0},socData:{required:!1,type:Array,default:void 0},width:{type:Number,default:250},height:{type:Number,default:70},gap:{type:Number,default:3},stroke:{type:Number,default:3},min:{type:Number,default:0},max:{type:Number,default:1},color:{type:String,default:"var(--color--primary)"},colorNegative:{type:String,default:void 0}},computed:{highestPoint(){return Math.max(1,this.max,...this.slicedData)},lowestPoint(){return Math.min(0,this.min,...this.slicedData)},maxPoints(){return Math.floor(this.width/(this.stroke+this.gap))},slicedData(){if(this.data)return this.data.slice(-this.maxPoints)},slicedSocData(){if(this.socData)return this.socData.slice(-this.maxPoints)},zeroHeight(){return this.height-(0-this.lowestPoint)/(this.highestPoint-this.lowestPoint)*this.height},coordinates(){if(this.data)return this.calculateCoordinates(this.slicedData,this.lowestPoint,this.highestPoint)},socCoordinates(){if(this.socData)return this.calculateCoordinates(this.slicedSocData,0,100)},bars(){if(this.coordinates){const t=[];return this.coordinates.forEach(s=>{const e=s.x,o=s.y,r=this.stroke,a=Math.min(o,this.zeroHeight),i=Math.abs(o-this.zeroHeight),n=o>this.zeroHeight;t.push({x:e,y:a,width:r,height:i,negative:n})}),t}},socPath(){if(this.socCoordinates&&this.socCoordinates.length>0){let s=this.socCoordinates.slice(0,1)[0],e=this.socCoordinates.slice(-1)[0];var t=`M 0,${this.height}`;return t+=` L 0,${s.y}`,this.socCoordinates.forEach(o=>{t+=` L ${o.x+this.stroke/2},${o.y}`}),t+=` L ${e.x+this.stroke},${e.y} L ${e.x+this.stroke},${this.height} Z`}}},methods:{calculateCoordinates(t,s,e){const o=[];return t.forEach((r,a)=>{const i=a*this.width/this.maxPoints+1,n=this.height-(r-s)/(e-s)*this.height;o.push({x:i,y:n})}),o}}},u=()=>{S(t=>({"3f7db06a":t.color,"1de516bf":t.colorNegative}))},p=l.setup;l.setup=p?(t,s)=>(u(),p(t,s)):u;const N=["viewBox"],E=["d"],M=["x","y","width","height"],_=["y1","x2","y2"],R=y(l,[["render",function(t,s,e,o,r,a){return h(),c("svg",{class:"spark-line",viewBox:`0 0 ${e.width} ${e.height}`,width:"100%",preserveAspectRatio:"xMinYMin"},[e.socData?(h(),c("path",{key:0,class:"soc-path",d:a.socPath},null,8,E)):f("",!0),(h(!0),c(P,null,w(a.bars,i=>(h(),c("rect",{key:i.x,x:i.x,y:i.y,width:i.width,height:i.height,class:m(e.colorNegative&&i.negative?"negative":"")},null,10,M))),128)),x("line",{class:"zero-line",x1:0,y1:a.zeroHeight,x2:e.width,y2:a.zeroHeight},null,8,_)],8,N)}],["__scopeId","data-v-22cdf82b"]]);I.add(q,$,z);const A={name:"ChargePointStateBadge",components:{FontAwesomeIcon:D},props:{chargePointId:{required:!0,type:Array},showEnergyCharged:{required:!1,type:Boolean,default:!0}},data:()=>({mqttStore:k()}),computed:{plugState(){var t=!1;return this.chargePointId.forEach(s=>{t|=this.mqttStore.getChargePointPlugState(s)}),t},chargeState(){var t=!1;return this.chargePointId.forEach(s=>{t|=this.mqttStore.getChargePointChargeState(s)}),t},stateIcon(){return this.plugState?this.chargeState?["fas","fa-plug-circle-bolt"]:["fas","fa-plug-circle-check"]:["fas","fa-plug-circle-xmark"]},stateClass(){return this.plugState?this.chargeState?"_color:success":"_color:warning":"_color:gray"}}},H={key:0,class:"_padding-left:1"},Y=y(A,[["render",function(t,s,e,o,r,a){const i=d("font-awesome-icon"),n=d("i-badge");return h(),C(n,{size:"lg"},{default:v(()=>[b(i,{"fixed-width":"",icon:a.stateIcon,class:m(a.stateClass)},null,8,["icon","class"]),a.plugState&&e.showEnergyCharged?(h(),c("span",H,g(r.mqttStore.getChargePointImportedSincePlugged(e.chargePointId).energy)+" / "+g(r.mqttStore.getChargePointImportedSincePlugged(e.chargePointId).range),1)):f("",!0)]),_:1})}]]);export{Y as C,R as S}; +import{e as c,f,i as x,F as P,A as w,o as h,z as m,O as S,l as C,q as v,p as d,s as b,x as g}from"./vendor-Bzn5cd2Y.js";import{_ as y}from"./vendor-inkline-S9CBmrTS.js";import{u as k}from"./index-Rkba6Ib0.js";import{F as D,l as I,C as q,D as $,E as z}from"./vendor-fortawesome-C1Wk2aFl.js";const l={props:{data:{required:!1,type:Array,default:void 0},socData:{required:!1,type:Array,default:void 0},width:{type:Number,default:250},height:{type:Number,default:70},gap:{type:Number,default:3},stroke:{type:Number,default:3},min:{type:Number,default:0},max:{type:Number,default:1},color:{type:String,default:"var(--color--primary)"},colorNegative:{type:String,default:void 0}},computed:{highestPoint(){return Math.max(1,this.max,...this.slicedData)},lowestPoint(){return Math.min(0,this.min,...this.slicedData)},maxPoints(){return Math.floor(this.width/(this.stroke+this.gap))},slicedData(){if(this.data)return this.data.slice(-this.maxPoints)},slicedSocData(){if(this.socData)return this.socData.slice(-this.maxPoints)},zeroHeight(){return this.height-(0-this.lowestPoint)/(this.highestPoint-this.lowestPoint)*this.height},coordinates(){if(this.data)return this.calculateCoordinates(this.slicedData,this.lowestPoint,this.highestPoint)},socCoordinates(){if(this.socData)return this.calculateCoordinates(this.slicedSocData,0,100)},bars(){if(this.coordinates){const t=[];return this.coordinates.forEach(s=>{const e=s.x,o=s.y,r=this.stroke,a=Math.min(o,this.zeroHeight),i=Math.abs(o-this.zeroHeight),n=o>this.zeroHeight;t.push({x:e,y:a,width:r,height:i,negative:n})}),t}},socPath(){if(this.socCoordinates&&this.socCoordinates.length>0){let s=this.socCoordinates.slice(0,1)[0],e=this.socCoordinates.slice(-1)[0];var t=`M 0,${this.height}`;return t+=` L 0,${s.y}`,this.socCoordinates.forEach(o=>{t+=` L ${o.x+this.stroke/2},${o.y}`}),t+=` L ${e.x+this.stroke},${e.y} L ${e.x+this.stroke},${this.height} Z`}}},methods:{calculateCoordinates(t,s,e){const o=[];return t.forEach((r,a)=>{const i=a*this.width/this.maxPoints+1,n=this.height-(r-s)/(e-s)*this.height;o.push({x:i,y:n})}),o}}},u=()=>{S(t=>({"3f7db06a":t.color,"1de516bf":t.colorNegative}))},p=l.setup;l.setup=p?(t,s)=>(u(),p(t,s)):u;const N=["viewBox"],E=["d"],M=["x","y","width","height"],_=["y1","x2","y2"],R=y(l,[["render",function(t,s,e,o,r,a){return h(),c("svg",{class:"spark-line",viewBox:`0 0 ${e.width} ${e.height}`,width:"100%",preserveAspectRatio:"xMinYMin"},[e.socData?(h(),c("path",{key:0,class:"soc-path",d:a.socPath},null,8,E)):f("",!0),(h(!0),c(P,null,w(a.bars,i=>(h(),c("rect",{key:i.x,x:i.x,y:i.y,width:i.width,height:i.height,class:m(e.colorNegative&&i.negative?"negative":"")},null,10,M))),128)),x("line",{class:"zero-line",x1:0,y1:a.zeroHeight,x2:e.width,y2:a.zeroHeight},null,8,_)],8,N)}],["__scopeId","data-v-22cdf82b"]]);I.add(q,$,z);const A={name:"ChargePointStateBadge",components:{FontAwesomeIcon:D},props:{chargePointId:{required:!0,type:Array},showEnergyCharged:{required:!1,type:Boolean,default:!0}},data:()=>({mqttStore:k()}),computed:{plugState(){var t=!1;return this.chargePointId.forEach(s=>{t|=this.mqttStore.getChargePointPlugState(s)}),t},chargeState(){var t=!1;return this.chargePointId.forEach(s=>{t|=this.mqttStore.getChargePointChargeState(s)}),t},stateIcon(){return this.plugState?this.chargeState?["fas","fa-plug-circle-bolt"]:["fas","fa-plug-circle-check"]:["fas","fa-plug-circle-xmark"]},stateClass(){return this.plugState?this.chargeState?"_color:success":"_color:warning":"_color:gray"}}},H={key:0,class:"_padding-left:1"},Y=y(A,[["render",function(t,s,e,o,r,a){const i=d("font-awesome-icon"),n=d("i-badge");return h(),C(n,{size:"lg"},{default:v(()=>[b(i,{"fixed-width":"",icon:a.stateIcon,class:m(a.stateClass)},null,8,["icon","class"]),a.plugState&&e.showEnergyCharged?(h(),c("span",H,g(r.mqttStore.getChargePointImportedSincePlugged(e.chargePointId).energy)+" / "+g(r.mqttStore.getChargePointImportedSincePlugged(e.chargePointId).range),1)):f("",!0)]),_:1})}]]);export{Y as C,R as S}; diff --git a/packages/modules/display_themes/cards/web/assets/ChargePointsView-BF43Lifc.css b/packages/modules/display_themes/cards/web/assets/ChargePointsView-CWQMPYO-.css similarity index 71% rename from packages/modules/display_themes/cards/web/assets/ChargePointsView-BF43Lifc.css rename to packages/modules/display_themes/cards/web/assets/ChargePointsView-CWQMPYO-.css index f456d790fd..2378b73539 100644 --- a/packages/modules/display_themes/cards/web/assets/ChargePointsView-BF43Lifc.css +++ b/packages/modules/display_themes/cards/web/assets/ChargePointsView-CWQMPYO-.css @@ -1 +1 @@ -.card[data-v-45dbe31a]{----background: inherit !important;----body--color: var(----color) !important}.clickable[data-v-45dbe31a]{cursor:pointer}.card[data-v-cb556d40]{----background: inherit !important;----body--color: var(----color) !important}.clickable[data-v-cb556d40]{cursor:pointer}.large-button[data-v-cb556d40]{height:3.75rem;font-size:1.5rem;padding:.75rem 1.5rem}.button-group-wrapper[data-v-cb556d40]{display:flex;flex-direction:column;padding-right:0}.main-button-group[data-v-cb556d40]{display:flex;flex-wrap:wrap;width:100%}.button.-outline:disabled.-disabled.-active[data-v-cb556d40]{----border-color: var(----border-color--hover);background:var(----background);color:var(----color)}.modal-vehicle-select[data-v-b89baba5] .modal-body{max-height:72vh;overflow-y:scroll}.large-button[data-v-b89baba5]{height:3.5rem;font-size:1.5rem;padding:.75rem 1.5rem}.chartContainer[data-v-30ed2f35]{width:100%;min-height:200px;height:min(50vh,300px)}.charge-points-card-wrapper[data-v-2850e23a]{display:grid;grid-template-columns:repeat(auto-fill,minmax(36rem,1fr));grid-gap:var(--spacing)}[data-v-2850e23a] .toggle .toggle-label:before{border-color:var(--color--dark-45)}[data-v-2850e23a] .tab{min-height:72vh;max-height:72vh;overflow-y:scroll}[data-v-2850e23a] .input-prepend,[data-v-2850e23a] .input-append{min-width:3em}.plan-name[data-v-2850e23a]{font-weight:700}.plan-details[data-v-2850e23a]{display:flex;flex-wrap:nowrap;justify-content:center}.plan-details>div[data-v-2850e23a]:not(:last-child){margin-right:.5em} +.card[data-v-45dbe31a]{----background: inherit !important;----body--color: var(----color) !important}.clickable[data-v-45dbe31a]{cursor:pointer}.card[data-v-cb556d40]{----background: inherit !important;----body--color: var(----color) !important}.clickable[data-v-cb556d40]{cursor:pointer}.large-button[data-v-cb556d40]{height:3.75rem;font-size:1.5rem;padding:.75rem 1.5rem}.button-group-wrapper[data-v-cb556d40]{display:flex;flex-direction:column;padding-right:0}.main-button-group[data-v-cb556d40]{display:flex;flex-wrap:wrap;width:100%}.button.-outline:disabled.-disabled.-active[data-v-cb556d40]{----border-color: var(----border-color--hover);background:var(----background);color:var(----color)}.modal-vehicle-select[data-v-b89baba5] .modal-body{max-height:72vh;overflow-y:scroll}.large-button[data-v-b89baba5]{height:3.5rem;font-size:1.5rem;padding:.75rem 1.5rem}.chartContainer[data-v-30ed2f35]{width:100%;min-height:200px;height:min(50vh,300px)}.charge-points-card-wrapper[data-v-0f2c2489]{display:grid;grid-template-columns:repeat(auto-fill,minmax(36rem,1fr));grid-gap:var(--spacing)}[data-v-0f2c2489] .toggle .toggle-label:before{border-color:var(--color--dark-45)}[data-v-0f2c2489] .tab{min-height:72vh;max-height:72vh;overflow-y:scroll}[data-v-0f2c2489] .input-prepend,[data-v-0f2c2489] .input-append{min-width:3em}.plan-name[data-v-0f2c2489]{font-weight:700}.plan-details[data-v-0f2c2489]{display:flex;flex-wrap:nowrap;justify-content:center}.plan-details>div[data-v-0f2c2489]:not(:last-child){margin-right:.5em} diff --git a/packages/modules/display_themes/cards/web/assets/ChargePointsView-Dcp__6hw.js b/packages/modules/display_themes/cards/web/assets/ChargePointsView-Dcp__6hw.js new file mode 100644 index 0000000000..aaacf05a30 --- /dev/null +++ b/packages/modules/display_themes/cards/web/assets/ChargePointsView-Dcp__6hw.js @@ -0,0 +1 @@ +var re=Object.defineProperty;var ce=(n,e,o)=>e in n?re(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o;var w=(n,e,o)=>ce(n,typeof e!="symbol"?e+"":e,o);import{u as x,C as de,N as he}from"./index-Rkba6Ib0.js";import{D}from"./DashboardCard-DS7AgUYm.js";import{C as W,S as ge}from"./ChargePointPlugBadge-Cea5-sTy.js";import{F,l as N,b as se,c as me,j as Ce,k as R,m as O,e as j,n as Z,o as K,p as J,q as H,r as Q,s as X,t as Y,u as G,v as ue,w as Pe,x as pe,y as fe,z as _e,A as Ve,B as Se}from"./vendor-fortawesome-C1Wk2aFl.js";import{_ as M}from"./vendor-inkline-S9CBmrTS.js";import{l as u,q as i,p as h,o as d,s as a,z as b,e as I,F as E,k as c,f as P,x as p,A as B,I as Ie,P as ve,Q as ke,S as be,U as qe,V as ye,W as Le,X as Me,Y as xe,Z as we,_ as Te,i as T,n as Ee}from"./vendor-Bzn5cd2Y.js";import{C as Ae}from"./ChargeModeModal-D_G7wsgY.js";N.add(se,me);const ee=M({name:"ChargePointLockButton",components:{FontAwesomeIcon:F},props:{chargePointId:{required:!0,type:Number},changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:x()}),computed:{locked(){return this.mqttStore.getChargePointManualLock(this.chargePointId)},stateIcon(){return this.locked?["fas","fa-lock"]:["fas","fa-lock-open"]},stateClass(){return this.locked?["_color:danger"]:"_color:success"}},methods:{toggleChargePointManualLock(){this.changesLocked||this.$root.sendTopicToBroker(`openWB/chargepoint/${this.chargePointId}/set/manual_lock`,!this.mqttStore.getValueBool(`openWB/chargepoint/${this.chargePointId}/set/manual_lock`))}}},[["render",function(n,e,o,g,t,l){const f=h("font-awesome-icon"),k=h("i-button");return d(),u(k,{size:"lg",disabled:o.changesLocked,outline:o.changesLocked},{default:i(()=>[a(f,{"fixed-width":"",icon:l.stateIcon,class:b(l.stateClass),onClick:e[0]||(e[0]=v=>l.toggleChargePointManualLock())},null,8,["icon","class"])]),_:1},8,["disabled","outline"])}]]);N.add(Ce);const te=M({name:"ChargePointCodeButton",components:{FontAwesomeIcon:F,CodeInputModal:de},props:{chargePointId:{type:Number,required:!0}},data:()=>({mqttStore:x(),modalIdTagEntryVisible:!1,modalIdTagEntryColor:"warning",code:""}),computed:{tagState(){return this.mqttStore.getChargepointTagState(this.chargePointId)},tagButtonColor(){switch(this.tagState){case 2:return"success";case 1:return"warning";default:return""}},tagClass(){switch(this.tagState){case 2:return"_color:success-80";case 1:return"_color:warning-80";default:return""}}},methods:{toggleIdTagModal(){this.modalIdTagEntryVisible=!this.modalIdTagEntryVisible},sendIdTag(n){this.$root.sendTopicToBroker(`openWB/chargepoint/${this.chargePointId}/get/rfid`,n),this.modalIdTagEntryVisible=!1}}},[["render",function(n,e,o,g,t,l){const f=h("FontAwesomeIcon"),k=h("i-button"),v=h("CodeInputModal");return d(),I(E,null,[a(k,{class:"_margin-right:1",size:"lg",color:l.tagButtonColor,disabled:l.tagState==2,onClick:e[0]||(e[0]=s=>l.toggleIdTagModal())},{default:i(()=>[a(f,{"fixed-width":"",icon:["fas","fa-calculator"],class:b(l.tagClass)},null,8,["class"])]),_:1},8,["color","disabled"]),a(v,{ref:"lockInput",modelValue:t.modalIdTagEntryVisible,"onUpdate:modelValue":e[1]||(e[1]=s=>t.modalIdTagEntryVisible=s),"min-length":4,"max-length":20,"onUpdate:inputValue":l.sendIdTag},{header:i(()=>e[2]||(e[2]=[c(" Bitte einen ID-Tag eingeben. ",-1)])),_:1},8,["modelValue","onUpdate:inputValue"])],64)}]]);N.add(R,O,j,Z,K,J,H,Q,X,Y,G);const ze={name:"ChargePointCard",components:{DashboardCard:D,SparkLine:ge,ChargePointPlugBadge:W,ChargePointLockButton:ee,ChargePointCodeButton:te,FontAwesomeIcon:F},props:{chargePointId:{type:Number,required:!0},changesLocked:{type:Boolean,required:!0}},emits:["vehicle-click","soc-click","charge-mode-click","toggle-charge-point-settings"],data:()=>({mqttStore:x()}),methods:{handleVehicleClick(n){this.$emit("vehicle-click",n)},handleSocClick(n){this.$emit("soc-click",n)},handleChargeModeClick(n){this.$emit("charge-mode-click",n)},toggleChargePointSettings(n){this.$emit("toggle-charge-point-settings",n)}}},Be={key:0},Fe=M(ze,[["render",function(n,e,o,g,t,l){const f=h("charge-point-plug-badge"),k=h("charge-point-code-button"),v=h("charge-point-lock-button"),s=h("i-column"),_=h("i-row"),m=h("spark-line"),C=h("font-awesome-icon"),V=h("i-badge"),y=h("i-button"),L=h("i-container"),q=h("dashboard-card");return d(),u(q,{color:"primary"},{headerLeft:i(()=>[c(p(t.mqttStore.getChargePointName(o.chargePointId)),1)]),headerRight:i(()=>[a(f,{"charge-point-id":[o.chargePointId]},null,8,["charge-point-id"])]),default:i(()=>[a(L,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0"},{default:i(()=>[t.mqttStore.getRfidEnabled?(d(),u(k,{key:0,"charge-point-id":o.chargePointId},null,8,["charge-point-id"])):P("",!0),a(v,{"charge-point-id":o.chargePointId,"changes-locked":o.changesLocked},null,8,["charge-point-id","changes-locked"])]),_:1}),a(s,{class:"_text-align:right _padding-left:0"},{default:i(()=>[c(p(t.mqttStore.getChargePointPower(o.chargePointId))+" "+p(t.mqttStore.getChargePointPhasesInUse(o.chargePointId))+" "+p(t.mqttStore.getChargePointSetCurrent(o.chargePointId)),1)]),_:1})]),_:1}),a(_,{class:"_padding-top:1"},{default:i(()=>[a(s,{class:"_padding-left:0"},{default:i(()=>[a(m,{color:"var(--color--primary)",data:t.mqttStore.getChargePointPowerChartData(o.chargePointId)},null,8,["data"])]),_:1})]),_:1})]),_:1}),a(s,{md:"6"},{default:i(()=>[a(_,{class:"_display:flex"},{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0 _flex-grow:1"},{default:i(()=>[a(V,{size:"lg",class:b(["_width:100%",o.changesLocked?"":"clickable"]),onClick:e[0]||(e[0]=S=>l.handleVehicleClick(o.chargePointId))},{default:i(()=>[a(C,{"fixed-width":"",icon:["fas","fa-car"]}),c(" "+p(t.mqttStore.getChargePointConnectedVehicleName(o.chargePointId)),1)]),_:1},8,["class"])]),_:1}),t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))||t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(s,{key:0,class:"_flex-grow:0 _padding-right:0 _padding-left:1"},{default:i(()=>[a(y,{size:"sm",disabled:o.changesLocked,class:b(o.changesLocked?"":"clickable"),onClick:e[1]||(e[1]=S=>l.handleSocClick(o.chargePointId))},{default:i(()=>[t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?(d(),I("span",Be,[a(C,{"fixed-width":"",icon:t.mqttStore.getVehicleSocIsManual(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?["fas","fa-edit"]:["fas","fa-car-battery"]},null,8,["icon"]),c(" "+p(t.mqttStore.getChargePointConnectedVehicleSoc(o.chargePointId).soc)+"% ",1)])):P("",!0),t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(C,{key:1,"fixed-width":"",icon:t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?["fas","times-circle"]:["fas","exclamation-triangle"]:[],class:b(t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?"_color:danger":"_color:warning":"")},null,8,["icon","class"])):P("",!0)]),_:1},8,["disabled","class"])]),_:1})):P("",!0)]),_:1}),a(_,{class:"_padding-top:1 _display:flex"},{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0 _flex-grow:1"},{default:i(()=>{var S;return[a(V,{size:"lg",class:b(["_width:100%",o.changesLocked?"":"clickable"]),color:(S=t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId))==null?void 0:S.class,onClick:e[2]||(e[2]=A=>l.handleChargeModeClick(o.chargePointId))},{default:i(()=>{var A;return[c(p((A=t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId))==null?void 0:A.label)+" ",1),a(C,{"fixed-width":"",icon:t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?["fas","fa-star"]:["far","fa-star"],class:b(t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?"_color:warning":"")},null,8,["icon","class"])]}),_:1},8,["class","color"])]}),_:1}),t.mqttStore.getChargePointConnectedVehicleTimeChargingActive(o.chargePointId)?(d(),u(s,{key:0,class:"_flex-grow:0 _padding-right:0 _padding-left:1"},{default:i(()=>[a(V,{size:"lg"},{default:i(()=>[t.mqttStore.getChargePointConnectedVehicleTimeChargingActive(o.chargePointId)?(d(),u(C,{key:0,"fixed-width":"",icon:t.mqttStore.getChargePointConnectedVehicleTimeChargingRunning(o.chargePointId)?["fas","fa-clock"]:["far","fa-clock"],class:b(t.mqttStore.getChargePointConnectedVehicleTimeChargingRunning(o.chargePointId)?"_color:success":"")},null,8,["icon","class"])):P("",!0)]),_:1})]),_:1})):P("",!0)]),_:1}),o.changesLocked?P("",!0):(d(),u(_,{key:0,class:"_padding-top:1"},{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0"},{default:i(()=>[a(y,{block:"",onClick:e[3]||(e[3]=S=>l.toggleChargePointSettings(o.chargePointId))},{default:i(()=>[a(C,{"fixed-width":"",icon:["fas","fa-wrench"]})]),_:1})]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-45dbe31a"]]);N.add(R,O,j,Z,K,J,H,Q,X,Y,G);const Ne={name:"ChargePointCard",components:{DashboardCard:D,ChargePointPlugBadge:W,ChargePointLockButton:ee,ChargePointCodeButton:te,FontAwesomeIcon:F},props:{chargePointId:{type:Number,required:!0},changesLocked:{type:Boolean,required:!0}},emits:["vehicle-click","soc-click","charge-mode-click","toggle-charge-point-settings","set-charge-point-connected-vehicle-charge-mode"],data:()=>({mqttStore:x(),simpleChargeModes:["instant_charging","pv_charging","stop"]}),computed:{filteredChargeModes(){return this.mqttStore.getSimpleChargePointView?this.mqttStore.chargeModeList().filter(n=>this.simpleChargeModes.includes(n.id)):this.mqttStore.chargeModeList()}},methods:{handleVehicleClick(n){this.$emit("vehicle-click",n)},handleSocClick(n){this.$emit("soc-click",n)},handleChargeModeClick(n){this.$emit("charge-mode-click",n)},toggleChargePointSettings(n){this.$emit("toggle-charge-point-settings",n)},setChargePointConnectedVehicleChargeMode(n,e){this.$emit("set-charge-point-connected-vehicle-charge-mode",n,e)}}},$e={key:0},Ue=M(Ne,[["render",function(n,e,o,g,t,l){const f=h("charge-point-plug-badge"),k=h("charge-point-code-button"),v=h("charge-point-lock-button"),s=h("i-column"),_=h("i-row"),m=h("font-awesome-icon"),C=h("i-button"),V=h("i-button-group"),y=h("i-container"),L=h("dashboard-card");return d(),u(L,{color:"primary"},{headerLeft:i(()=>[c(p(t.mqttStore.getChargePointName(o.chargePointId)),1)]),headerRight:i(()=>[a(f,{"charge-point-id":[o.chargePointId]},null,8,["charge-point-id"])]),default:i(()=>[a(y,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0"},{default:i(()=>[t.mqttStore.getRfidEnabled?(d(),u(k,{key:0,"charge-point-id":o.chargePointId},null,8,["charge-point-id"])):P("",!0),a(v,{"charge-point-id":o.chargePointId,"changes-locked":o.changesLocked},null,8,["charge-point-id","changes-locked"])]),_:1}),a(s,{class:"_text-align:right _padding-left:0"},{default:i(()=>[c(p(t.mqttStore.getChargePointPower(o.chargePointId))+" "+p(t.mqttStore.getChargePointPhasesInUse(o.chargePointId))+" "+p(t.mqttStore.getChargePointSetCurrent(o.chargePointId)),1)]),_:1})]),_:1}),a(_,{class:"_padding-top:1"},{default:i(()=>[a(s,{class:"_padding-left:0 button-group-wrapper"},{default:i(()=>[a(V,{class:"button-group main-button-group"},{default:i(()=>[a(C,{class:b(["large-button _flex-grow:1",o.changesLocked?"":"clickable"]),disabled:o.changesLocked,onClick:e[0]||(e[0]=q=>l.handleVehicleClick(o.chargePointId))},{default:i(()=>[a(m,{"fixed-width":"",icon:["fas","fa-car"]}),c(" "+p(t.mqttStore.getChargePointConnectedVehicleName(o.chargePointId))+" ",1),a(m,{class:b(["_padding-left:1",t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?"_color:warning":""]),"fixed-width":"",icon:t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?["fas","fa-star"]:["far","fa-star"]},null,8,["icon","class"])]),_:1},8,["class","disabled"]),t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))||t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(C,{key:0,class:b(["large-button _flex-grow:0",o.changesLocked?"":"clickable"]),disabled:o.changesLocked,onClick:e[1]||(e[1]=q=>l.handleSocClick(o.chargePointId))},{default:i(()=>[t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?(d(),I("span",$e,[a(m,{"fixed-width":"",icon:t.mqttStore.getVehicleSocIsManual(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?["fas","fa-edit"]:["fas","fa-car-battery"]},null,8,["icon"]),c(" "+p(t.mqttStore.getChargePointConnectedVehicleSoc(o.chargePointId).soc)+"% ",1)])):P("",!0),t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(m,{key:1,"fixed-width":"",icon:t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?["fas","times-circle"]:["fas","exclamation-triangle"]:[],class:b(t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?"_color:danger":"_color:warning":"")},null,8,["icon","class"])):P("",!0)]),_:1},8,["disabled","class"])):P("",!0),a(C,{class:b(["large-button _flex-grow:0",o.changesLocked?"":"clickable"]),disabled:o.changesLocked,onClick:e[2]||(e[2]=q=>l.toggleChargePointSettings(o.chargePointId))},{default:i(()=>[a(m,{"fixed-width":"",icon:["fas","fa-wrench"]})]),_:1},8,["class","disabled"])]),_:1}),a(V,{class:"button-group _margin-top:1",disabled:o.changesLocked},{default:i(()=>[(d(!0),I(E,null,B(l.filteredChargeModes,q=>(d(),u(C,{key:q.id,outline:"",class:b(["large-button _flex-grow:1",o.changesLocked?"":"clickable"]),color:q.class!="dark"?q.class:"light",active:t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId)!=null&&q.id==t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId).mode,onClick:S=>l.setChargePointConnectedVehicleChargeMode(o.chargePointId,q.id)},{default:i(()=>[c(p(q.label),1)]),_:2},1032,["class","color","active","onClick"]))),128))]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-cb556d40"]]),De={name:"ExtendedNumberInput",inheritAttrs:!1,props:{modelValue:{type:Number,required:!0,default:NaN},unit:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},labels:{type:Array,default:void 0}},emits:["update:modelValue"],data(){return{minimum:this.labels?0:this.min,maximum:this.labels?this.labels.length-1:this.max,stepSize:this.labels?1:this.step}},computed:{label(){var n;return this.labels&&this.inputValue!=null?this.inputValuel.label=v),plaintext:"",class:"_text-align:right",size:"lg"},{prepend:i(()=>[a(f,{onClick:l.decrement},{default:i(()=>e[1]||(e[1]=[c(" - ",-1)])),_:1,__:[1]},8,["onClick"])]),suffix:i(()=>[c(p(o.unit),1)]),append:i(()=>[a(f,{onClick:l.increment},{default:i(()=>e[2]||(e[2]=[c(" + ",-1)])),_:1,__:[2]},8,["onClick"])]),_:1},8,["modelValue"])}]]),We=M({name:"ManualSocInput",components:{ExtendedNumberInput:ae,NumberPad:he},props:{modelValue:{required:!0,type:Boolean,default:!1},vehicleId:{required:!0,type:Number,default:0}},emits:["update:modelValue"],data:()=>({mqttStore:x(),newSoc:0}),methods:{enter(n){let e=10*this.newSoc+parseInt(n);e>=0&&e<=100&&(this.newSoc=e)},removeDigit(){this.newSoc=Math.trunc(this.newSoc/10)},clear(){this.newSoc=0},close(){this.$emit("update:modelValue",!1),this.newSoc=0},updateManualSoc(){this.$root.sendTopicToBroker(`openWB/vehicle/${this.vehicleId}/soc_module/calculated_soc_state/manual_soc`,this.newSoc),this.close()}}},[["render",function(n,e,o,g,t,l){const f=h("extended-number-input"),k=h("i-column"),v=h("i-row"),s=h("NumberPad"),_=h("i-container"),m=h("i-button"),C=h("i-modal");return d(),u(Ie,{to:"body"},[a(C,{"model-value":o.modelValue,size:"sm","onUpdate:modelValue":e[6]||(e[6]=V=>n.$emit("update:modelValue",V))},{header:i(()=>[c(' SoC für Fahrzeug "'+p(t.mqttStore.getVehicleName(o.vehicleId))+'" ',1)]),footer:i(()=>[a(_,null,{default:i(()=>[a(v,null,{default:i(()=>[a(k,null,{default:i(()=>[a(m,{color:"danger",onClick:e[4]||(e[4]=V=>l.close())},{default:i(()=>e[7]||(e[7]=[c(" Zurück ",-1)])),_:1,__:[7]})]),_:1}),a(k,{class:"_text-align:right"},{default:i(()=>[a(m,{color:"success",onClick:e[5]||(e[5]=V=>l.updateManualSoc())},{default:i(()=>e[8]||(e[8]=[c(" OK ",-1)])),_:1,__:[8]})]),_:1})]),_:1})]),_:1})]),default:i(()=>[a(_,null,{default:i(()=>[a(v,{center:"",class:"_padding-bottom:1"},{default:i(()=>[a(k,null,{default:i(()=>[a(f,{modelValue:t.newSoc,"onUpdate:modelValue":e[0]||(e[0]=V=>t.newSoc=V),unit:"%",min:0,max:100,step:1,size:"lg",class:"_text-align:center"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{"onKey:digit":e[1]||(e[1]=V=>l.enter(V)),"onKey:clear":e[2]||(e[2]=V=>l.clear()),"onKey:delete":e[3]||(e[3]=V=>l.removeDigit())})]),_:1})]),_:1},8,["model-value"])])}]]),Re=M({name:"VehicleSelectModal",props:{modelValue:{required:!0,type:Boolean,default:!1},chargePointId:{type:Number,required:!0}},emits:["update:modelValue"],data:()=>({mqttStore:x()}),computed:{vehicleList(){let n=this.mqttStore.getVehicleList;var e=[];return Object.keys(n).forEach(o=>{let g=parseInt(o.match(/(?:\/)([0-9]+)(?=\/)*/g)[0].replace(/[^0-9]+/g,""));e.push({id:g,name:n[o]})}),e}},methods:{setChargePointConnectedVehicle(n){n.id!=this.mqttStore.getChargePointConnectedVehicleId(this.chargePointId)&&this.$root.sendTopicToBroker(`openWB/chargepoint/${this.chargePointId}/config/ev`,n.id)}}},[["render",function(n,e,o,g,t,l){const f=h("i-button"),k=h("i-button-group"),v=h("i-form-group"),s=h("i-form"),_=h("i-modal");return d(),u(_,{"model-value":o.modelValue,class:"modal-vehicle-select",size:"lg","onUpdate:modelValue":e[0]||(e[0]=m=>n.$emit("update:modelValue",m))},{header:i(()=>[c(' Fahrzeug an "'+p(t.mqttStore.getChargePointName(o.chargePointId))+'" auswählen ',1)]),default:i(()=>[a(s,null,{default:i(()=>[a(v,null,{default:i(()=>[a(k,{vertical:"",block:""},{default:i(()=>[(d(!0),I(E,null,B(l.vehicleList,m=>(d(),u(f,{key:m.id,size:"lg",class:"large-button",active:t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId)==m.id,color:t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId)==m.id?"primary":"",onClick:C=>l.setChargePointConnectedVehicle(m)},{default:i(()=>[c(p(m.name),1)]),_:2},1032,["active","color","onClick"]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])}],["__scopeId","data-v-b89baba5"]]);ke.register(be,qe,ye,Le,Me,xe,we,Te);const Oe={class:"chartContainer"},je=M({name:"ElectricityTariffChart",components:{ChartJsLine:ve},props:{modelValue:{type:Number,required:!1,default:void 0}},emits:["update:modelValue"],data:()=>({mqttStore:x(),chartDatasets:{datasets:[{label:"Stromtarif",unit:"ct/kWh",type:"line",stepped:!0,borderColor:"rgb(18, 111, 142)",backgroundColor:"rgb(18, 111, 142)",fill:!1,pointStyle:"circle",pointRadius:0,pointHoverRadius:4,cubicInterpolationMode:"monotone",hidden:!1,borderWidth:2,data:void 0,yAxisID:"y",parsing:{xAxisKey:"timestamp",yAxisKey:"price"}}]}}),computed:{chartDataRead(){return Object.keys(this.chartDataObject.datasets[0].data).length>0},chartDataObject(){let n=[];const e=this.mqttStore.getEtPrices;if(e&&Object.keys(e).length>0){for(const[t,l]of Object.entries(e))n.push({timestamp:1e3*t,price:1e5*l});const g=n.slice(-1)[0];n.push({timestamp:g.timestamp+3599e3,price:g.price})}const o=this.chartDatasets;return o.datasets[0].data=n,o},priceAnnotations(){const n="rgba(73, 238, 73, 0.2)",e="rgba(255, 10, 13, 0.2)",o=this.chartDataObject.datasets[0].data;class g{constructor(){w(this,"type","box");w(this,"drawTime","beforeDatasetsDraw");w(this,"xMin",o[0].timestamp);w(this,"xMax",o[0].timestamp);w(this,"borderWidth",2);w(this,"cornerRadius",0)}}let t=[];if(this.modelValue!==void 0){for(let l=0;lthis.modelValue){let f=new g;for(f.borderColor=e,f.backgroundColor=e,f.xMin=o[l].timestamp;lthis.modelValue;)l++;l==o.length&&l--,f.xMax=o[l].timestamp,t.push(f)}}return t},myChartOptions(){return{plugins:{title:{display:!1},legend:{display:!1},annotation:{annotations:this.priceAnnotations}},elements:{point:{radius:2}},responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},scales:{x:{type:"time",time:{unit:"hour",text:"Zeit",maxTicksLimit:24},display:!0,title:{display:!0,text:"Uhrzeit",color:"#ffffff"},ticks:{font:{size:12},color:"#ffffff",maxTicksLimit:0},grid:{}},y:{position:"left",type:"linear",display:"auto",title:{font:{size:12},display:!0,text:"Preis [ct/kWh]",color:"#ffffff"},grid:{color:"#ffffff20"},ticks:{font:{size:12},stepSize:.1,maxTicksLimit:11,color:"#ffffff"}}}}}},methods:{chartClick(n){const e=this.$refs.priceChart.chart.getElementsAtEventForMode(n,"index",{intersect:!1},!0);e.length>0&&this.$emit("update:modelValue",Math.ceil(100*this.chartDataObject.datasets[0].data[e[0].index].price)/100)}}},[["render",function(n,e,o,g,t,l){const f=h("ChartJsLine");return d(),I("div",Oe,[l.chartDataRead?(d(),u(f,{key:0,ref:"priceChart",data:l.chartDataObject,options:l.myChartOptions,onClick:l.chartClick},null,8,["data","options","onClick"])):P("",!0)])}],["__scopeId","data-v-30ed2f35"]]);N.add(ue,Pe,pe,fe,_e,Ve,Se);const Ze={name:"ChargePointsView",components:{ChargePointCard:Fe,SimpleChargePointCard:Ue,ExtendedNumberInput:ae,ManualSocInput:We,ChargeModeModal:Ae,VehicleSelectModal:Re,FontAwesomeIcon:F,ElectricityTariffChart:je},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:x(),modalChargeModeSettingVisible:!1,modalVehicleSelectVisible:!1,modalChargePointSettingsVisible:!1,modalChargePointId:0,modalVehicleId:0,modalActiveTab:"tab-general",modalManualSocInputVisible:!1}),computed:{timeChargingEnabled(){return n=>this.mqttStore.getChargePointConnectedVehicleTimeChargingActive(n)===!0}},watch:{changesLocked(n,e){e!==!0&&n===!0&&(this.modalChargeModeSettingVisible=!1,this.modalVehicleSelectVisible=!1,this.modalChargePointSettingsVisible=!1,this.modalManualSocInputVisible=!1)}},methods:{toggleChargePointSettings(n){switch(this.mqttStore.getChargePointConnectedVehicleChargeMode(n).mode){case"pv_charging":this.modalActiveTab="tab-pv-charging";break;case"scheduled_charging":this.modalActiveTab="tab-scheduled-charging";break;case"eco_charging":this.modalActiveTab="tab-eco-charging";break;default:this.modalActiveTab="tab-instant-charging"}this.modalChargePointId=n,this.modalChargePointSettingsVisible=!0},handleChargeModeClick(n){this.changesLocked||(this.modalChargePointId=n,this.modalChargeModeSettingVisible=!0)},handleVehicleClick(n){this.changesLocked||(this.modalChargePointId=n,this.modalVehicleSelectVisible=!0)},handleSocClick(n){let e=this.mqttStore.getChargePointConnectedVehicleId(n);if(this.mqttStore.getVehicleSocIsManual(e))return this.modalVehicleId=e,void(this.modalManualSocInputVisible=!0);this.$root.sendTopicToBroker(`openWB/set/vehicle/${e}/get/force_soc_update`,1)},updateChargePointChargeTemplate(n,e,o=void 0){const g=this.mqttStore.updateState(`openWB/chargepoint/${n}/set/charge_template`,e,o);this.$root.sendTopicToBroker(`openWB/chargepoint/${n}/set/charge_template`,g)},setChargePointConnectedVehicleChargeMode(n,e){e.id!=this.mqttStore.getChargePointConnectedVehicleChargeMode(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.selected")},setChargePointConnectedVehiclePriority(n,e){e!=this.mqttStore.getChargePointConnectedVehiclePriority(n)&&this.updateChargePointChargeTemplate(n,e,"prio")},setChargePointConnectedVehicleTimeChargingActive(n,e){e!=this.mqttStore.getChargePointConnectedVehicleTimeChargingActive(n)&&this.updateChargePointChargeTemplate(n,e,"time_charging.active")},setChargePointConnectedVehicleInstantChargingCurrent(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingCurrent(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.current")},setChargePointConnectedVehicleInstantChargingPhases(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.phases_to_use")},setChargePointConnectedVehicleInstantChargingLimit(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(n).selected&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.limit.selected")},setChargePointConnectedVehicleInstantChargingLimitSoc(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(n).soc&&this.updateChargePointChargeTemplate(n,parseInt(e),"chargemode.instant_charging.limit.soc")},setChargePointConnectedVehicleInstantChargingLimitAmount(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(n).amount&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.limit.amount")},setChargePointConnectedVehiclePvChargingFeedInLimit(n,e){e!=this.mqttStore.getChargePointConnectedVehiclePvChargingFeedInLimit(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.feed_in_limit")},setChargePointConnectedVehiclePvChargingMinCurrent(n,e){let o=this.mqttStore.getChargePointConnectedVehiclePvChargingMinCurrent(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.pv_charging.min_current")},setChargePointConnectedVehiclePvChargingPhases(n,e){e!==void 0&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.phases_to_use")},setChargePointConnectedVehiclePvChargingLimit(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingLimit(n).selected&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.limit.selected")},setChargePointConnectedVehiclePvChargingLimitSoc(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingLimit(n).soc&&this.updateChargePointChargeTemplate(n,parseInt(e),"chargemode.pv_charging.limit.soc")},setChargePointConnectedVehiclePvChargingLimitAmount(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingLimit(n).amount&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.limit.amount")},setChargePointConnectedVehiclePvChargingMinSoc(n,e){let o=this.mqttStore.getChargePointConnectedVehiclePvChargingMinSoc(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.pv_charging.min_soc")},setChargePointConnectedVehiclePvChargingMinSocCurrent(n,e){let o=this.mqttStore.getChargePointConnectedVehiclePvChargingMinSocCurrent(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.pv_charging.min_soc_current")},setChargePointConnectedVehiclePvChargingMinSocPhases(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.phases_to_use_min_soc")},setChargePointConnectedVehicleEcoChargingCurrent(n,e){let o=this.mqttStore.getChargePointConnectedVehicleEcoChargingCurrent(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.eco_charging.current")},setChargePointConnectedVehicleEcoChargingPhases(n,e){e!==void 0&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.eco_charging.phases_to_use")},setChargePointConnectedVehicleEcoChargingLimit(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(n).selected&&this.updateChargePointChargeTemplate(n,e,"chargemode.eco_charging.limit.selected")},setChargePointConnectedVehicleEcoChargingLimitSoc(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(n).soc&&this.updateChargePointChargeTemplate(n,parseInt(e),"chargemode.eco_charging.limit.soc")},setChargePointConnectedVehicleEcoChargingLimitAmount(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(n).amount&&this.updateChargePointChargeTemplate(n,e,"chargemode.eco_charging.limit.amount")},setChargePointConnectedVehicleEcoChargingMaxPrice(n,e){let o=this.mqttStore.getChargePointConnectedVehicleEcoChargingMaxPrice(n),g=parseFloat(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,parseFloat((g/1e5).toFixed(7)),"chargemode.eco_charging.max_price")},setChargePointConnectedVehicleScheduledChargingPlanActive(n,e,o){const g=`openWB/chargepoint/${n}/set/charge_template`,t=this.mqttStore.updateState(g,o,`chargemode.scheduled_charging.plans.${e}.active`);this.$root.sendTopicToBroker(g,t)},setChargePointConnectedVehicleTimeChargingPlanActive(n,e,o){const g=`openWB/chargepoint/${n}/set/charge_template`,t=this.mqttStore.updateState(g,o,`time_charging.plans.${e}.active`);this.$root.sendTopicToBroker(g,t)}}},Ke={class:"charge-points-card-wrapper"},Je={class:"plan-name"},He={class:"plan-details"},Qe={key:0},Xe={key:1},Ye={key:2},Ge={key:3},et={key:4},tt={key:5},at={key:1},it={class:"plan-name"},nt={class:"plan-details"},ot={key:0},lt={key:1},rt={key:2},ct={key:3},dt={key:4},ft=M(Ze,[["render",function(n,e,o,g,t,l){const f=h("charge-mode-modal"),k=h("vehicle-select-modal"),v=h("i-tab-title"),s=h("i-form-label"),_=h("extended-number-input"),m=h("i-form-group"),C=h("i-button"),V=h("i-button-group"),y=h("i-form"),L=h("i-tab"),q=h("ElectricityTariffChart"),S=h("font-awesome-icon"),A=h("i-alert"),$=h("i-row"),U=h("i-container"),ie=h("i-tabs"),ne=h("i-modal"),oe=h("manual-soc-input");return d(),I(E,null,[T("div",Ke,[(d(!0),I(E,null,B(t.mqttStore.getChargePointIds,r=>(d(),u(Ee(t.mqttStore.getSimpleChargePointView?"SimpleChargePointCard":"ChargePointCard"),{key:r,"charge-point-id":r,"changes-locked":o.changesLocked,onVehicleClick:l.handleVehicleClick,onSocClick:l.handleSocClick,onChargeModeClick:l.handleChargeModeClick,onToggleChargePointSettings:l.toggleChargePointSettings,onSetChargePointConnectedVehicleChargeMode:l.setChargePointConnectedVehicleChargeMode},null,40,["charge-point-id","changes-locked","onVehicleClick","onSocClick","onChargeModeClick","onToggleChargePointSettings","onSetChargePointConnectedVehicleChargeMode"]))),128))]),a(f,{modelValue:t.modalChargeModeSettingVisible,"onUpdate:modelValue":e[0]||(e[0]=r=>t.modalChargeModeSettingVisible=r),"charge-point-id":t.modalChargePointId},null,8,["modelValue","charge-point-id"]),a(k,{modelValue:t.modalVehicleSelectVisible,"onUpdate:modelValue":e[1]||(e[1]=r=>t.modalVehicleSelectVisible=r),"charge-point-id":t.modalChargePointId},null,8,["modelValue","charge-point-id"]),a(ne,{modelValue:t.modalChargePointSettingsVisible,"onUpdate:modelValue":e[39]||(e[39]=r=>t.modalChargePointSettingsVisible=r),size:"lg"},{header:i(()=>[c(' Einstellungen für Fahrzeug "'+p(t.mqttStore.getChargePointConnectedVehicleName(t.modalChargePointId))+'" ',1)]),default:i(()=>[a(ie,{modelValue:t.modalActiveTab,"onUpdate:modelValue":e[38]||(e[38]=r=>t.modalActiveTab=r),stretch:""},{header:i(()=>[a(v,{for:"tab-instant-charging"},{default:i(()=>e[41]||(e[41]=[c(" Sofort ",-1)])),_:1,__:[41]}),a(v,{for:"tab-pv-charging"},{default:i(()=>e[42]||(e[42]=[c(" PV ",-1)])),_:1,__:[42]}),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(v,{key:0,for:"tab-eco-charging"},{default:i(()=>e[43]||(e[43]=[c(" Eco ",-1)])),_:1,__:[43]})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(v,{key:1,for:"tab-scheduled-charging"},{default:i(()=>e[44]||(e[44]=[c(" Ziel ",-1)])),_:1,__:[44]})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(v,{key:2,for:"tab-time-charging"},{default:i(()=>e[45]||(e[45]=[c(" Zeit ",-1)])),_:1,__:[45]}))]),default:i(()=>[a(L,{name:"tab-instant-charging"},{default:i(()=>[a(y,null,{default:i(()=>[a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[46]||(e[46]=[c("Stromstärke",-1)])),_:1,__:[46]}),a(_,{unit:"A",min:6,max:32,"model-value":t.mqttStore.getChargePointConnectedVehicleInstantChargingCurrent(t.modalChargePointId),"onUpdate:modelValue":e[2]||(e[2]=r=>l.setChargePointConnectedVehicleInstantChargingCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[47]||(e[47]=[c("Anzahl Phasen",-1)])),_:1,__:[47]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==1,onClick:e[3]||(e[3]=r=>l.setChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId,1))},{default:i(()=>e[48]||(e[48]=[c(" 1 ",-1)])),_:1,__:[48]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==3,onClick:e[4]||(e[4]=r=>l.setChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId,3))},{default:i(()=>e[49]||(e[49]=[c(" Maximum ",-1)])),_:1,__:[49]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[50]||(e[50]=[c("Begrenzung",-1)])),_:1,__:[50]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="none"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="none",onClick:e[5]||(e[5]=r=>l.setChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId,"none"))},{default:i(()=>e[51]||(e[51]=[c(" Aus ",-1)])),_:1,__:[51]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="soc"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="soc",onClick:e[6]||(e[6]=r=>l.setChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId,"soc"))},{default:i(()=>e[52]||(e[52]=[c(" EV-SoC ",-1)])),_:1,__:[52]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="amount"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="amount",onClick:e[7]||(e[7]=r=>l.setChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId,"amount"))},{default:i(()=>e[53]||(e[53]=[c(" Energie ",-1)])),_:1,__:[53]},8,["color","active"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="soc"?(d(),u(m,{key:0},{default:i(()=>[a(s,null,{default:i(()=>e[54]||(e[54]=[c("Max. SoC",-1)])),_:1,__:[54]}),a(_,{unit:"%",min:5,max:100,step:5,"model-value":t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).soc,"onUpdate:modelValue":e[8]||(e[8]=r=>l.setChargePointConnectedVehicleInstantChargingLimitSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="amount"?(d(),u(m,{key:1},{default:i(()=>[a(s,null,{default:i(()=>e[55]||(e[55]=[c("Max. Energie",-1)])),_:1,__:[55]}),a(_,{unit:"kWh",min:1,max:100,"model-value":t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).amount/1e3,"onUpdate:modelValue":e[9]||(e[9]=r=>l.setChargePointConnectedVehicleInstantChargingLimitAmount(t.modalChargePointId,1e3*r))},null,8,["model-value"])]),_:1})):P("",!0)]),_:1})]),_:1}),a(L,{name:"tab-pv-charging"},{default:i(()=>[a(y,null,{default:i(()=>[a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[56]||(e[56]=[c("Minimaler Dauerstrom",-1)])),_:1,__:[56]}),a(_,{unit:"A",labels:[{label:"Aus",value:0},{label:6,value:6},{label:7,value:7},{label:8,value:8},{label:9,value:9},{label:10,value:10},{label:11,value:11},{label:12,value:12},{label:13,value:13},{label:14,value:14},{label:15,value:15},{label:16,value:16}],"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingMinCurrent(t.modalChargePointId),"onUpdate:modelValue":e[10]||(e[10]=r=>l.setChargePointConnectedVehiclePvChargingMinCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[57]||(e[57]=[c("Anzahl Phasen",-1)])),_:1,__:[57]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==1,onClick:e[11]||(e[11]=r=>l.setChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId,1))},{default:i(()=>e[58]||(e[58]=[c(" 1 ",-1)])),_:1,__:[58]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==3,onClick:e[12]||(e[12]=r=>l.setChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId,3))},{default:i(()=>e[59]||(e[59]=[c(" Maximum ",-1)])),_:1,__:[59]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==0?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==0,onClick:e[13]||(e[13]=r=>l.setChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId,0))},{default:i(()=>e[60]||(e[60]=[c(" Automatik ",-1)])),_:1,__:[60]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[61]||(e[61]=[c("Begrenzung",-1)])),_:1,__:[61]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="none"?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="none",onClick:e[14]||(e[14]=r=>l.setChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId,"none"))},{default:i(()=>e[62]||(e[62]=[c(" Aus ",-1)])),_:1,__:[62]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="soc"?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="soc",onClick:e[15]||(e[15]=r=>l.setChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId,"soc"))},{default:i(()=>e[63]||(e[63]=[c(" EV-SoC ",-1)])),_:1,__:[63]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="amount"?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="amount",onClick:e[16]||(e[16]=r=>l.setChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId,"amount"))},{default:i(()=>e[64]||(e[64]=[c(" Energie ",-1)])),_:1,__:[64]},8,["color","active"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="soc"?(d(),u(m,{key:0},{default:i(()=>[a(s,null,{default:i(()=>e[65]||(e[65]=[c("SoC-Limit für das Fahrzeug",-1)])),_:1,__:[65]}),a(_,{unit:"%",min:5,max:100,step:5,"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).soc,"onUpdate:modelValue":e[17]||(e[17]=r=>l.setChargePointConnectedVehiclePvChargingLimitSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="amount"?(d(),u(m,{key:1},{default:i(()=>[a(s,null,{default:i(()=>e[66]||(e[66]=[c("Energie-Limit",-1)])),_:1,__:[66]}),a(_,{unit:"kWh",min:1,max:100,"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).amount/1e3,"onUpdate:modelValue":e[18]||(e[18]=r=>l.setChargePointConnectedVehiclePvChargingLimitAmount(t.modalChargePointId,1e3*r))},null,8,["model-value"])]),_:1})):P("",!0),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[67]||(e[67]=[c("Mindest-SoC für das Fahrzeug",-1)])),_:1,__:[67]}),a(_,{unit:"%",labels:[{label:"Aus",value:0},{label:5,value:5},{label:10,value:10},{label:15,value:15},{label:20,value:20},{label:25,value:25},{label:30,value:30},{label:35,value:35},{label:40,value:40},{label:45,value:45},{label:50,value:50},{label:55,value:55},{label:60,value:60},{label:65,value:65},{label:70,value:70},{label:75,value:75},{label:80,value:80},{label:85,value:85},{label:90,value:90},{label:95,value:95}],"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingMinSoc(t.modalChargePointId),"onUpdate:modelValue":e[19]||(e[19]=r=>l.setChargePointConnectedVehiclePvChargingMinSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[68]||(e[68]=[c("Mindest-SoC Strom",-1)])),_:1,__:[68]}),a(_,{min:6,max:32,unit:"A","model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocCurrent(t.modalChargePointId),"onUpdate:modelValue":e[20]||(e[20]=r=>l.setChargePointConnectedVehiclePvChargingMinSocCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[69]||(e[69]=[c("Anzahl Phasen Mindest-SoC",-1)])),_:1,__:[69]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==1,onClick:e[21]||(e[21]=r=>l.setChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId,1))},{default:i(()=>e[70]||(e[70]=[c(" 1 ",-1)])),_:1,__:[70]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==3,onClick:e[22]||(e[22]=r=>l.setChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId,3))},{default:i(()=>e[71]||(e[71]=[c(" Maximum ",-1)])),_:1,__:[71]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[72]||(e[72]=[c("Einspeisegrenze beachten",-1)])),_:1,__:[72]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId)!==!0?"danger":"",onClick:e[23]||(e[23]=r=>l.setChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId,!1))},{default:i(()=>e[73]||(e[73]=[c(" Nein ",-1)])),_:1,__:[73]},8,["color"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId)===!0?"success":"",onClick:e[24]||(e[24]=r=>l.setChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId,!0))},{default:i(()=>e[74]||(e[74]=[c(" Ja ",-1)])),_:1,__:[74]},8,["color"])]),_:1})]),_:1})]),_:1})]),_:1}),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(L,{key:0,name:"tab-eco-charging"},{default:i(()=>[a(y,null,{default:i(()=>[t.mqttStore.getEtConfigured?(d(),u(m,{key:0},{default:i(()=>[a(s,null,{default:i(()=>e[75]||(e[75]=[c("Minimaler Dauerstrom unter Preisgrenze",-1)])),_:1,__:[75]}),a(_,{unit:"A",min:6,max:32,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingCurrent(t.modalChargePointId),"onUpdate:modelValue":e[25]||(e[25]=r=>l.setChargePointConnectedVehicleEcoChargingCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[76]||(e[76]=[c("Anzahl Phasen",-1)])),_:1,__:[76]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==1,onClick:e[26]||(e[26]=r=>l.setChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId,1))},{default:i(()=>e[77]||(e[77]=[c(" 1 ",-1)])),_:1,__:[77]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==3,onClick:e[27]||(e[27]=r=>l.setChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId,3))},{default:i(()=>e[78]||(e[78]=[c(" Maximum ",-1)])),_:1,__:[78]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==0?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==0,onClick:e[28]||(e[28]=r=>l.setChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId,0))},{default:i(()=>e[79]||(e[79]=[c(" Automatik ",-1)])),_:1,__:[79]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[80]||(e[80]=[c("Begrenzung",-1)])),_:1,__:[80]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="none"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="none",onClick:e[29]||(e[29]=r=>l.setChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId,"none"))},{default:i(()=>e[81]||(e[81]=[c(" Aus ",-1)])),_:1,__:[81]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="soc"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="soc",onClick:e[30]||(e[30]=r=>l.setChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId,"soc"))},{default:i(()=>e[82]||(e[82]=[c(" EV-SoC ",-1)])),_:1,__:[82]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="amount"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="amount",onClick:e[31]||(e[31]=r=>l.setChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId,"amount"))},{default:i(()=>e[83]||(e[83]=[c(" Energie ",-1)])),_:1,__:[83]},8,["color","active"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="soc"?(d(),u(m,{key:1},{default:i(()=>[a(s,null,{default:i(()=>e[84]||(e[84]=[c("SoC-Limit für das Fahrzeug",-1)])),_:1,__:[84]}),a(_,{unit:"%",min:5,max:100,step:5,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).soc,"onUpdate:modelValue":e[32]||(e[32]=r=>l.setChargePointConnectedVehicleEcoChargingLimitSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="amount"?(d(),u(m,{key:2},{default:i(()=>[a(s,null,{default:i(()=>e[85]||(e[85]=[c("Energie-Limit",-1)])),_:1,__:[85]}),a(_,{unit:"kWh",min:1,max:100,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).amount/1e3,"onUpdate:modelValue":e[33]||(e[33]=r=>l.setChargePointConnectedVehicleEcoChargingLimitAmount(t.modalChargePointId,1e3*r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getEtConfigured?(d(),u(m,{key:3},{default:i(()=>[a(s,null,{default:i(()=>e[86]||(e[86]=[c("Preisgrenze für strompreisbasiertes Laden",-1)])),_:1,__:[86]}),a(_,{unit:"ct/kWh",min:-80,max:80,step:.01,precision:2,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId),"onUpdate:modelValue":e[34]||(e[34]=r=>l.setChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId,r))},null,8,["model-value"]),a(q,{"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId),"onUpdate:modelValue":e[35]||(e[35]=r=>l.setChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0)]),_:1})]),_:1})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(L,{key:1,name:"tab-scheduled-charging"},{default:i(()=>[t.mqttStore.getChargePointConnectedVehicleScheduledChargingPlans(t.modalChargePointId)&&t.mqttStore.getChargePointConnectedVehicleScheduledChargingPlans(t.modalChargePointId).length!==0?(d(),u(y,{key:1},{default:i(()=>[(d(!0),I(E,null,B(t.mqttStore.getChargePointConnectedVehicleScheduledChargingPlans(t.modalChargePointId),(r,z)=>(d(),u(m,{key:z},{default:i(()=>[a(U,null,{default:i(()=>[a($,null,{default:i(()=>[a(C,{size:"lg",block:"",color:r.active?"success":"danger",onClick:le=>l.setChargePointConnectedVehicleScheduledChargingPlanActive(t.modalChargePointId,z,!r.active)},{default:i(()=>[T("div",Je,p(r.name),1),T("div",He,[r.frequency.selected=="once"?(d(),I("div",Qe,[a(S,{icon:["fas","calendar-day"]}),c(" "+p(t.mqttStore.formatDate(r.frequency.once)),1)])):P("",!0),r.frequency.selected=="daily"?(d(),I("div",Xe,[a(S,{icon:["fas","calendar-week"]}),e[88]||(e[88]=c(" täglich ",-1))])):P("",!0),r.frequency.selected=="weekly"?(d(),I("div",Ye,[a(S,{icon:["fas","calendar-alt"]}),c(" "+p(t.mqttStore.formatWeeklyScheduleDays(r.frequency.weekly)),1)])):P("",!0),T("div",null,[a(S,{icon:["fas","clock"]}),c(" "+p(r.time),1)]),r.limit.selected=="soc"?(d(),I("div",Ge,[a(S,{icon:["fas","car-battery"]}),c(" "+p(r.limit.soc_scheduled)+" % ",1),a(S,{icon:["fas",r.bidi_charging_enabled?"right-left":"right-long"]},null,8,["icon"]),c(" "+p(r.limit.soc_limit)+" % ",1)])):P("",!0),r.limit.selected=="amount"?(d(),I("div",et,[a(S,{icon:["fas","bolt"]}),c(" "+p(r.limit.amount/1e3)+" kWh ",1)])):P("",!0),r.et_active?(d(),I("div",tt,[a(S,{icon:["fas","coins"]})])):P("",!0)])]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})):(d(),u(A,{key:0,color:"warning"},{icon:i(()=>[a(S,{"fixed-width":"",icon:["fas","fa-info-circle"]})]),default:i(()=>[e[87]||(e[87]=c(" Es wurden noch keine Zeitpläne für das Zielladen eingerichtet. ",-1))]),_:1,__:[87]}))]),_:1})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(L,{key:2,name:"tab-time-charging"},{default:i(()=>[a(y,null,{default:i(()=>[a(m,{class:"_margin-bottom:2"},{default:i(()=>[a(s,null,{default:i(()=>e[89]||(e[89]=[c("Zeitladen aktivieren",-1)])),_:1,__:[89]}),a(V,{block:""},{default:i(()=>[a(C,{color:l.timeChargingEnabled(t.modalChargePointId)?"":"danger",onClick:e[36]||(e[36]=r=>l.setChargePointConnectedVehicleTimeChargingActive(t.modalChargePointId,!1))},{default:i(()=>e[90]||(e[90]=[c(" Nein ",-1)])),_:1,__:[90]},8,["color"]),a(C,{color:l.timeChargingEnabled(t.modalChargePointId)?"success":"",onClick:e[37]||(e[37]=r=>l.setChargePointConnectedVehicleTimeChargingActive(t.modalChargePointId,!0))},{default:i(()=>e[91]||(e[91]=[c(" Ja ",-1)])),_:1,__:[91]},8,["color"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehicleTimeChargingPlans(t.modalChargePointId)&&t.mqttStore.getChargePointConnectedVehicleTimeChargingPlans(t.modalChargePointId).length!==0?(d(),I("div",at,[(d(!0),I(E,null,B(t.mqttStore.getChargePointConnectedVehicleTimeChargingPlans(t.modalChargePointId),(r,z)=>(d(),u(m,{key:z},{default:i(()=>[a(U,null,{default:i(()=>[a($,null,{default:i(()=>[a(C,{size:"lg",block:"",color:r.active?"success":"danger",onClick:le=>l.setChargePointConnectedVehicleTimeChargingPlanActive(t.modalChargePointId,z,!r.active)},{default:i(()=>[T("div",it,p(r.name),1),T("div",nt,[r.frequency.selected=="once"?(d(),I("div",ot,[a(S,{icon:["fas","calendar-day"]}),c(" "+p(t.mqttStore.formatDateRange(r.frequency.once)),1)])):P("",!0),r.frequency.selected=="daily"?(d(),I("div",lt,[a(S,{icon:["fas","calendar-week"]}),e[93]||(e[93]=c(" täglich ",-1))])):P("",!0),r.frequency.selected=="weekly"?(d(),I("div",rt,[a(S,{icon:["fas","calendar-alt"]}),c(" "+p(t.mqttStore.formatWeeklyScheduleDays(r.frequency.weekly)),1)])):P("",!0),T("div",null,[a(S,{icon:["fas","clock"]}),c(" "+p(r.time.join("-")),1)]),r.limit.selected=="soc"?(d(),I("div",ct,[a(S,{icon:["fas","car-battery"]}),c(" "+p(r.limit.soc)+" % ",1)])):P("",!0),r.limit.selected=="amount"?(d(),I("div",dt,[a(S,{icon:["fas","bolt"]}),c(" "+p(r.limit.amount/1e3)+" kWh ",1)])):P("",!0)])]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):(d(),u(A,{key:0,color:"warning"},{icon:i(()=>[a(S,{"fixed-width":"",icon:["fas","fa-circle-info"]})]),default:i(()=>[e[92]||(e[92]=c(" Es wurden noch keine Zeitpläne für das Zeitladen eingerichtet. ",-1))]),_:1,__:[92]}))]),_:1})]),_:1}))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),a(oe,{modelValue:t.modalManualSocInputVisible,"onUpdate:modelValue":e[40]||(e[40]=r=>t.modalManualSocInputVisible=r),"vehicle-id":t.modalVehicleId},null,8,["modelValue","vehicle-id"])],64)}],["__scopeId","data-v-0f2c2489"]]);export{ft as default}; diff --git a/packages/modules/display_themes/cards/web/assets/ChargePointsView-InJz5_Tj.js b/packages/modules/display_themes/cards/web/assets/ChargePointsView-InJz5_Tj.js deleted file mode 100644 index d1229dcf85..0000000000 --- a/packages/modules/display_themes/cards/web/assets/ChargePointsView-InJz5_Tj.js +++ /dev/null @@ -1 +0,0 @@ -var re=Object.defineProperty;var ce=(n,e,o)=>e in n?re(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o;var w=(n,e,o)=>ce(n,typeof e!="symbol"?e+"":e,o);import{u as x,C as de,N as he}from"./index-C0J-ZJ88.js";import{D}from"./DashboardCard-DS7AgUYm.js";import{C as W,S as ge}from"./ChargePointPlugBadge-Dsdv-7Vn.js";import{F as B,l as F,b as se,c as me,j as Ce,k as R,m as O,e as j,n as Z,o as K,p as J,q as H,r as Q,s as X,t as Y,u as G,v as ue,w as Pe,x as pe,y as fe,z as _e,A as Ve,B as Se}from"./vendor-fortawesome-C1Wk2aFl.js";import{_ as M}from"./vendor-inkline-S9CBmrTS.js";import{l as u,q as i,p as h,o as d,s as a,z as b,e as I,F as E,k as c,f as P,x as p,A as z,I as Ie,P as ve,Q as ke,S as be,U as qe,V as ye,W as Le,X as Me,Y as xe,Z as we,_ as Te,i as T,n as Ee}from"./vendor-Bzn5cd2Y.js";import{C as Ae}from"./ChargeModeModal-CNWdoEpw.js";F.add(se,me);const ee=M({name:"ChargePointLockButton",components:{FontAwesomeIcon:B},props:{chargePointId:{required:!0,type:Number},changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:x()}),computed:{locked(){return this.mqttStore.getChargePointManualLock(this.chargePointId)},stateIcon(){return this.locked?["fas","fa-lock"]:["fas","fa-lock-open"]},stateClass(){return this.locked?["_color:danger"]:"_color:success"}},methods:{toggleChargePointManualLock(){this.changesLocked||this.$root.sendTopicToBroker(`openWB/chargepoint/${this.chargePointId}/set/manual_lock`,!this.mqttStore.getValueBool(`openWB/chargepoint/${this.chargePointId}/set/manual_lock`))}}},[["render",function(n,e,o,g,t,l){const f=h("font-awesome-icon"),k=h("i-button");return d(),u(k,{size:"lg",disabled:o.changesLocked,outline:o.changesLocked},{default:i(()=>[a(f,{"fixed-width":"",icon:l.stateIcon,class:b(l.stateClass),onClick:e[0]||(e[0]=v=>l.toggleChargePointManualLock())},null,8,["icon","class"])]),_:1},8,["disabled","outline"])}]]);F.add(Ce);const te=M({name:"ChargePointCodeButton",components:{FontAwesomeIcon:B,CodeInputModal:de},props:{chargePointId:{type:Number,required:!0}},data:()=>({mqttStore:x(),modalIdTagEntryVisible:!1,modalIdTagEntryColor:"warning",code:""}),computed:{tagState(){return this.mqttStore.getChargepointTagState(this.chargePointId)},tagButtonColor(){switch(this.tagState){case 2:return"success";case 1:return"warning";default:return""}},tagClass(){switch(this.tagState){case 2:return"_color:success-80";case 1:return"_color:warning-80";default:return""}}},methods:{toggleIdTagModal(){this.modalIdTagEntryVisible=!this.modalIdTagEntryVisible},sendIdTag(n){this.$root.sendTopicToBroker(`openWB/chargepoint/${this.chargePointId}/get/rfid`,n),this.modalIdTagEntryVisible=!1}}},[["render",function(n,e,o,g,t,l){const f=h("FontAwesomeIcon"),k=h("i-button"),v=h("CodeInputModal");return d(),I(E,null,[a(k,{class:"_margin-right:1",size:"lg",color:l.tagButtonColor,disabled:l.tagState==2,onClick:e[0]||(e[0]=s=>l.toggleIdTagModal())},{default:i(()=>[a(f,{"fixed-width":"",icon:["fas","fa-calculator"],class:b(l.tagClass)},null,8,["class"])]),_:1},8,["color","disabled"]),a(v,{ref:"lockInput",modelValue:t.modalIdTagEntryVisible,"onUpdate:modelValue":e[1]||(e[1]=s=>t.modalIdTagEntryVisible=s),"min-length":4,"max-length":20,"onUpdate:inputValue":l.sendIdTag},{header:i(()=>e[2]||(e[2]=[c(" Bitte einen ID-Tag eingeben. ",-1)])),_:1},8,["modelValue","onUpdate:inputValue"])],64)}]]);F.add(R,O,j,Z,K,J,H,Q,X,Y,G);const ze={name:"ChargePointCard",components:{DashboardCard:D,SparkLine:ge,ChargePointPlugBadge:W,ChargePointLockButton:ee,ChargePointCodeButton:te,FontAwesomeIcon:B},props:{chargePointId:{type:Number,required:!0},changesLocked:{type:Boolean,required:!0}},emits:["vehicle-click","soc-click","charge-mode-click","toggle-charge-point-settings"],data:()=>({mqttStore:x()}),methods:{handleVehicleClick(n){this.$emit("vehicle-click",n)},handleSocClick(n){this.$emit("soc-click",n)},handleChargeModeClick(n){this.$emit("charge-mode-click",n)},toggleChargePointSettings(n){this.$emit("toggle-charge-point-settings",n)}}},Be={key:0},Fe=M(ze,[["render",function(n,e,o,g,t,l){const f=h("charge-point-plug-badge"),k=h("charge-point-code-button"),v=h("charge-point-lock-button"),s=h("i-column"),_=h("i-row"),m=h("spark-line"),C=h("font-awesome-icon"),V=h("i-badge"),y=h("i-button"),L=h("i-container"),q=h("dashboard-card");return d(),u(q,{color:"primary"},{headerLeft:i(()=>[c(p(t.mqttStore.getChargePointName(o.chargePointId)),1)]),headerRight:i(()=>[a(f,{"charge-point-id":[o.chargePointId]},null,8,["charge-point-id"])]),default:i(()=>[a(L,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0"},{default:i(()=>[t.mqttStore.getRfidEnabled?(d(),u(k,{key:0,"charge-point-id":o.chargePointId},null,8,["charge-point-id"])):P("",!0),a(v,{"charge-point-id":o.chargePointId,"changes-locked":o.changesLocked},null,8,["charge-point-id","changes-locked"])]),_:1}),a(s,{class:"_text-align:right _padding-left:0"},{default:i(()=>[c(p(t.mqttStore.getChargePointPower(o.chargePointId))+" "+p(t.mqttStore.getChargePointPhasesInUse(o.chargePointId))+" "+p(t.mqttStore.getChargePointSetCurrent(o.chargePointId)),1)]),_:1})]),_:1}),a(_,{class:"_padding-top:1"},{default:i(()=>[a(s,{class:"_padding-left:0"},{default:i(()=>[a(m,{color:"var(--color--primary)",data:t.mqttStore.getChargePointPowerChartData(o.chargePointId)},null,8,["data"])]),_:1})]),_:1})]),_:1}),a(s,{md:"6"},{default:i(()=>[a(_,{class:"_display:flex"},{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0 _flex-grow:1"},{default:i(()=>[a(V,{size:"lg",class:b(["_width:100%",o.changesLocked?"":"clickable"]),onClick:e[0]||(e[0]=S=>l.handleVehicleClick(o.chargePointId))},{default:i(()=>[a(C,{"fixed-width":"",icon:["fas","fa-car"]}),c(" "+p(t.mqttStore.getChargePointConnectedVehicleName(o.chargePointId)),1)]),_:1},8,["class"])]),_:1}),t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))||t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(s,{key:0,class:"_flex-grow:0 _padding-right:0 _padding-left:1"},{default:i(()=>[a(y,{size:"sm",disabled:o.changesLocked,class:b(o.changesLocked?"":"clickable"),onClick:e[1]||(e[1]=S=>l.handleSocClick(o.chargePointId))},{default:i(()=>[t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?(d(),I("span",Be,[a(C,{"fixed-width":"",icon:t.mqttStore.getVehicleSocIsManual(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?["fas","fa-edit"]:["fas","fa-car-battery"]},null,8,["icon"]),c(" "+p(t.mqttStore.getChargePointConnectedVehicleSoc(o.chargePointId).soc)+"% ",1)])):P("",!0),t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(C,{key:1,"fixed-width":"",icon:t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?["fas","times-circle"]:["fas","exclamation-triangle"]:[],class:b(t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?"_color:danger":"_color:warning":"")},null,8,["icon","class"])):P("",!0)]),_:1},8,["disabled","class"])]),_:1})):P("",!0)]),_:1}),a(_,{class:"_padding-top:1 _display:flex"},{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0 _flex-grow:1"},{default:i(()=>{var S;return[a(V,{size:"lg",class:b(["_width:100%",o.changesLocked?"":"clickable"]),color:(S=t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId))==null?void 0:S.class,onClick:e[2]||(e[2]=A=>l.handleChargeModeClick(o.chargePointId))},{default:i(()=>{var A;return[c(p((A=t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId))==null?void 0:A.label)+" ",1),a(C,{"fixed-width":"",icon:t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?["fas","fa-star"]:["far","fa-star"],class:b(t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?"_color:warning":"")},null,8,["icon","class"])]}),_:1},8,["class","color"])]}),_:1}),t.mqttStore.getChargePointConnectedVehicleTimeChargingActive(o.chargePointId)?(d(),u(s,{key:0,class:"_flex-grow:0 _padding-right:0 _padding-left:1"},{default:i(()=>[a(V,{size:"lg"},{default:i(()=>[t.mqttStore.getChargePointConnectedVehicleTimeChargingActive(o.chargePointId)?(d(),u(C,{key:0,"fixed-width":"",icon:t.mqttStore.getChargePointConnectedVehicleTimeChargingRunning(o.chargePointId)?["fas","fa-clock"]:["far","fa-clock"],class:b(t.mqttStore.getChargePointConnectedVehicleTimeChargingRunning(o.chargePointId)?"_color:success":"")},null,8,["icon","class"])):P("",!0)]),_:1})]),_:1})):P("",!0)]),_:1}),o.changesLocked?P("",!0):(d(),u(_,{key:0,class:"_padding-top:1"},{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0"},{default:i(()=>[a(y,{block:"",onClick:e[3]||(e[3]=S=>l.toggleChargePointSettings(o.chargePointId))},{default:i(()=>[a(C,{"fixed-width":"",icon:["fas","fa-wrench"]})]),_:1})]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-45dbe31a"]]);F.add(R,O,j,Z,K,J,H,Q,X,Y,G);const Ne={name:"ChargePointCard",components:{DashboardCard:D,ChargePointPlugBadge:W,ChargePointLockButton:ee,ChargePointCodeButton:te,FontAwesomeIcon:B},props:{chargePointId:{type:Number,required:!0},changesLocked:{type:Boolean,required:!0}},emits:["vehicle-click","soc-click","charge-mode-click","toggle-charge-point-settings","set-charge-point-connected-vehicle-charge-mode"],data:()=>({mqttStore:x(),simpleChargeModes:["instant_charging","pv_charging","stop"]}),computed:{filteredChargeModes(){return this.mqttStore.getSimpleChargePointView?this.mqttStore.chargeModeList().filter(n=>this.simpleChargeModes.includes(n.id)):this.mqttStore.chargeModeList()}},methods:{handleVehicleClick(n){this.$emit("vehicle-click",n)},handleSocClick(n){this.$emit("soc-click",n)},handleChargeModeClick(n){this.$emit("charge-mode-click",n)},toggleChargePointSettings(n){this.$emit("toggle-charge-point-settings",n)},setChargePointConnectedVehicleChargeMode(n,e){this.$emit("set-charge-point-connected-vehicle-charge-mode",n,e)}}},$e={key:0},Ue=M(Ne,[["render",function(n,e,o,g,t,l){const f=h("charge-point-plug-badge"),k=h("charge-point-code-button"),v=h("charge-point-lock-button"),s=h("i-column"),_=h("i-row"),m=h("font-awesome-icon"),C=h("i-button"),V=h("i-button-group"),y=h("i-container"),L=h("dashboard-card");return d(),u(L,{color:"primary"},{headerLeft:i(()=>[c(p(t.mqttStore.getChargePointName(o.chargePointId)),1)]),headerRight:i(()=>[a(f,{"charge-point-id":[o.chargePointId]},null,8,["charge-point-id"])]),default:i(()=>[a(y,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,null,{default:i(()=>[a(_,null,{default:i(()=>[a(s,{class:"_padding-left:0 _padding-right:0"},{default:i(()=>[t.mqttStore.getRfidEnabled?(d(),u(k,{key:0,"charge-point-id":o.chargePointId},null,8,["charge-point-id"])):P("",!0),a(v,{"charge-point-id":o.chargePointId,"changes-locked":o.changesLocked},null,8,["charge-point-id","changes-locked"])]),_:1}),a(s,{class:"_text-align:right _padding-left:0"},{default:i(()=>[c(p(t.mqttStore.getChargePointPower(o.chargePointId))+" "+p(t.mqttStore.getChargePointPhasesInUse(o.chargePointId))+" "+p(t.mqttStore.getChargePointSetCurrent(o.chargePointId)),1)]),_:1})]),_:1}),a(_,{class:"_padding-top:1"},{default:i(()=>[a(s,{class:"_padding-left:0 button-group-wrapper"},{default:i(()=>[a(V,{class:"button-group main-button-group"},{default:i(()=>[a(C,{class:b(["large-button _flex-grow:1",o.changesLocked?"":"clickable"]),disabled:o.changesLocked,onClick:e[0]||(e[0]=q=>l.handleVehicleClick(o.chargePointId))},{default:i(()=>[a(m,{"fixed-width":"",icon:["fas","fa-car"]}),c(" "+p(t.mqttStore.getChargePointConnectedVehicleName(o.chargePointId))+" ",1),a(m,{class:b(["_padding-left:1",t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?"_color:warning":""]),"fixed-width":"",icon:t.mqttStore.getChargePointConnectedVehiclePriority(o.chargePointId)?["fas","fa-star"]:["far","fa-star"]},null,8,["icon","class"])]),_:1},8,["class","disabled"]),t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))||t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(C,{key:0,class:b(["large-button _flex-grow:0",o.changesLocked?"":"clickable"]),disabled:o.changesLocked,onClick:e[1]||(e[1]=q=>l.handleSocClick(o.chargePointId))},{default:i(()=>[t.mqttStore.getVehicleSocConfigured(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?(d(),I("span",$e,[a(m,{"fixed-width":"",icon:t.mqttStore.getVehicleSocIsManual(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))?["fas","fa-edit"]:["fas","fa-car-battery"]},null,8,["icon"]),c(" "+p(t.mqttStore.getChargePointConnectedVehicleSoc(o.chargePointId).soc)+"% ",1)])):P("",!0),t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))!=0?(d(),u(m,{key:1,"fixed-width":"",icon:t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?["fas","times-circle"]:["fas","exclamation-triangle"]:[],class:b(t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>0?t.mqttStore.getVehicleFaultState(t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId))>1?"_color:danger":"_color:warning":"")},null,8,["icon","class"])):P("",!0)]),_:1},8,["disabled","class"])):P("",!0),a(C,{class:b(["large-button _flex-grow:0",o.changesLocked?"":"clickable"]),disabled:o.changesLocked,onClick:e[2]||(e[2]=q=>l.toggleChargePointSettings(o.chargePointId))},{default:i(()=>[a(m,{"fixed-width":"",icon:["fas","fa-wrench"]})]),_:1},8,["class","disabled"])]),_:1}),a(V,{class:"button-group _margin-top:1",disabled:o.changesLocked},{default:i(()=>[(d(!0),I(E,null,z(l.filteredChargeModes,q=>(d(),u(C,{key:q.id,outline:"",class:b(["large-button _flex-grow:1",o.changesLocked?"":"clickable"]),color:q.class!="dark"?q.class:"light",active:t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId)!=null&&q.id==t.mqttStore.getChargePointConnectedVehicleChargeMode(o.chargePointId).mode,onClick:S=>l.setChargePointConnectedVehicleChargeMode(o.chargePointId,q.id)},{default:i(()=>[c(p(q.label),1)]),_:2},1032,["class","color","active","onClick"]))),128))]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-cb556d40"]]),De={name:"ExtendedNumberInput",inheritAttrs:!1,props:{modelValue:{type:Number,required:!0,default:NaN},unit:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},labels:{type:Array,default:void 0}},emits:["update:modelValue"],data(){return{minimum:this.labels?0:this.min,maximum:this.labels?this.labels.length-1:this.max,stepSize:this.labels?1:this.step}},computed:{label(){var n;return this.labels&&this.inputValue!=null?this.inputValuel.label=v),plaintext:"",class:"_text-align:right",size:"lg"},{prepend:i(()=>[a(f,{onClick:l.decrement},{default:i(()=>e[1]||(e[1]=[c(" - ",-1)])),_:1,__:[1]},8,["onClick"])]),suffix:i(()=>[c(p(o.unit),1)]),append:i(()=>[a(f,{onClick:l.increment},{default:i(()=>e[2]||(e[2]=[c(" + ",-1)])),_:1,__:[2]},8,["onClick"])]),_:1},8,["modelValue"])}]]),We=M({name:"ManualSocInput",components:{ExtendedNumberInput:ae,NumberPad:he},props:{modelValue:{required:!0,type:Boolean,default:!1},vehicleId:{required:!0,type:Number,default:0}},emits:["update:modelValue"],data:()=>({mqttStore:x(),newSoc:0}),methods:{enter(n){let e=10*this.newSoc+parseInt(n);e>=0&&e<=100&&(this.newSoc=e)},removeDigit(){this.newSoc=Math.trunc(this.newSoc/10)},clear(){this.newSoc=0},close(){this.$emit("update:modelValue",!1),this.newSoc=0},updateManualSoc(){this.$root.sendTopicToBroker(`openWB/vehicle/${this.vehicleId}/soc_module/calculated_soc_state/manual_soc`,this.newSoc),this.close()}}},[["render",function(n,e,o,g,t,l){const f=h("extended-number-input"),k=h("i-column"),v=h("i-row"),s=h("NumberPad"),_=h("i-container"),m=h("i-button"),C=h("i-modal");return d(),u(Ie,{to:"body"},[a(C,{"model-value":o.modelValue,size:"sm","onUpdate:modelValue":e[6]||(e[6]=V=>n.$emit("update:modelValue",V))},{header:i(()=>[c(' SoC für Fahrzeug "'+p(t.mqttStore.getVehicleName(o.vehicleId))+'" ',1)]),footer:i(()=>[a(_,null,{default:i(()=>[a(v,null,{default:i(()=>[a(k,null,{default:i(()=>[a(m,{color:"danger",onClick:e[4]||(e[4]=V=>l.close())},{default:i(()=>e[7]||(e[7]=[c(" Zurück ",-1)])),_:1,__:[7]})]),_:1}),a(k,{class:"_text-align:right"},{default:i(()=>[a(m,{color:"success",onClick:e[5]||(e[5]=V=>l.updateManualSoc())},{default:i(()=>e[8]||(e[8]=[c(" OK ",-1)])),_:1,__:[8]})]),_:1})]),_:1})]),_:1})]),default:i(()=>[a(_,null,{default:i(()=>[a(v,{center:"",class:"_padding-bottom:1"},{default:i(()=>[a(k,null,{default:i(()=>[a(f,{modelValue:t.newSoc,"onUpdate:modelValue":e[0]||(e[0]=V=>t.newSoc=V),unit:"%",min:0,max:100,step:1,size:"lg",class:"_text-align:center"},null,8,["modelValue"])]),_:1})]),_:1}),a(s,{"onKey:digit":e[1]||(e[1]=V=>l.enter(V)),"onKey:clear":e[2]||(e[2]=V=>l.clear()),"onKey:delete":e[3]||(e[3]=V=>l.removeDigit())})]),_:1})]),_:1},8,["model-value"])])}]]),Re=M({name:"VehicleSelectModal",props:{modelValue:{required:!0,type:Boolean,default:!1},chargePointId:{type:Number,required:!0}},emits:["update:modelValue"],data:()=>({mqttStore:x()}),computed:{vehicleList(){let n=this.mqttStore.getVehicleList;var e=[];return Object.keys(n).forEach(o=>{let g=parseInt(o.match(/(?:\/)([0-9]+)(?=\/)*/g)[0].replace(/[^0-9]+/g,""));e.push({id:g,name:n[o]})}),e}},methods:{setChargePointConnectedVehicle(n){n.id!=this.mqttStore.getChargePointConnectedVehicleId(this.chargePointId)&&this.$root.sendTopicToBroker(`openWB/chargepoint/${this.chargePointId}/config/ev`,n.id)}}},[["render",function(n,e,o,g,t,l){const f=h("i-button"),k=h("i-button-group"),v=h("i-form-group"),s=h("i-form"),_=h("i-modal");return d(),u(_,{"model-value":o.modelValue,class:"modal-vehicle-select",size:"lg","onUpdate:modelValue":e[0]||(e[0]=m=>n.$emit("update:modelValue",m))},{header:i(()=>[c(' Fahrzeug an "'+p(t.mqttStore.getChargePointName(o.chargePointId))+'" auswählen ',1)]),default:i(()=>[a(s,null,{default:i(()=>[a(v,null,{default:i(()=>[a(k,{vertical:"",block:""},{default:i(()=>[(d(!0),I(E,null,z(l.vehicleList,m=>(d(),u(f,{key:m.id,size:"lg",class:"large-button",active:t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId)==m.id,color:t.mqttStore.getChargePointConnectedVehicleId(o.chargePointId)==m.id?"primary":"",onClick:C=>l.setChargePointConnectedVehicle(m)},{default:i(()=>[c(p(m.name),1)]),_:2},1032,["active","color","onClick"]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])}],["__scopeId","data-v-b89baba5"]]);ke.register(be,qe,ye,Le,Me,xe,we,Te);const Oe={class:"chartContainer"},je=M({name:"ElectricityTariffChart",components:{ChartJsLine:ve},props:{modelValue:{type:Number,required:!1,default:void 0}},emits:["update:modelValue"],data:()=>({mqttStore:x(),chartDatasets:{datasets:[{label:"Stromtarif",unit:"ct/kWh",type:"line",stepped:!0,borderColor:"rgb(18, 111, 142)",backgroundColor:"rgb(18, 111, 142)",fill:!1,pointStyle:"circle",pointRadius:0,pointHoverRadius:4,cubicInterpolationMode:"monotone",hidden:!1,borderWidth:2,data:void 0,yAxisID:"y",parsing:{xAxisKey:"timestamp",yAxisKey:"price"}}]}}),computed:{chartDataRead(){return Object.keys(this.chartDataObject.datasets[0].data).length>0},chartDataObject(){let n=[];const e=this.mqttStore.getEtPrices;if(e&&Object.keys(e).length>0){for(const[t,l]of Object.entries(e))n.push({timestamp:1e3*t,price:1e5*l});const g=n.slice(-1)[0];n.push({timestamp:g.timestamp+3599e3,price:g.price})}const o=this.chartDatasets;return o.datasets[0].data=n,o},priceAnnotations(){const n="rgba(73, 238, 73, 0.2)",e="rgba(255, 10, 13, 0.2)",o=this.chartDataObject.datasets[0].data;class g{constructor(){w(this,"type","box");w(this,"drawTime","beforeDatasetsDraw");w(this,"xMin",o[0].timestamp);w(this,"xMax",o[0].timestamp);w(this,"borderWidth",2);w(this,"cornerRadius",0)}}let t=[];if(this.modelValue!==void 0){for(let l=0;lthis.modelValue){let f=new g;for(f.borderColor=e,f.backgroundColor=e,f.xMin=o[l].timestamp;lthis.modelValue;)l++;l==o.length&&l--,f.xMax=o[l].timestamp,t.push(f)}}return t},myChartOptions(){return{plugins:{title:{display:!1},legend:{display:!1},annotation:{annotations:this.priceAnnotations}},elements:{point:{radius:2}},responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},scales:{x:{type:"time",time:{unit:"hour",text:"Zeit",maxTicksLimit:24},display:!0,title:{display:!0,text:"Uhrzeit",color:"#ffffff"},ticks:{font:{size:12},color:"#ffffff",maxTicksLimit:0},grid:{}},y:{position:"left",type:"linear",display:"auto",title:{font:{size:12},display:!0,text:"Preis [ct/kWh]",color:"#ffffff"},grid:{color:"#ffffff20"},ticks:{font:{size:12},stepSize:.1,maxTicksLimit:11,color:"#ffffff"}}}}}},methods:{chartClick(n){const e=this.$refs.priceChart.chart.getElementsAtEventForMode(n,"index",{intersect:!1},!0);e.length>0&&this.$emit("update:modelValue",Math.ceil(100*this.chartDataObject.datasets[0].data[e[0].index].price)/100)}}},[["render",function(n,e,o,g,t,l){const f=h("ChartJsLine");return d(),I("div",Oe,[l.chartDataRead?(d(),u(f,{key:0,ref:"priceChart",data:l.chartDataObject,options:l.myChartOptions,onClick:l.chartClick},null,8,["data","options","onClick"])):P("",!0)])}],["__scopeId","data-v-30ed2f35"]]);F.add(ue,Pe,pe,fe,_e,Ve,Se);const Ze={name:"ChargePointsView",components:{ChargePointCard:Fe,SimpleChargePointCard:Ue,ExtendedNumberInput:ae,ManualSocInput:We,ChargeModeModal:Ae,VehicleSelectModal:Re,FontAwesomeIcon:B,ElectricityTariffChart:je},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:x(),modalChargeModeSettingVisible:!1,modalVehicleSelectVisible:!1,modalChargePointSettingsVisible:!1,modalChargePointId:0,modalVehicleId:0,modalActiveTab:"tab-general",modalManualSocInputVisible:!1}),computed:{timeChargingEnabled(){return n=>this.mqttStore.getChargePointConnectedVehicleTimeChargingActive(n)===!0}},watch:{changesLocked(n,e){e!==!0&&n===!0&&(this.modalChargeModeSettingVisible=!1,this.modalVehicleSelectVisible=!1,this.modalChargePointSettingsVisible=!1,this.modalManualSocInputVisible=!1)}},methods:{toggleChargePointSettings(n){switch(this.mqttStore.getChargePointConnectedVehicleChargeMode(n).mode){case"pv_charging":this.modalActiveTab="tab-pv-charging";break;case"scheduled_charging":this.modalActiveTab="tab-scheduled-charging";break;case"eco_charging":this.modalActiveTab="tab-eco-charging";break;default:this.modalActiveTab="tab-instant-charging"}this.modalChargePointId=n,this.modalChargePointSettingsVisible=!0},handleChargeModeClick(n){this.changesLocked||(this.modalChargePointId=n,this.modalChargeModeSettingVisible=!0)},handleVehicleClick(n){this.changesLocked||(this.modalChargePointId=n,this.modalVehicleSelectVisible=!0)},handleSocClick(n){let e=this.mqttStore.getChargePointConnectedVehicleId(n);if(this.mqttStore.getVehicleSocIsManual(e))return this.modalVehicleId=e,void(this.modalManualSocInputVisible=!0);this.$root.sendTopicToBroker(`openWB/set/vehicle/${e}/get/force_soc_update`,1)},updateChargePointChargeTemplate(n,e,o=void 0){const g=this.mqttStore.updateState(`openWB/chargepoint/${n}/set/charge_template`,e,o);this.$root.sendTopicToBroker(`openWB/chargepoint/${n}/set/charge_template`,g)},setChargePointConnectedVehicleChargeMode(n,e){e.id!=this.mqttStore.getChargePointConnectedVehicleChargeMode(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.selected")},setChargePointConnectedVehiclePriority(n,e){e!=this.mqttStore.getChargePointConnectedVehiclePriority(n)&&this.updateChargePointChargeTemplate(n,e,"prio")},setChargePointConnectedVehicleTimeChargingActive(n,e){e!=this.mqttStore.getChargePointConnectedVehicleTimeChargingActive(n)&&this.updateChargePointChargeTemplate(n,e,"time_charging.active")},setChargePointConnectedVehicleInstantChargingCurrent(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingCurrent(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.current")},setChargePointConnectedVehicleInstantChargingPhases(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.phases_to_use")},setChargePointConnectedVehicleInstantChargingLimit(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(n).selected&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.limit.selected")},setChargePointConnectedVehicleInstantChargingLimitSoc(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(n).soc&&this.updateChargePointChargeTemplate(n,parseInt(e),"chargemode.instant_charging.limit.soc")},setChargePointConnectedVehicleInstantChargingLimitAmount(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(n).amount&&this.updateChargePointChargeTemplate(n,e,"chargemode.instant_charging.limit.amount")},setChargePointConnectedVehiclePvChargingFeedInLimit(n,e){e!=this.mqttStore.getChargePointConnectedVehiclePvChargingFeedInLimit(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.feed_in_limit")},setChargePointConnectedVehiclePvChargingMinCurrent(n,e){let o=this.mqttStore.getChargePointConnectedVehiclePvChargingMinCurrent(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.pv_charging.min_current")},setChargePointConnectedVehiclePvChargingPhases(n,e){e!==void 0&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.phases_to_use")},setChargePointConnectedVehiclePvChargingLimit(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingLimit(n).selected&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.limit.selected")},setChargePointConnectedVehiclePvChargingLimitSoc(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingLimit(n).soc&&this.updateChargePointChargeTemplate(n,parseInt(e),"chargemode.pv_charging.limit.soc")},setChargePointConnectedVehiclePvChargingLimitAmount(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingLimit(n).amount&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.limit.amount")},setChargePointConnectedVehiclePvChargingMinSoc(n,e){let o=this.mqttStore.getChargePointConnectedVehiclePvChargingMinSoc(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.pv_charging.min_soc")},setChargePointConnectedVehiclePvChargingMinSocCurrent(n,e){let o=this.mqttStore.getChargePointConnectedVehiclePvChargingMinSocCurrent(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.pv_charging.min_soc_current")},setChargePointConnectedVehiclePvChargingMinSocPhases(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.pv_charging.phases_to_use_min_soc")},setChargePointConnectedVehicleEcoChargingCurrent(n,e){let o=this.mqttStore.getChargePointConnectedVehicleEcoChargingCurrent(n),g=parseInt(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,g,"chargemode.eco_charging.current")},setChargePointConnectedVehicleEcoChargingPhases(n,e){e!==void 0&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(n)&&this.updateChargePointChargeTemplate(n,e,"chargemode.eco_charging.phases_to_use")},setChargePointConnectedVehicleEcoChargingLimit(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(n).selected&&this.updateChargePointChargeTemplate(n,e,"chargemode.eco_charging.limit.selected")},setChargePointConnectedVehicleEcoChargingLimitSoc(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(n).soc&&this.updateChargePointChargeTemplate(n,parseInt(e),"chargemode.eco_charging.limit.soc")},setChargePointConnectedVehicleEcoChargingLimitAmount(n,e){e&&e!=this.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(n).amount&&this.updateChargePointChargeTemplate(n,e,"chargemode.eco_charging.limit.amount")},setChargePointConnectedVehicleEcoChargingMaxPrice(n,e){let o=this.mqttStore.getChargePointConnectedVehicleEcoChargingMaxPrice(n),g=parseFloat(e);g==o||isNaN(g)||this.updateChargePointChargeTemplate(n,parseFloat((g/1e5).toFixed(7)),"chargemode.eco_charging.max_price")},setChargePointConnectedVehicleScheduledChargingPlanActive(n,e,o){const g=`openWB/chargepoint/${n}/set/charge_template`,t=this.mqttStore.updateState(g,o,`chargemode.scheduled_charging.plans.${e}.active`);this.$root.sendTopicToBroker(g,t)},setChargePointConnectedVehicleTimeChargingPlanActive(n,e,o){const g=`openWB/chargepoint/${n}/set/charge_template`,t=this.mqttStore.updateState(g,o,`time_charging.plans.${e}.active`);this.$root.sendTopicToBroker(g,t)}}},Ke={class:"charge-points-card-wrapper"},Je={class:"plan-name"},He={class:"plan-details"},Qe={key:0},Xe={key:1},Ye={key:2},Ge={key:3},et={key:4},tt={key:5},at={key:1},it={class:"plan-name"},nt={class:"plan-details"},ot={key:0},lt={key:1},rt={key:2},ct={key:3},dt={key:4},ft=M(Ze,[["render",function(n,e,o,g,t,l){const f=h("charge-mode-modal"),k=h("vehicle-select-modal"),v=h("i-tab-title"),s=h("i-form-label"),_=h("extended-number-input"),m=h("i-form-group"),C=h("i-button"),V=h("i-button-group"),y=h("i-form"),L=h("i-tab"),q=h("ElectricityTariffChart"),S=h("font-awesome-icon"),A=h("i-alert"),$=h("i-row"),U=h("i-container"),ie=h("i-tabs"),ne=h("i-modal"),oe=h("manual-soc-input");return d(),I(E,null,[T("div",Ke,[(d(!0),I(E,null,z(t.mqttStore.getChargePointIds,r=>(d(),u(Ee(t.mqttStore.getSimpleChargePointView?"SimpleChargePointCard":"ChargePointCard"),{key:r,"charge-point-id":r,"changes-locked":o.changesLocked,onVehicleClick:l.handleVehicleClick,onSocClick:l.handleSocClick,onChargeModeClick:l.handleChargeModeClick,onToggleChargePointSettings:l.toggleChargePointSettings,onSetChargePointConnectedVehicleChargeMode:l.setChargePointConnectedVehicleChargeMode},null,40,["charge-point-id","changes-locked","onVehicleClick","onSocClick","onChargeModeClick","onToggleChargePointSettings","onSetChargePointConnectedVehicleChargeMode"]))),128))]),a(f,{modelValue:t.modalChargeModeSettingVisible,"onUpdate:modelValue":e[0]||(e[0]=r=>t.modalChargeModeSettingVisible=r),"charge-point-id":t.modalChargePointId},null,8,["modelValue","charge-point-id"]),a(k,{modelValue:t.modalVehicleSelectVisible,"onUpdate:modelValue":e[1]||(e[1]=r=>t.modalVehicleSelectVisible=r),"charge-point-id":t.modalChargePointId},null,8,["modelValue","charge-point-id"]),a(ne,{modelValue:t.modalChargePointSettingsVisible,"onUpdate:modelValue":e[39]||(e[39]=r=>t.modalChargePointSettingsVisible=r),size:"lg"},{header:i(()=>[c(' Einstellungen für Fahrzeug "'+p(t.mqttStore.getChargePointConnectedVehicleName(t.modalChargePointId))+'" ',1)]),default:i(()=>[a(ie,{modelValue:t.modalActiveTab,"onUpdate:modelValue":e[38]||(e[38]=r=>t.modalActiveTab=r),stretch:""},{header:i(()=>[a(v,{for:"tab-instant-charging"},{default:i(()=>e[41]||(e[41]=[c(" Sofort ",-1)])),_:1,__:[41]}),a(v,{for:"tab-pv-charging"},{default:i(()=>e[42]||(e[42]=[c(" PV ",-1)])),_:1,__:[42]}),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(v,{key:0,for:"tab-eco-charging"},{default:i(()=>e[43]||(e[43]=[c(" Eco ",-1)])),_:1,__:[43]})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(v,{key:1,for:"tab-scheduled-charging"},{default:i(()=>e[44]||(e[44]=[c(" Ziel ",-1)])),_:1,__:[44]})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(v,{key:2,for:"tab-time-charging"},{default:i(()=>e[45]||(e[45]=[c(" Zeit ",-1)])),_:1,__:[45]}))]),default:i(()=>[a(L,{name:"tab-instant-charging"},{default:i(()=>[a(y,null,{default:i(()=>[a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[46]||(e[46]=[c("Stromstärke",-1)])),_:1,__:[46]}),a(_,{unit:"A",min:6,max:32,"model-value":t.mqttStore.getChargePointConnectedVehicleInstantChargingCurrent(t.modalChargePointId),"onUpdate:modelValue":e[2]||(e[2]=r=>l.setChargePointConnectedVehicleInstantChargingCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[47]||(e[47]=[c("Anzahl Phasen",-1)])),_:1,__:[47]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==1,onClick:e[3]||(e[3]=r=>l.setChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId,1))},{default:i(()=>e[48]||(e[48]=[c(" 1 ",-1)])),_:1,__:[48]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId)==3,onClick:e[4]||(e[4]=r=>l.setChargePointConnectedVehicleInstantChargingPhases(t.modalChargePointId,3))},{default:i(()=>e[49]||(e[49]=[c(" Maximum ",-1)])),_:1,__:[49]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[50]||(e[50]=[c("Begrenzung",-1)])),_:1,__:[50]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="none"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="none",onClick:e[5]||(e[5]=r=>l.setChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId,"none"))},{default:i(()=>e[51]||(e[51]=[c(" Aus ",-1)])),_:1,__:[51]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="soc"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="soc",onClick:e[6]||(e[6]=r=>l.setChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId,"soc"))},{default:i(()=>e[52]||(e[52]=[c(" EV-SoC ",-1)])),_:1,__:[52]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="amount"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="amount",onClick:e[7]||(e[7]=r=>l.setChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId,"amount"))},{default:i(()=>e[53]||(e[53]=[c(" Energie ",-1)])),_:1,__:[53]},8,["color","active"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="soc"?(d(),u(m,{key:0},{default:i(()=>[a(s,null,{default:i(()=>e[54]||(e[54]=[c("Max. SoC",-1)])),_:1,__:[54]}),a(_,{unit:"%",min:5,max:100,step:5,"model-value":t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).soc,"onUpdate:modelValue":e[8]||(e[8]=r=>l.setChargePointConnectedVehicleInstantChargingLimitSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).selected=="amount"?(d(),u(m,{key:1},{default:i(()=>[a(s,null,{default:i(()=>e[55]||(e[55]=[c("Max. Energie",-1)])),_:1,__:[55]}),a(_,{unit:"kWh",min:1,max:100,"model-value":t.mqttStore.getChargePointConnectedVehicleInstantChargingLimit(t.modalChargePointId).amount/1e3,"onUpdate:modelValue":e[9]||(e[9]=r=>l.setChargePointConnectedVehicleInstantChargingLimitAmount(t.modalChargePointId,1e3*r))},null,8,["model-value"])]),_:1})):P("",!0)]),_:1})]),_:1}),a(L,{name:"tab-pv-charging"},{default:i(()=>[a(y,null,{default:i(()=>[a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[56]||(e[56]=[c("Minimaler Dauerstrom",-1)])),_:1,__:[56]}),a(_,{unit:"A",labels:[{label:"Aus",value:0},{label:6,value:6},{label:7,value:7},{label:8,value:8},{label:9,value:9},{label:10,value:10},{label:11,value:11},{label:12,value:12},{label:13,value:13},{label:14,value:14},{label:15,value:15},{label:16,value:16}],"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingMinCurrent(t.modalChargePointId),"onUpdate:modelValue":e[10]||(e[10]=r=>l.setChargePointConnectedVehiclePvChargingMinCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[57]||(e[57]=[c("Anzahl Phasen",-1)])),_:1,__:[57]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==1,onClick:e[11]||(e[11]=r=>l.setChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId,1))},{default:i(()=>e[58]||(e[58]=[c(" 1 ",-1)])),_:1,__:[58]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==3,onClick:e[12]||(e[12]=r=>l.setChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId,3))},{default:i(()=>e[59]||(e[59]=[c(" Maximum ",-1)])),_:1,__:[59]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==0?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId)==0,onClick:e[13]||(e[13]=r=>l.setChargePointConnectedVehiclePvChargingPhases(t.modalChargePointId,0))},{default:i(()=>e[60]||(e[60]=[c(" Automatik ",-1)])),_:1,__:[60]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[61]||(e[61]=[c("Begrenzung",-1)])),_:1,__:[61]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="none"?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="none",onClick:e[14]||(e[14]=r=>l.setChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId,"none"))},{default:i(()=>e[62]||(e[62]=[c(" Aus ",-1)])),_:1,__:[62]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="soc"?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="soc",onClick:e[15]||(e[15]=r=>l.setChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId,"soc"))},{default:i(()=>e[63]||(e[63]=[c(" EV-SoC ",-1)])),_:1,__:[63]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="amount"?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="amount",onClick:e[16]||(e[16]=r=>l.setChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId,"amount"))},{default:i(()=>e[64]||(e[64]=[c(" Energie ",-1)])),_:1,__:[64]},8,["color","active"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="soc"?(d(),u(m,{key:0},{default:i(()=>[a(s,null,{default:i(()=>e[65]||(e[65]=[c("SoC-Limit für das Fahrzeug",-1)])),_:1,__:[65]}),a(_,{unit:"%",min:5,max:100,step:5,"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).soc,"onUpdate:modelValue":e[17]||(e[17]=r=>l.setChargePointConnectedVehiclePvChargingLimitSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).selected=="amount"?(d(),u(m,{key:1},{default:i(()=>[a(s,null,{default:i(()=>e[66]||(e[66]=[c("Energie-Limit",-1)])),_:1,__:[66]}),a(_,{unit:"kWh",min:1,max:100,"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingLimit(t.modalChargePointId).amount/1e3,"onUpdate:modelValue":e[18]||(e[18]=r=>l.setChargePointConnectedVehiclePvChargingLimitAmount(t.modalChargePointId,1e3*r))},null,8,["model-value"])]),_:1})):P("",!0),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[67]||(e[67]=[c("Mindest-SoC für das Fahrzeug",-1)])),_:1,__:[67]}),a(_,{unit:"%",labels:[{label:"Aus",value:0},{label:5,value:5},{label:10,value:10},{label:15,value:15},{label:20,value:20},{label:25,value:25},{label:30,value:30},{label:35,value:35},{label:40,value:40},{label:45,value:45},{label:50,value:50},{label:55,value:55},{label:60,value:60},{label:65,value:65},{label:70,value:70},{label:75,value:75},{label:80,value:80},{label:85,value:85},{label:90,value:90},{label:95,value:95}],"model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingMinSoc(t.modalChargePointId),"onUpdate:modelValue":e[19]||(e[19]=r=>l.setChargePointConnectedVehiclePvChargingMinSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[68]||(e[68]=[c("Mindest-SoC Strom",-1)])),_:1,__:[68]}),a(_,{min:6,max:32,unit:"A","model-value":t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocCurrent(t.modalChargePointId),"onUpdate:modelValue":e[20]||(e[20]=r=>l.setChargePointConnectedVehiclePvChargingMinSocCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[69]||(e[69]=[c("Anzahl Phasen Mindest-SoC",-1)])),_:1,__:[69]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==1,onClick:e[21]||(e[21]=r=>l.setChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId,1))},{default:i(()=>e[70]||(e[70]=[c(" 1 ",-1)])),_:1,__:[70]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId)==3,onClick:e[22]||(e[22]=r=>l.setChargePointConnectedVehiclePvChargingMinSocPhases(t.modalChargePointId,3))},{default:i(()=>e[71]||(e[71]=[c(" Maximum ",-1)])),_:1,__:[71]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[72]||(e[72]=[c("Einspeisegrenze beachten",-1)])),_:1,__:[72]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId)!==!0?"danger":"",onClick:e[23]||(e[23]=r=>l.setChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId,!1))},{default:i(()=>e[73]||(e[73]=[c(" Nein ",-1)])),_:1,__:[73]},8,["color"]),a(C,{color:t.mqttStore.getChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId)===!0?"success":"",onClick:e[24]||(e[24]=r=>l.setChargePointConnectedVehiclePvChargingFeedInLimit(t.modalChargePointId,!0))},{default:i(()=>e[74]||(e[74]=[c(" Ja ",-1)])),_:1,__:[74]},8,["color"])]),_:1})]),_:1})]),_:1})]),_:1}),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(L,{key:0,name:"tab-eco-charging"},{default:i(()=>[a(y,null,{default:i(()=>[t.mqttStore.getEtConfigured?(d(),u(m,{key:0},{default:i(()=>[a(s,null,{default:i(()=>e[75]||(e[75]=[c("Minimaler Dauerstrom unter Preisgrenze",-1)])),_:1,__:[75]}),a(_,{unit:"A",min:6,max:32,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingCurrent(t.modalChargePointId),"onUpdate:modelValue":e[25]||(e[25]=r=>l.setChargePointConnectedVehicleEcoChargingCurrent(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[76]||(e[76]=[c("Anzahl Phasen",-1)])),_:1,__:[76]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==1?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==1,onClick:e[26]||(e[26]=r=>l.setChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId,1))},{default:i(()=>e[77]||(e[77]=[c(" 1 ",-1)])),_:1,__:[77]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==3?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==3,onClick:e[27]||(e[27]=r=>l.setChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId,3))},{default:i(()=>e[78]||(e[78]=[c(" Maximum ",-1)])),_:1,__:[78]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==0?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId)==0,onClick:e[28]||(e[28]=r=>l.setChargePointConnectedVehicleEcoChargingPhases(t.modalChargePointId,0))},{default:i(()=>e[79]||(e[79]=[c(" Automatik ",-1)])),_:1,__:[79]},8,["color","active"])]),_:1})]),_:1}),a(m,null,{default:i(()=>[a(s,null,{default:i(()=>e[80]||(e[80]=[c("Begrenzung",-1)])),_:1,__:[80]}),a(V,{block:""},{default:i(()=>[a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="none"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="none",onClick:e[29]||(e[29]=r=>l.setChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId,"none"))},{default:i(()=>e[81]||(e[81]=[c(" Aus ",-1)])),_:1,__:[81]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="soc"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="soc",onClick:e[30]||(e[30]=r=>l.setChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId,"soc"))},{default:i(()=>e[82]||(e[82]=[c(" EV-SoC ",-1)])),_:1,__:[82]},8,["color","active"]),a(C,{color:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="amount"?"primary":"",active:t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="amount",onClick:e[31]||(e[31]=r=>l.setChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId,"amount"))},{default:i(()=>e[83]||(e[83]=[c(" Energie ",-1)])),_:1,__:[83]},8,["color","active"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="soc"?(d(),u(m,{key:1},{default:i(()=>[a(s,null,{default:i(()=>e[84]||(e[84]=[c("SoC-Limit für das Fahrzeug",-1)])),_:1,__:[84]}),a(_,{unit:"%",min:5,max:100,step:5,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).soc,"onUpdate:modelValue":e[32]||(e[32]=r=>l.setChargePointConnectedVehicleEcoChargingLimitSoc(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).selected=="amount"?(d(),u(m,{key:2},{default:i(()=>[a(s,null,{default:i(()=>e[85]||(e[85]=[c("Energie-Limit",-1)])),_:1,__:[85]}),a(_,{unit:"kWh",min:1,max:100,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingLimit(t.modalChargePointId).amount/1e3,"onUpdate:modelValue":e[33]||(e[33]=r=>l.setChargePointConnectedVehicleEcoChargingLimitAmount(t.modalChargePointId,1e3*r))},null,8,["model-value"])]),_:1})):P("",!0),t.mqttStore.getEtConfigured?(d(),u(m,{key:3},{default:i(()=>[a(s,null,{default:i(()=>e[86]||(e[86]=[c("Preisgrenze für strompreisbasiertes Laden",-1)])),_:1,__:[86]}),a(_,{unit:"ct/kWh",min:-80,max:80,step:.01,precision:2,"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId),"onUpdate:modelValue":e[34]||(e[34]=r=>l.setChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId,r))},null,8,["model-value"]),a(q,{"model-value":t.mqttStore.getChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId),"onUpdate:modelValue":e[35]||(e[35]=r=>l.setChargePointConnectedVehicleEcoChargingMaxPrice(t.modalChargePointId,r))},null,8,["model-value"])]),_:1})):P("",!0)]),_:1})]),_:1})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(L,{key:1,name:"tab-scheduled-charging"},{default:i(()=>[t.mqttStore.getChargePointConnectedVehicleScheduledChargingPlans(t.modalChargePointId)&&t.mqttStore.getChargePointConnectedVehicleScheduledChargingPlans(t.modalChargePointId).length!==0?(d(),u(y,{key:1},{default:i(()=>[(d(!0),I(E,null,z(t.mqttStore.getChargePointConnectedVehicleScheduledChargingPlans(t.modalChargePointId),(r,N)=>(d(),u(m,{key:N},{default:i(()=>[a(U,null,{default:i(()=>[a($,null,{default:i(()=>[a(C,{size:"lg",block:"",color:r.active?"success":"danger",onClick:le=>l.setChargePointConnectedVehicleScheduledChargingPlanActive(t.modalChargePointId,r.id,!r.active)},{default:i(()=>[T("div",Je,p(r.name),1),T("div",He,[r.frequency.selected=="once"?(d(),I("div",Qe,[a(S,{icon:["fas","calendar-day"]}),c(" "+p(t.mqttStore.formatDate(r.frequency.once)),1)])):P("",!0),r.frequency.selected=="daily"?(d(),I("div",Xe,[a(S,{icon:["fas","calendar-week"]}),e[88]||(e[88]=c(" täglich ",-1))])):P("",!0),r.frequency.selected=="weekly"?(d(),I("div",Ye,[a(S,{icon:["fas","calendar-alt"]}),c(" "+p(t.mqttStore.formatWeeklyScheduleDays(r.frequency.weekly)),1)])):P("",!0),T("div",null,[a(S,{icon:["fas","clock"]}),c(" "+p(r.time),1)]),r.limit.selected=="soc"?(d(),I("div",Ge,[a(S,{icon:["fas","car-battery"]}),c(" "+p(r.limit.soc_scheduled)+" % ",1),a(S,{icon:["fas",r.bidi_charging_enabled?"right-left":"right-long"]},null,8,["icon"]),c(" "+p(r.limit.soc_limit)+" % ",1)])):P("",!0),r.limit.selected=="amount"?(d(),I("div",et,[a(S,{icon:["fas","bolt"]}),c(" "+p(r.limit.amount/1e3)+" kWh ",1)])):P("",!0),r.et_active?(d(),I("div",tt,[a(S,{icon:["fas","coins"]})])):P("",!0)])]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))]),_:1})):(d(),u(A,{key:0,color:"warning"},{icon:i(()=>[a(S,{"fixed-width":"",icon:["fas","fa-info-circle"]})]),default:i(()=>[e[87]||(e[87]=c(" Es wurden noch keine Zeitpläne für das Zielladen eingerichtet. ",-1))]),_:1,__:[87]}))]),_:1})),t.mqttStore.getSimpleChargePointView?P("",!0):(d(),u(L,{key:2,name:"tab-time-charging"},{default:i(()=>[a(y,null,{default:i(()=>[a(m,{class:"_margin-bottom:2"},{default:i(()=>[a(s,null,{default:i(()=>e[89]||(e[89]=[c("Zeitladen aktivieren",-1)])),_:1,__:[89]}),a(V,{block:""},{default:i(()=>[a(C,{color:l.timeChargingEnabled(t.modalChargePointId)?"":"danger",onClick:e[36]||(e[36]=r=>l.setChargePointConnectedVehicleTimeChargingActive(t.modalChargePointId,!1))},{default:i(()=>e[90]||(e[90]=[c(" Nein ",-1)])),_:1,__:[90]},8,["color"]),a(C,{color:l.timeChargingEnabled(t.modalChargePointId)?"success":"",onClick:e[37]||(e[37]=r=>l.setChargePointConnectedVehicleTimeChargingActive(t.modalChargePointId,!0))},{default:i(()=>e[91]||(e[91]=[c(" Ja ",-1)])),_:1,__:[91]},8,["color"])]),_:1})]),_:1}),t.mqttStore.getChargePointConnectedVehicleTimeChargingPlans(t.modalChargePointId)&&t.mqttStore.getChargePointConnectedVehicleTimeChargingPlans(t.modalChargePointId).length!==0?(d(),I("div",at,[(d(!0),I(E,null,z(t.mqttStore.getChargePointConnectedVehicleTimeChargingPlans(t.modalChargePointId),(r,N)=>(d(),u(m,{key:N},{default:i(()=>[a(U,null,{default:i(()=>[a($,null,{default:i(()=>[a(C,{size:"lg",block:"",color:r.active?"success":"danger",onClick:le=>l.setChargePointConnectedVehicleTimeChargingPlanActive(t.modalChargePointId,r.id,!r.active)},{default:i(()=>[T("div",it,p(r.name),1),T("div",nt,[r.frequency.selected=="once"?(d(),I("div",ot,[a(S,{icon:["fas","calendar-day"]}),c(" "+p(t.mqttStore.formatDateRange(r.frequency.once)),1)])):P("",!0),r.frequency.selected=="daily"?(d(),I("div",lt,[a(S,{icon:["fas","calendar-week"]}),e[93]||(e[93]=c(" täglich ",-1))])):P("",!0),r.frequency.selected=="weekly"?(d(),I("div",rt,[a(S,{icon:["fas","calendar-alt"]}),c(" "+p(t.mqttStore.formatWeeklyScheduleDays(r.frequency.weekly)),1)])):P("",!0),T("div",null,[a(S,{icon:["fas","clock"]}),c(" "+p(r.time.join("-")),1)]),r.limit.selected=="soc"?(d(),I("div",ct,[a(S,{icon:["fas","car-battery"]}),c(" "+p(r.limit.soc)+" % ",1)])):P("",!0),r.limit.selected=="amount"?(d(),I("div",dt,[a(S,{icon:["fas","bolt"]}),c(" "+p(r.limit.amount/1e3)+" kWh ",1)])):P("",!0)])]),_:2},1032,["color","onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):(d(),u(A,{key:0,color:"warning"},{icon:i(()=>[a(S,{"fixed-width":"",icon:["fas","fa-circle-info"]})]),default:i(()=>[e[92]||(e[92]=c(" Es wurden noch keine Zeitpläne für das Zeitladen eingerichtet. ",-1))]),_:1,__:[92]}))]),_:1})]),_:1}))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"]),a(oe,{modelValue:t.modalManualSocInputVisible,"onUpdate:modelValue":e[40]||(e[40]=r=>t.modalManualSocInputVisible=r),"vehicle-id":t.modalVehicleId},null,8,["modelValue","vehicle-id"])],64)}],["__scopeId","data-v-2850e23a"]]);export{ft as default}; diff --git a/packages/modules/display_themes/cards/web/assets/DashboardView-Ch-ScCyj.js b/packages/modules/display_themes/cards/web/assets/DashboardView-D6rYO19_.js similarity index 97% rename from packages/modules/display_themes/cards/web/assets/DashboardView-Ch-ScCyj.js rename to packages/modules/display_themes/cards/web/assets/DashboardView-D6rYO19_.js index a666175597..66855fa0d0 100644 --- a/packages/modules/display_themes/cards/web/assets/DashboardView-Ch-ScCyj.js +++ b/packages/modules/display_themes/cards/web/assets/DashboardView-D6rYO19_.js @@ -1 +1 @@ -import{u as l}from"./index-C0J-ZJ88.js";import{D as q}from"./DashboardCard-DS7AgUYm.js";import{S as P,C as v}from"./ChargePointPlugBadge-Dsdv-7Vn.js";import{F as w,l as y,d as I,e as D,g as L,h as B,i as _}from"./vendor-fortawesome-C1Wk2aFl.js";import{_ as p}from"./vendor-inkline-S9CBmrTS.js";import{l as c,q as a,p as e,o as s,s as i,k as g,x as h,f as m,e as x}from"./vendor-Bzn5cd2Y.js";y.add(I);const E=p({name:"GridCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return s(),c(n,{color:"danger"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-gauge-high"]}),r[0]||(r[0]=g(" EVU ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getGridPower()),1)]),default:a(()=>[i(d,{color:"var(--color--danger)","color-negative":"var(--color--success)",data:t.mqttStore.getGridPowerChartData},null,8,["data"])]),_:1})}]]);y.add(D);const F=p({name:"BatteryCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return t.mqttStore.getBatteryConfigured?(s(),c(n,{key:0,color:"warning"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-car-battery"]}),r[0]||(r[0]=g(" Speicher ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getBatterySoc())+" / "+h(t.mqttStore.getBatteryPower()),1)]),default:a(()=>[i(d,{color:"var(--color--warning)",data:t.mqttStore.getBatteryPowerChartData,"soc-data":t.mqttStore.getBatterySocChartData},null,8,["data","soc-data"])]),_:1})):m("",!0)}]]);y.add(L);const H=p({name:"InverterCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return t.mqttStore.getPvConfigured?(s(),c(n,{key:0,color:"success"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-solar-panel"]}),r[0]||(r[0]=g(" PV ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getPvPower()),1)]),default:a(()=>[i(d,{color:"var(--color--success)",data:t.mqttStore.getPvPowerChartData,inverted:!0},null,8,["data"])]),_:1})):m("",!0)}]]);y.add(B);const A=p({name:"HomeCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return s(),c(n,{color:"light"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-home"]}),r[0]||(r[0]=g(" Hausverbrauch ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getHomePower()),1)]),default:a(()=>[i(d,{color:"var(--color--light)",data:t.mqttStore.getHomePowerChartData},null,8,["data"])]),_:1})}]]);y.add(_);const G={name:"DashboardView",components:{GridCard:E,HomeCard:A,BatteryCard:F,InverterCard:H,ChargePointsCard:p({name:"ChargePointsCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w,ChargePointPlugBadge:v},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("charge-point-plug-badge"),n=e("spark-line"),b=e("dashboard-card");return t.mqttStore.getChargePointIds.length>0?(s(),c(b,{key:0,color:"primary"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-charging-station"]}),g(" "+h(t.mqttStore.getChargePointIds.length==1?t.mqttStore.getChargePointName(t.mqttStore.getChargePointIds[0]):"Ladepunkte"),1)]),headerRight:a(()=>[g(h(t.mqttStore.getChargePointIds.length==1?t.mqttStore.getChargePointPower(t.mqttStore.getChargePointIds[0]):t.mqttStore.getChargePointSumPower())+" ",1),i(d,{"charge-point-id":t.mqttStore.getChargePointIds,"show-energy-charged":!1},null,8,["charge-point-id"])]),default:a(()=>[i(n,{color:"var(--color--primary)",data:t.mqttStore.getChargePointIds.length==1?t.mqttStore.getChargePointPowerChartData(t.mqttStore.getChargePointIds[0]):t.mqttStore.getChargePointSumPowerChartData},null,8,["data"])]),_:1})):m("",!0)}]])},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:l()})},R={class:"dashboard-card-wrapper"},K=p(G,[["render",function(f,r,C,S,t,u){const o=e("grid-card"),d=e("home-card"),n=e("battery-card"),b=e("inverter-card"),k=e("charge-points-card");return s(),x("div",R,[t.mqttStore.getGridCardEnabled?(s(),c(o,{key:0})):m("",!0),t.mqttStore.getHomeCardEnabled?(s(),c(d,{key:1})):m("",!0),t.mqttStore.getBatteryCardEnabled?(s(),c(n,{key:2})):m("",!0),t.mqttStore.getPvCardEnabled?(s(),c(b,{key:3})):m("",!0),t.mqttStore.getChargePointsCardEnabled?(s(),c(k,{key:4})):m("",!0)])}],["__scopeId","data-v-853975a6"]]);export{K as default}; +import{u as l}from"./index-Rkba6Ib0.js";import{D as q}from"./DashboardCard-DS7AgUYm.js";import{S as P,C as v}from"./ChargePointPlugBadge-Cea5-sTy.js";import{F as w,l as y,d as I,e as D,g as L,h as B,i as _}from"./vendor-fortawesome-C1Wk2aFl.js";import{_ as p}from"./vendor-inkline-S9CBmrTS.js";import{l as c,q as a,p as e,o as s,s as i,k as g,x as h,f as m,e as x}from"./vendor-Bzn5cd2Y.js";y.add(I);const E=p({name:"GridCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return s(),c(n,{color:"danger"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-gauge-high"]}),r[0]||(r[0]=g(" EVU ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getGridPower()),1)]),default:a(()=>[i(d,{color:"var(--color--danger)","color-negative":"var(--color--success)",data:t.mqttStore.getGridPowerChartData},null,8,["data"])]),_:1})}]]);y.add(D);const F=p({name:"BatteryCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return t.mqttStore.getBatteryConfigured?(s(),c(n,{key:0,color:"warning"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-car-battery"]}),r[0]||(r[0]=g(" Speicher ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getBatterySoc())+" / "+h(t.mqttStore.getBatteryPower()),1)]),default:a(()=>[i(d,{color:"var(--color--warning)",data:t.mqttStore.getBatteryPowerChartData,"soc-data":t.mqttStore.getBatterySocChartData},null,8,["data","soc-data"])]),_:1})):m("",!0)}]]);y.add(L);const H=p({name:"InverterCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return t.mqttStore.getPvConfigured?(s(),c(n,{key:0,color:"success"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-solar-panel"]}),r[0]||(r[0]=g(" PV ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getPvPower()),1)]),default:a(()=>[i(d,{color:"var(--color--success)",data:t.mqttStore.getPvPowerChartData,inverted:!0},null,8,["data"])]),_:1})):m("",!0)}]]);y.add(B);const A=p({name:"HomeCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("spark-line"),n=e("dashboard-card");return s(),c(n,{color:"light"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-home"]}),r[0]||(r[0]=g(" Hausverbrauch ",-1))]),headerRight:a(()=>[g(h(t.mqttStore.getHomePower()),1)]),default:a(()=>[i(d,{color:"var(--color--light)",data:t.mqttStore.getHomePowerChartData},null,8,["data"])]),_:1})}]]);y.add(_);const G={name:"DashboardView",components:{GridCard:E,HomeCard:A,BatteryCard:F,InverterCard:H,ChargePointsCard:p({name:"ChargePointsCard",components:{DashboardCard:q,SparkLine:P,FontAwesomeIcon:w,ChargePointPlugBadge:v},props:{},data:()=>({mqttStore:l()})},[["render",function(f,r,C,S,t,u){const o=e("font-awesome-icon"),d=e("charge-point-plug-badge"),n=e("spark-line"),b=e("dashboard-card");return t.mqttStore.getChargePointIds.length>0?(s(),c(b,{key:0,color:"primary"},{headerLeft:a(()=>[i(o,{"fixed-width":"",icon:["fas","fa-charging-station"]}),g(" "+h(t.mqttStore.getChargePointIds.length==1?t.mqttStore.getChargePointName(t.mqttStore.getChargePointIds[0]):"Ladepunkte"),1)]),headerRight:a(()=>[g(h(t.mqttStore.getChargePointIds.length==1?t.mqttStore.getChargePointPower(t.mqttStore.getChargePointIds[0]):t.mqttStore.getChargePointSumPower())+" ",1),i(d,{"charge-point-id":t.mqttStore.getChargePointIds,"show-energy-charged":!1},null,8,["charge-point-id"])]),default:a(()=>[i(n,{color:"var(--color--primary)",data:t.mqttStore.getChargePointIds.length==1?t.mqttStore.getChargePointPowerChartData(t.mqttStore.getChargePointIds[0]):t.mqttStore.getChargePointSumPowerChartData},null,8,["data"])]),_:1})):m("",!0)}]])},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:l()})},R={class:"dashboard-card-wrapper"},K=p(G,[["render",function(f,r,C,S,t,u){const o=e("grid-card"),d=e("home-card"),n=e("battery-card"),b=e("inverter-card"),k=e("charge-points-card");return s(),x("div",R,[t.mqttStore.getGridCardEnabled?(s(),c(o,{key:0})):m("",!0),t.mqttStore.getHomeCardEnabled?(s(),c(d,{key:1})):m("",!0),t.mqttStore.getBatteryCardEnabled?(s(),c(n,{key:2})):m("",!0),t.mqttStore.getPvCardEnabled?(s(),c(b,{key:3})):m("",!0),t.mqttStore.getChargePointsCardEnabled?(s(),c(k,{key:4})):m("",!0)])}],["__scopeId","data-v-853975a6"]]);export{K as default}; diff --git a/packages/modules/display_themes/cards/web/assets/EnergyFlowView-C1Dw5jS1.js b/packages/modules/display_themes/cards/web/assets/EnergyFlowView-CtSxCBuI.js similarity index 98% rename from packages/modules/display_themes/cards/web/assets/EnergyFlowView-C1Dw5jS1.js rename to packages/modules/display_themes/cards/web/assets/EnergyFlowView-CtSxCBuI.js index 69dad6c8de..652d590cc7 100644 --- a/packages/modules/display_themes/cards/web/assets/EnergyFlowView-C1Dw5jS1.js +++ b/packages/modules/display_themes/cards/web/assets/EnergyFlowView-CtSxCBuI.js @@ -1 +1 @@ -import{u as y}from"./index-C0J-ZJ88.js";import{D as f}from"./DashboardCard-DS7AgUYm.js";import{C as q}from"./ChargeModeModal-CNWdoEpw.js";import{e as h,s as u,p as l,q as m,F as v,o as r,i as s,A as C,z as d,f as P,k as b,x as w,O as M,l as _}from"./vendor-Bzn5cd2Y.js";import{_ as p}from"./vendor-inkline-S9CBmrTS.js";import"./vendor-fortawesome-C1Wk2aFl.js";const S={name:"DashboardFlowCard",components:{DashboardCard:f,ChargeModeModal:q},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:y(),svgSize:{xMin:0,xMax:150,yMin:0,yMax:105,circleRadius:10,strokeWidth:.5,textSize:5,numRows:4,numColumns:3},modalChargeModeSettingsVisible:!1,modalChargePointId:0}),computed:{svgViewBox(){return`${this.svgSize.xMin} ${this.svgSize.yMin} ${this.svgSize.xMax} ${this.svgSize.yMax}`},svgFontSize(){return`${this.svgSize.textSize}px`},svgRectWidth(){return(this.svgSize.xMax-this.svgSize.xMin-this.svgSize.strokeWidth-this.svgSize.numColumns)/this.svgSize.numColumns},svgStrokeWidth(){return this.svgSize.strokeWidth},svgIconWidth(){return this.svgSize.circleRadius},svgIconHeight(){return this.svgSize.circleRadius},gridPower(){return this.mqttStore.getGridPower("object")},pvPower(){return this.mqttStore.getPvPower("object")},homePower(){return this.mqttStore.getHomePower("object")},batteryPower(){return this.mqttStore.getBatteryPower("object")},batterySoc(){return this.mqttStore.getBatterySoc("object").value/100},connectedChargePoints(){return this.mqttStore.getChargePointIds},chargePointSumPower(){return this.mqttStore.getChargePointSumPower("object")},chargePoint1Power(){return this.connectedChargePoints.length>0?this.mqttStore.getChargePointPower(this.connectedChargePoints[0],"object")||{textValue:"Loading..."}:{textValue:"N/A"}},chargePoint2Power(){return this.connectedChargePoints.length>1?this.mqttStore.getChargePointPower(this.connectedChargePoints[1],"object")||{textValue:"Loading..."}:{textValue:"N/A"}},chargePoint3Power(){return this.connectedChargePoints.length>2?this.mqttStore.getChargePointPower(this.connectedChargePoints[2],"object")||{textValue:"Loading..."}:{textValue:"N/A"}},chargePoint1Name(){return this.mqttStore.getChargePointName(this.connectedChargePoints[0])},chargePoint2Name(){return this.mqttStore.getChargePointName(this.connectedChargePoints[1])},chargePoint3Name(){return this.mqttStore.getChargePointName(this.connectedChargePoints[2])},chargePoint1VehicleConnected(){return this.mqttStore.getChargePointPlugState(this.connectedChargePoints[0])},chargePoint2VehicleConnected(){return this.mqttStore.getChargePointPlugState(this.connectedChargePoints[1])},chargePoint3VehicleConnected(){return this.mqttStore.getChargePointPlugState(this.connectedChargePoints[2])},chargePoint1ConnectedVehicleName(){return this.mqttStore.getChargePointConnectedVehicleName(this.connectedChargePoints[0])},chargePoint2ConnectedVehicleName(){return this.mqttStore.getChargePointConnectedVehicleName(this.connectedChargePoints[1])},chargePoint3ConnectedVehicleName(){return this.mqttStore.getChargePointConnectedVehicleName(this.connectedChargePoints[2])},chargePoint1ConnectedVehicleChargeMode(){return this.mqttStore.getChargePointConnectedVehicleChargeMode(this.connectedChargePoints[0])},chargePoint2ConnectedVehicleChargeMode(){return this.mqttStore.getChargePointConnectedVehicleChargeMode(this.connectedChargePoints[1])},chargePoint3ConnectedVehicleChargeMode(){return this.mqttStore.getChargePointConnectedVehicleChargeMode(this.connectedChargePoints[2])},chargePoint1ConnectedVehicleSoc(){return this.mqttStore.getChargePointConnectedVehicleSoc(this.connectedChargePoints[0]).soc/100},chargePoint2ConnectedVehicleSoc(){return this.mqttStore.getChargePointConnectedVehicleSoc(this.connectedChargePoints[1]).soc/100},chargePoint3ConnectedVehicleSoc(){return this.mqttStore.getChargePointConnectedVehicleSoc(this.connectedChargePoints[2]).soc/100},gridConsumption(){return this.gridPower.value>0},gridFeedIn(){return this.gridPower.value<0},homeConsumption(){return this.homePower.value>0},homeProduction(){return this.homePower.value<0},pvProduction(){return this.pvPower.value>0},batteryDischarging(){return this.batteryPower.value<0},batteryCharging(){return this.batteryPower.value>0},chargePointSumCharging(){return this.chargePointSumPower.value>0},chargePointSumDischarging(){return this.chargePointSumPower.value<0},chargePoint1Charging(){return this.chargePoint1Power.value>0},chargePoint1Discharging(){return this.chargePoint1Power.value<0},chargePoint2Charging(){return this.chargePoint2Power.value>0},chargePoint2Discharging(){return this.chargePoint2Power.value<0},chargePoint3Charging(){return this.chargePoint3Power.value>0},chargePoint3Discharging(){return this.chargePoint3Power.value<0},svgComponents(){var t,a,g,o,n,c;var e=[];return this.mqttStore.getThemeConfiguration.enable_dashboard_card_grid&&e.push({id:"grid",class:{base:"grid",valueLabel:this.gridFeedIn?"fill-success":this.gridConsumption?"fill-danger":"",animated:this.gridConsumption,animatedReverse:this.gridFeedIn},position:{row:0,column:0},label:["EVU",this.absoluteValue(this.gridPower).textValue],icon:"icons/owbGrid.svg"}),this.mqttStore.getThemeConfiguration.enable_dashboard_card_home_consumption&&e.push({id:"home",class:{base:"home",valueLabel:"",animated:this.homeProduction,animatedReverse:this.homeConsumption},position:{row:0,column:2},label:["Haus",this.absoluteValue(this.homePower).textValue],icon:"icons/owbHouse.svg"}),this.mqttStore.getPvConfigured&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_inverter_sum&&e.push({id:"pv",class:{base:"pv",valueLabel:this.pvProduction?"fill-success":"",animated:this.pvProduction,animatedReverse:!1},position:{row:1,column:0},label:["PV",this.absoluteValue(this.pvPower).textValue],icon:"icons/owbPV.svg"}),this.mqttStore.getBatteryConfigured&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_battery_sum&&e.push({id:"battery",class:{base:"battery",valueLabel:"",animated:this.batteryDischarging,animatedReverse:this.batteryCharging},position:{row:1,column:2},label:["Speicher",this.absoluteValue(this.batteryPower).textValue],soc:this.batterySoc,icon:"icons/owbBattery.svg"}),this.connectedChargePoints.length>0&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_charge_point_sum&&(this.connectedChargePoints.length<=3?(e.push({id:"charge-point-1",class:{base:"charge-point",valueLabel:"",animated:this.chargePoint1Discharging,animatedReverse:this.chargePoint1Charging},position:{row:2,column:this.connectedChargePoints.length>1?0:1},label:[this.chargePoint1Name,this.absoluteValue(this.chargePoint1Power).textValue],icon:"icons/owbChargePoint.svg"}),this.chargePoint1VehicleConnected&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles&&e.push({id:"vehicle-1",class:{base:"vehicle",valueLabel:"fill-"+((t=this.chargePoint1ConnectedVehicleChargeMode)==null?void 0:t.class),animated:this.chargePoint1Discharging,animatedReverse:this.chargePoint1Charging},position:{row:3,column:this.connectedChargePoints.length>1?0:1},label:[this.chargePoint1ConnectedVehicleName||"---",((a=this.chargePoint1ConnectedVehicleChargeMode)==null?void 0:a.label)||"---"],soc:this.chargePoint1ConnectedVehicleSoc,icon:"icons/owbVehicle.svg",clicked:()=>{this.selectChargeMode(this.connectedChargePoints[0])}}),this.connectedChargePoints.length>1&&(e.push({id:"charge-point-2",class:{base:"charge-point",valueLabel:"",animated:this.chargePoint2Discharging,animatedReverse:this.chargePoint2Charging},position:{row:2,column:this.connectedChargePoints.length>2?1:2},label:[this.chargePoint2Name,this.absoluteValue(this.chargePoint2Power).textValue],icon:"icons/owbChargePoint.svg"}),this.chargePoint2VehicleConnected&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles&&e.push({id:"vehicle-2",class:{base:"vehicle",valueLabel:"fill-"+((g=this.chargePoint2ConnectedVehicleChargeMode)==null?void 0:g.class),animated:this.chargePoint2Discharging,animatedReverse:this.chargePoint2Charging},position:{row:3,column:this.connectedChargePoints.length>2?1:2},label:[this.chargePoint2ConnectedVehicleName||"---",((o=this.chargePoint2ConnectedVehicleChargeMode)==null?void 0:o.label)||"---"],soc:this.chargePoint2ConnectedVehicleSoc,icon:"icons/owbVehicle.svg"}),this.connectedChargePoints.length>2&&(e.push({id:"charge-point-3",class:{base:"charge-point",valueLabel:"",animated:this.chargePoint3Discharging,animatedReverse:this.chargePoint3Charging},position:{row:2,column:2},label:[this.chargePoint3Name,this.absoluteValue(this.chargePoint3Power).textValue],icon:"icons/owbChargePoint.svg"}),this.chargePoint3VehicleConnected&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles&&e.push({id:"vehicle-3",class:{base:"vehicle",valueLabel:"fill-"+((n=this.chargePoint3ConnectedVehicleChargeMode)==null?void 0:n.class),animated:this.chargePoint3Discharging,animatedReverse:this.chargePoint3Charging},position:{row:3,column:2},label:[this.chargePoint3ConnectedVehicleName||"---",((c=this.chargePoint3ConnectedVehicleChargeMode)==null?void 0:c.label)||"---"],soc:this.chargePoint3ConnectedVehicleSoc,icon:"icons/owbVehicle.svg"})))):e.push({id:"charge-point-sum",class:{base:"charge-point",valueLabel:"",animated:this.chargePointSumDischarging,animatedReverse:this.chargePointSumCharging},position:{row:2,column:1},label:["Ladepunkte",this.absoluteValue(this.chargePointSumPower).textValue],icon:"icons/owbChargePoint.svg"})),(!this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles||this.connectedChargePoints.length===0||this.connectedChargePoints.length>3)&&this.setSvgNumRows(3),e}},watch:{changesLocked(e,t){t!==!0&&e===!0&&(this.modalChargeModeSettingsVisible=!1)}},methods:{absoluteValue(e){let t={...e};return t.textValue&&(t.textValue=t.textValue.replace("-","")),t.value&&(t.value=Math.abs(t.value)),t.scaledValue&&(t.scaledValue=Math.abs(t.scaledValue)),t},setSvgNumRows(e){this.svgSize.numRows=e},calcRowY(e){let t=this.svgSize.yMin+this.svgSize.strokeWidth+this.svgSize.circleRadius;return e*((this.svgSize.yMax-this.svgSize.strokeWidth-this.svgSize.circleRadius-t)/(this.svgSize.numRows-1))+t},calcColumnX(e){let t=this.svgSize.xMin+this.svgSize.strokeWidth+this.svgRectWidth/2;return e*((this.svgSize.xMax-this.svgSize.strokeWidth-this.svgRectWidth/2-t)/(this.svgSize.numColumns-1))+t},calcFlowLineAnchorX(e){let t=this.calcColumnX(e);return e<(this.svgSize.numColumns-1)/2?t+this.svgRectWidth/2-this.svgSize.circleRadius:e>(this.svgSize.numColumns-1)/2?t-this.svgRectWidth/2+this.svgSize.circleRadius:t},calcSvgElementBoundingBox(e){let t=document.getElementById(e);if(t==null)return{x:0,y:0,width:0,height:0};let a=t.getBBox();return{x:a.x,y:a.y,width:a.width,height:a.height}},beginAnimation(e){var t;this.$refs[e]!=null&&((t=this.$refs[e][0])==null||t.beginElement())},selectChargeMode(e){this.changesLocked||(this.modalChargePointId=e,this.modalChargeModeSettingsVisible=!0)}}},V=()=>{M(e=>({"4830d832":e.svgStrokeWidth,"4cb129ac":e.svgFontSize}))},x=S.setup;S.setup=x?(e,t)=>(V(),x(e,t)):V;const k={class:"svg-container"},W=["viewBox"],$={id:"layer1",style:{display:"inline"}},L=["d"],N={id:"layer2",style:{display:"inline"}},B=["cx","cy","r"],D=["transform","onClick"],I=["id"],F=["x","y","width","height"],A=["id"],j=["x","y","width","height","rx","ry"],T=["x","y","width","height","rx","ry"],X=["clip-path"],E=["id","x","y"],Y=["values"],H=["id","x","y"],G=["transform"],U=["r"],O=["r","clip-path"],J=["href","x","y","height","width"],ne=p({name:"EnergyFlowView",components:{FlowCard:p(S,[["render",function(e,t,a,g,o,n){const c=l("charge-mode-modal"),z=l("i-container"),R=l("dashboard-card");return r(),h(v,null,[u(c,{modelValue:o.modalChargeModeSettingsVisible,"onUpdate:modelValue":t[0]||(t[0]=i=>o.modalChargeModeSettingsVisible=i),"charge-point-id":o.modalChargePointId},null,8,["modelValue","charge-point-id"]),u(R,{color:"primary"},{headerLeft:m(()=>t[1]||(t[1]=[b(" Übersicht - Energiefluss ",-1)])),default:m(()=>[u(z,null,{default:m(()=>[s("div",k,[(r(),h("svg",{viewBox:n.svgViewBox,version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg"},[s("g",$,[(r(!0),h(v,null,C(n.svgComponents,i=>(r(),h("path",{key:i.id,class:d([i.class.base,{animated:i.class.animated},{animatedReverse:i.class.animatedReverse}]),d:i.class.base!=="vehicle"?`M ${n.calcFlowLineAnchorX(i.position.column)}, ${n.calcRowY(i.position.row)} ${n.calcColumnX(1)}, ${n.calcRowY(1)}`:`M ${n.calcFlowLineAnchorX(i.position.column)}, ${n.calcRowY(i.position.row)} ${n.calcFlowLineAnchorX(i.position.column)}, ${n.calcRowY(i.position.row-1)}`},null,10,L))),128))]),s("g",N,[s("circle",{id:"center",cx:n.calcColumnX(1),cy:n.calcRowY(1),r:o.svgSize.circleRadius/3},null,8,B),(r(!0),h(v,null,C(n.svgComponents,i=>(r(),h("g",{key:i.id,class:d(i.class.base),transform:`translate(${n.calcColumnX(i.position.column)}, ${n.calcRowY(i.position.row)})`,onClick:K=>{n.beginAnimation(`animate-label-${i.id}`),i.clicked&&i.clicked()}},[s("defs",null,[i.soc?(r(),h("clipPath",{key:0,id:`clip-soc-${i.id}`},[s("rect",{x:-o.svgSize.circleRadius-o.svgSize.strokeWidth,y:(o.svgSize.circleRadius+o.svgSize.strokeWidth)*(1-2*i.soc),width:2*(o.svgSize.circleRadius+o.svgSize.strokeWidth),height:2*(o.svgSize.circleRadius+o.svgSize.strokeWidth)*i.soc},null,8,F)],8,I)):P("",!0),s("clipPath",{id:`clip-label-${i.id}`},[s("rect",{x:-n.svgRectWidth/2,y:-o.svgSize.circleRadius,width:n.svgRectWidth,height:2*o.svgSize.circleRadius,rx:o.svgSize.circleRadius,ry:o.svgSize.circleRadius},null,8,j)],8,A)]),s("rect",{x:-n.svgRectWidth/2,y:-o.svgSize.circleRadius,width:n.svgRectWidth,height:2*o.svgSize.circleRadius,rx:o.svgSize.circleRadius,ry:o.svgSize.circleRadius},null,8,T),s("text",{"clip-path":`url(#clip-label-${i.id})`},[s("tspan",{id:`label-${i.id}`,"text-anchor":"start",x:-n.svgRectWidth/2+2*o.svgSize.circleRadius+o.svgSize.strokeWidth,y:-o.svgSize.textSize/2},[n.calcSvgElementBoundingBox(`label-${i.id}`).width>n.svgRectWidth-2*o.svgSize.circleRadius-2*o.svgSize.strokeWidth?(r(),h("animate",{key:0,ref_for:!0,ref:`animate-label-${i.id}`,xmlns:"http://www.w3.org/2000/svg",attributeName:"x",dur:"5s",values:"0; "+(-n.calcSvgElementBoundingBox(`label-${i.id}`).width+n.svgRectWidth-2.5*o.svgSize.circleRadius-2*o.svgSize.strokeWidth)+"; 0;",repeatCount:"0",begin:"2s",additive:"sum"},null,8,Y)):P("",!0),b(" "+w(i.label[0]),1)],8,E),s("tspan",{id:`value-${i.id}`,class:d(i.class.valueLabel),"text-anchor":"end",x:2*o.svgSize.circleRadius+o.svgSize.strokeWidth,y:o.svgSize.textSize},w(i.label[1]),11,H)],8,X),s("g",{transform:`translate(${o.svgSize.circleRadius-n.svgRectWidth/2}, 0)`},[s("circle",{cx:"0",cy:"0",r:o.svgSize.circleRadius,class:d({soc:i.soc})},null,10,U),i.soc?(r(),h("circle",{key:0,cx:"0",cy:"0",r:o.svgSize.circleRadius,"clip-path":`url(#clip-soc-${i.id})`},null,8,O)):P("",!0),s("image",{href:i.icon,x:-n.svgIconWidth/2,y:-n.svgIconHeight/2,height:n.svgIconHeight,width:n.svgIconWidth},null,8,J)],8,G)],10,D))),128))])],8,W))])]),_:1})]),_:1})],64)}],["__scopeId","data-v-e1dd1722"]])},props:{changesLocked:{required:!1,type:Boolean,default:!1}}},[["render",function(e,t,a,g,o,n){const c=l("FlowCard");return r(),_(c,{"changes-locked":a.changesLocked},null,8,["changes-locked"])}]]);export{ne as default}; +import{u as y}from"./index-Rkba6Ib0.js";import{D as f}from"./DashboardCard-DS7AgUYm.js";import{C as q}from"./ChargeModeModal-D_G7wsgY.js";import{e as h,s as u,p as l,q as m,F as v,o as r,i as s,A as C,z as d,f as P,k as b,x as w,O as M,l as _}from"./vendor-Bzn5cd2Y.js";import{_ as p}from"./vendor-inkline-S9CBmrTS.js";import"./vendor-fortawesome-C1Wk2aFl.js";const S={name:"DashboardFlowCard",components:{DashboardCard:f,ChargeModeModal:q},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:y(),svgSize:{xMin:0,xMax:150,yMin:0,yMax:105,circleRadius:10,strokeWidth:.5,textSize:5,numRows:4,numColumns:3},modalChargeModeSettingsVisible:!1,modalChargePointId:0}),computed:{svgViewBox(){return`${this.svgSize.xMin} ${this.svgSize.yMin} ${this.svgSize.xMax} ${this.svgSize.yMax}`},svgFontSize(){return`${this.svgSize.textSize}px`},svgRectWidth(){return(this.svgSize.xMax-this.svgSize.xMin-this.svgSize.strokeWidth-this.svgSize.numColumns)/this.svgSize.numColumns},svgStrokeWidth(){return this.svgSize.strokeWidth},svgIconWidth(){return this.svgSize.circleRadius},svgIconHeight(){return this.svgSize.circleRadius},gridPower(){return this.mqttStore.getGridPower("object")},pvPower(){return this.mqttStore.getPvPower("object")},homePower(){return this.mqttStore.getHomePower("object")},batteryPower(){return this.mqttStore.getBatteryPower("object")},batterySoc(){return this.mqttStore.getBatterySoc("object").value/100},connectedChargePoints(){return this.mqttStore.getChargePointIds},chargePointSumPower(){return this.mqttStore.getChargePointSumPower("object")},chargePoint1Power(){return this.connectedChargePoints.length>0?this.mqttStore.getChargePointPower(this.connectedChargePoints[0],"object")||{textValue:"Loading..."}:{textValue:"N/A"}},chargePoint2Power(){return this.connectedChargePoints.length>1?this.mqttStore.getChargePointPower(this.connectedChargePoints[1],"object")||{textValue:"Loading..."}:{textValue:"N/A"}},chargePoint3Power(){return this.connectedChargePoints.length>2?this.mqttStore.getChargePointPower(this.connectedChargePoints[2],"object")||{textValue:"Loading..."}:{textValue:"N/A"}},chargePoint1Name(){return this.mqttStore.getChargePointName(this.connectedChargePoints[0])},chargePoint2Name(){return this.mqttStore.getChargePointName(this.connectedChargePoints[1])},chargePoint3Name(){return this.mqttStore.getChargePointName(this.connectedChargePoints[2])},chargePoint1VehicleConnected(){return this.mqttStore.getChargePointPlugState(this.connectedChargePoints[0])},chargePoint2VehicleConnected(){return this.mqttStore.getChargePointPlugState(this.connectedChargePoints[1])},chargePoint3VehicleConnected(){return this.mqttStore.getChargePointPlugState(this.connectedChargePoints[2])},chargePoint1ConnectedVehicleName(){return this.mqttStore.getChargePointConnectedVehicleName(this.connectedChargePoints[0])},chargePoint2ConnectedVehicleName(){return this.mqttStore.getChargePointConnectedVehicleName(this.connectedChargePoints[1])},chargePoint3ConnectedVehicleName(){return this.mqttStore.getChargePointConnectedVehicleName(this.connectedChargePoints[2])},chargePoint1ConnectedVehicleChargeMode(){return this.mqttStore.getChargePointConnectedVehicleChargeMode(this.connectedChargePoints[0])},chargePoint2ConnectedVehicleChargeMode(){return this.mqttStore.getChargePointConnectedVehicleChargeMode(this.connectedChargePoints[1])},chargePoint3ConnectedVehicleChargeMode(){return this.mqttStore.getChargePointConnectedVehicleChargeMode(this.connectedChargePoints[2])},chargePoint1ConnectedVehicleSoc(){return this.mqttStore.getChargePointConnectedVehicleSoc(this.connectedChargePoints[0]).soc/100},chargePoint2ConnectedVehicleSoc(){return this.mqttStore.getChargePointConnectedVehicleSoc(this.connectedChargePoints[1]).soc/100},chargePoint3ConnectedVehicleSoc(){return this.mqttStore.getChargePointConnectedVehicleSoc(this.connectedChargePoints[2]).soc/100},gridConsumption(){return this.gridPower.value>0},gridFeedIn(){return this.gridPower.value<0},homeConsumption(){return this.homePower.value>0},homeProduction(){return this.homePower.value<0},pvProduction(){return this.pvPower.value>0},batteryDischarging(){return this.batteryPower.value<0},batteryCharging(){return this.batteryPower.value>0},chargePointSumCharging(){return this.chargePointSumPower.value>0},chargePointSumDischarging(){return this.chargePointSumPower.value<0},chargePoint1Charging(){return this.chargePoint1Power.value>0},chargePoint1Discharging(){return this.chargePoint1Power.value<0},chargePoint2Charging(){return this.chargePoint2Power.value>0},chargePoint2Discharging(){return this.chargePoint2Power.value<0},chargePoint3Charging(){return this.chargePoint3Power.value>0},chargePoint3Discharging(){return this.chargePoint3Power.value<0},svgComponents(){var t,a,g,o,n,c;var e=[];return this.mqttStore.getThemeConfiguration.enable_dashboard_card_grid&&e.push({id:"grid",class:{base:"grid",valueLabel:this.gridFeedIn?"fill-success":this.gridConsumption?"fill-danger":"",animated:this.gridConsumption,animatedReverse:this.gridFeedIn},position:{row:0,column:0},label:["EVU",this.absoluteValue(this.gridPower).textValue],icon:"icons/owbGrid.svg"}),this.mqttStore.getThemeConfiguration.enable_dashboard_card_home_consumption&&e.push({id:"home",class:{base:"home",valueLabel:"",animated:this.homeProduction,animatedReverse:this.homeConsumption},position:{row:0,column:2},label:["Haus",this.absoluteValue(this.homePower).textValue],icon:"icons/owbHouse.svg"}),this.mqttStore.getPvConfigured&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_inverter_sum&&e.push({id:"pv",class:{base:"pv",valueLabel:this.pvProduction?"fill-success":"",animated:this.pvProduction,animatedReverse:!1},position:{row:1,column:0},label:["PV",this.absoluteValue(this.pvPower).textValue],icon:"icons/owbPV.svg"}),this.mqttStore.getBatteryConfigured&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_battery_sum&&e.push({id:"battery",class:{base:"battery",valueLabel:"",animated:this.batteryDischarging,animatedReverse:this.batteryCharging},position:{row:1,column:2},label:["Speicher",this.absoluteValue(this.batteryPower).textValue],soc:this.batterySoc,icon:"icons/owbBattery.svg"}),this.connectedChargePoints.length>0&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_charge_point_sum&&(this.connectedChargePoints.length<=3?(e.push({id:"charge-point-1",class:{base:"charge-point",valueLabel:"",animated:this.chargePoint1Discharging,animatedReverse:this.chargePoint1Charging},position:{row:2,column:this.connectedChargePoints.length>1?0:1},label:[this.chargePoint1Name,this.absoluteValue(this.chargePoint1Power).textValue],icon:"icons/owbChargePoint.svg"}),this.chargePoint1VehicleConnected&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles&&e.push({id:"vehicle-1",class:{base:"vehicle",valueLabel:"fill-"+((t=this.chargePoint1ConnectedVehicleChargeMode)==null?void 0:t.class),animated:this.chargePoint1Discharging,animatedReverse:this.chargePoint1Charging},position:{row:3,column:this.connectedChargePoints.length>1?0:1},label:[this.chargePoint1ConnectedVehicleName||"---",((a=this.chargePoint1ConnectedVehicleChargeMode)==null?void 0:a.label)||"---"],soc:this.chargePoint1ConnectedVehicleSoc,icon:"icons/owbVehicle.svg",clicked:()=>{this.selectChargeMode(this.connectedChargePoints[0])}}),this.connectedChargePoints.length>1&&(e.push({id:"charge-point-2",class:{base:"charge-point",valueLabel:"",animated:this.chargePoint2Discharging,animatedReverse:this.chargePoint2Charging},position:{row:2,column:this.connectedChargePoints.length>2?1:2},label:[this.chargePoint2Name,this.absoluteValue(this.chargePoint2Power).textValue],icon:"icons/owbChargePoint.svg"}),this.chargePoint2VehicleConnected&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles&&e.push({id:"vehicle-2",class:{base:"vehicle",valueLabel:"fill-"+((g=this.chargePoint2ConnectedVehicleChargeMode)==null?void 0:g.class),animated:this.chargePoint2Discharging,animatedReverse:this.chargePoint2Charging},position:{row:3,column:this.connectedChargePoints.length>2?1:2},label:[this.chargePoint2ConnectedVehicleName||"---",((o=this.chargePoint2ConnectedVehicleChargeMode)==null?void 0:o.label)||"---"],soc:this.chargePoint2ConnectedVehicleSoc,icon:"icons/owbVehicle.svg"}),this.connectedChargePoints.length>2&&(e.push({id:"charge-point-3",class:{base:"charge-point",valueLabel:"",animated:this.chargePoint3Discharging,animatedReverse:this.chargePoint3Charging},position:{row:2,column:2},label:[this.chargePoint3Name,this.absoluteValue(this.chargePoint3Power).textValue],icon:"icons/owbChargePoint.svg"}),this.chargePoint3VehicleConnected&&this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles&&e.push({id:"vehicle-3",class:{base:"vehicle",valueLabel:"fill-"+((n=this.chargePoint3ConnectedVehicleChargeMode)==null?void 0:n.class),animated:this.chargePoint3Discharging,animatedReverse:this.chargePoint3Charging},position:{row:3,column:2},label:[this.chargePoint3ConnectedVehicleName||"---",((c=this.chargePoint3ConnectedVehicleChargeMode)==null?void 0:c.label)||"---"],soc:this.chargePoint3ConnectedVehicleSoc,icon:"icons/owbVehicle.svg"})))):e.push({id:"charge-point-sum",class:{base:"charge-point",valueLabel:"",animated:this.chargePointSumDischarging,animatedReverse:this.chargePointSumCharging},position:{row:2,column:1},label:["Ladepunkte",this.absoluteValue(this.chargePointSumPower).textValue],icon:"icons/owbChargePoint.svg"})),(!this.mqttStore.getThemeConfiguration.enable_dashboard_card_vehicles||this.connectedChargePoints.length===0||this.connectedChargePoints.length>3)&&this.setSvgNumRows(3),e}},watch:{changesLocked(e,t){t!==!0&&e===!0&&(this.modalChargeModeSettingsVisible=!1)}},methods:{absoluteValue(e){let t={...e};return t.textValue&&(t.textValue=t.textValue.replace("-","")),t.value&&(t.value=Math.abs(t.value)),t.scaledValue&&(t.scaledValue=Math.abs(t.scaledValue)),t},setSvgNumRows(e){this.svgSize.numRows=e},calcRowY(e){let t=this.svgSize.yMin+this.svgSize.strokeWidth+this.svgSize.circleRadius;return e*((this.svgSize.yMax-this.svgSize.strokeWidth-this.svgSize.circleRadius-t)/(this.svgSize.numRows-1))+t},calcColumnX(e){let t=this.svgSize.xMin+this.svgSize.strokeWidth+this.svgRectWidth/2;return e*((this.svgSize.xMax-this.svgSize.strokeWidth-this.svgRectWidth/2-t)/(this.svgSize.numColumns-1))+t},calcFlowLineAnchorX(e){let t=this.calcColumnX(e);return e<(this.svgSize.numColumns-1)/2?t+this.svgRectWidth/2-this.svgSize.circleRadius:e>(this.svgSize.numColumns-1)/2?t-this.svgRectWidth/2+this.svgSize.circleRadius:t},calcSvgElementBoundingBox(e){let t=document.getElementById(e);if(t==null)return{x:0,y:0,width:0,height:0};let a=t.getBBox();return{x:a.x,y:a.y,width:a.width,height:a.height}},beginAnimation(e){var t;this.$refs[e]!=null&&((t=this.$refs[e][0])==null||t.beginElement())},selectChargeMode(e){this.changesLocked||(this.modalChargePointId=e,this.modalChargeModeSettingsVisible=!0)}}},V=()=>{M(e=>({"4830d832":e.svgStrokeWidth,"4cb129ac":e.svgFontSize}))},x=S.setup;S.setup=x?(e,t)=>(V(),x(e,t)):V;const k={class:"svg-container"},W=["viewBox"],$={id:"layer1",style:{display:"inline"}},L=["d"],N={id:"layer2",style:{display:"inline"}},B=["cx","cy","r"],D=["transform","onClick"],I=["id"],F=["x","y","width","height"],A=["id"],j=["x","y","width","height","rx","ry"],T=["x","y","width","height","rx","ry"],X=["clip-path"],E=["id","x","y"],Y=["values"],H=["id","x","y"],G=["transform"],U=["r"],O=["r","clip-path"],J=["href","x","y","height","width"],ne=p({name:"EnergyFlowView",components:{FlowCard:p(S,[["render",function(e,t,a,g,o,n){const c=l("charge-mode-modal"),z=l("i-container"),R=l("dashboard-card");return r(),h(v,null,[u(c,{modelValue:o.modalChargeModeSettingsVisible,"onUpdate:modelValue":t[0]||(t[0]=i=>o.modalChargeModeSettingsVisible=i),"charge-point-id":o.modalChargePointId},null,8,["modelValue","charge-point-id"]),u(R,{color:"primary"},{headerLeft:m(()=>t[1]||(t[1]=[b(" Übersicht - Energiefluss ",-1)])),default:m(()=>[u(z,null,{default:m(()=>[s("div",k,[(r(),h("svg",{viewBox:n.svgViewBox,version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:svg":"http://www.w3.org/2000/svg"},[s("g",$,[(r(!0),h(v,null,C(n.svgComponents,i=>(r(),h("path",{key:i.id,class:d([i.class.base,{animated:i.class.animated},{animatedReverse:i.class.animatedReverse}]),d:i.class.base!=="vehicle"?`M ${n.calcFlowLineAnchorX(i.position.column)}, ${n.calcRowY(i.position.row)} ${n.calcColumnX(1)}, ${n.calcRowY(1)}`:`M ${n.calcFlowLineAnchorX(i.position.column)}, ${n.calcRowY(i.position.row)} ${n.calcFlowLineAnchorX(i.position.column)}, ${n.calcRowY(i.position.row-1)}`},null,10,L))),128))]),s("g",N,[s("circle",{id:"center",cx:n.calcColumnX(1),cy:n.calcRowY(1),r:o.svgSize.circleRadius/3},null,8,B),(r(!0),h(v,null,C(n.svgComponents,i=>(r(),h("g",{key:i.id,class:d(i.class.base),transform:`translate(${n.calcColumnX(i.position.column)}, ${n.calcRowY(i.position.row)})`,onClick:K=>{n.beginAnimation(`animate-label-${i.id}`),i.clicked&&i.clicked()}},[s("defs",null,[i.soc?(r(),h("clipPath",{key:0,id:`clip-soc-${i.id}`},[s("rect",{x:-o.svgSize.circleRadius-o.svgSize.strokeWidth,y:(o.svgSize.circleRadius+o.svgSize.strokeWidth)*(1-2*i.soc),width:2*(o.svgSize.circleRadius+o.svgSize.strokeWidth),height:2*(o.svgSize.circleRadius+o.svgSize.strokeWidth)*i.soc},null,8,F)],8,I)):P("",!0),s("clipPath",{id:`clip-label-${i.id}`},[s("rect",{x:-n.svgRectWidth/2,y:-o.svgSize.circleRadius,width:n.svgRectWidth,height:2*o.svgSize.circleRadius,rx:o.svgSize.circleRadius,ry:o.svgSize.circleRadius},null,8,j)],8,A)]),s("rect",{x:-n.svgRectWidth/2,y:-o.svgSize.circleRadius,width:n.svgRectWidth,height:2*o.svgSize.circleRadius,rx:o.svgSize.circleRadius,ry:o.svgSize.circleRadius},null,8,T),s("text",{"clip-path":`url(#clip-label-${i.id})`},[s("tspan",{id:`label-${i.id}`,"text-anchor":"start",x:-n.svgRectWidth/2+2*o.svgSize.circleRadius+o.svgSize.strokeWidth,y:-o.svgSize.textSize/2},[n.calcSvgElementBoundingBox(`label-${i.id}`).width>n.svgRectWidth-2*o.svgSize.circleRadius-2*o.svgSize.strokeWidth?(r(),h("animate",{key:0,ref_for:!0,ref:`animate-label-${i.id}`,xmlns:"http://www.w3.org/2000/svg",attributeName:"x",dur:"5s",values:"0; "+(-n.calcSvgElementBoundingBox(`label-${i.id}`).width+n.svgRectWidth-2.5*o.svgSize.circleRadius-2*o.svgSize.strokeWidth)+"; 0;",repeatCount:"0",begin:"2s",additive:"sum"},null,8,Y)):P("",!0),b(" "+w(i.label[0]),1)],8,E),s("tspan",{id:`value-${i.id}`,class:d(i.class.valueLabel),"text-anchor":"end",x:2*o.svgSize.circleRadius+o.svgSize.strokeWidth,y:o.svgSize.textSize},w(i.label[1]),11,H)],8,X),s("g",{transform:`translate(${o.svgSize.circleRadius-n.svgRectWidth/2}, 0)`},[s("circle",{cx:"0",cy:"0",r:o.svgSize.circleRadius,class:d({soc:i.soc})},null,10,U),i.soc?(r(),h("circle",{key:0,cx:"0",cy:"0",r:o.svgSize.circleRadius,"clip-path":`url(#clip-soc-${i.id})`},null,8,O)):P("",!0),s("image",{href:i.icon,x:-n.svgIconWidth/2,y:-n.svgIconHeight/2,height:n.svgIconHeight,width:n.svgIconWidth},null,8,J)],8,G)],10,D))),128))])],8,W))])]),_:1})]),_:1})],64)}],["__scopeId","data-v-e1dd1722"]])},props:{changesLocked:{required:!1,type:Boolean,default:!1}}},[["render",function(e,t,a,g,o,n){const c=l("FlowCard");return r(),_(c,{"changes-locked":a.changesLocked},null,8,["changes-locked"])}]]);export{ne as default}; diff --git a/packages/modules/display_themes/cards/web/assets/StatusView-9xI7RUa0.js b/packages/modules/display_themes/cards/web/assets/StatusView--LrW5-ZS.js similarity index 99% rename from packages/modules/display_themes/cards/web/assets/StatusView-9xI7RUa0.js rename to packages/modules/display_themes/cards/web/assets/StatusView--LrW5-ZS.js index a2263d6861..406099dbb6 100644 --- a/packages/modules/display_themes/cards/web/assets/StatusView-9xI7RUa0.js +++ b/packages/modules/display_themes/cards/web/assets/StatusView--LrW5-ZS.js @@ -1 +1 @@ -import{u as y}from"./index-C0J-ZJ88.js";import{F as b,l as k,G as C,H as A}from"./vendor-fortawesome-C1Wk2aFl.js";import{_ as p}from"./vendor-inkline-S9CBmrTS.js";import{l as c,q as t,p as l,o as _,k as n,s as o,I as x,i as I,f as M}from"./vendor-Bzn5cd2Y.js";import{D as z}from"./DashboardCard-DS7AgUYm.js";k.add(C);const F=p({name:"ReloadButton",components:{FontAwesomeIcon:b},props:{},data:()=>({}),methods:{reloadDisplay(){location.reload()}}},[["render",function(w,e,f,S,u,m){const i=l("FontAwesomeIcon"),a=l("i-button");return _(),c(a,{color:"success",size:"lg",onClick:e[0]||(e[0]=s=>m.reloadDisplay())},{default:t(()=>[e[1]||(e[1]=n(" Display neu laden ",-1)),o(i,{"fixed-width":"",icon:["fas","fa-undo"]})]),_:1,__:[1]})}]]);k.add(C);const P=p({name:"RebootButton",components:{FontAwesomeIcon:b},props:{},data:()=>({mqttStore:y(),showModal:!1}),methods:{toggleModal(){this.showModal=!this.showModal},cancel(){this.toggleModal()},confirm(){this.toggleModal(),this.mqttStore.settings.parentChargePoint1!==void 0?this.$root.sendSystemCommand("chargepointReboot",{chargePoint:this.mqttStore.settings.parentChargePoint1}):this.$root.sendSystemCommand("systemReboot")}}},[["render",function(w,e,f,S,u,m){const i=l("FontAwesomeIcon"),a=l("i-container"),s=l("i-button"),d=l("i-column"),h=l("i-row"),g=l("i-modal");return _(),c(s,{color:"warning",size:"lg",onClick:e[3]||(e[3]=r=>m.toggleModal())},{default:t(()=>[e[8]||(e[8]=n(" openWB neu starten ",-1)),o(i,{"fixed-width":"",icon:["fas","fa-undo"]}),(_(),c(x,{to:"body"},[o(g,{modelValue:u.showModal,"onUpdate:modelValue":e[2]||(e[2]=r=>u.showModal=r),size:"sm"},{header:t(()=>e[4]||(e[4]=[n(" openWB neu starten... ",-1)])),footer:t(()=>[o(a,null,{default:t(()=>[o(h,null,{default:t(()=>[o(d,{class:"_text-align:right"},{default:t(()=>[o(s,{color:"success",onClick:e[0]||(e[0]=r=>m.cancel())},{default:t(()=>e[6]||(e[6]=[n(" Zurück ",-1)])),_:1,__:[6]})]),_:1}),o(d,null,{default:t(()=>[o(s,{color:"danger",onClick:e[1]||(e[1]=r=>m.confirm())},{default:t(()=>e[7]||(e[7]=[n(" Neustart ",-1)])),_:1,__:[7]})]),_:1})]),_:1})]),_:1})]),default:t(()=>[o(a,null,{default:t(()=>e[5]||(e[5]=[n(" Möchten Sie diese openWB wirklich neu starten? ",-1)])),_:1,__:[5]})]),_:1},8,["modelValue"])]))]),_:1,__:[8]})}]]);k.add(A);const Z=p({name:"StatusView",components:{ReloadButton:F,RebootButton:P,ShutdownButton:p({name:"ShutdownButton",components:{FontAwesomeIcon:b},props:{},data:()=>({mqttStore:y(),showModal:!1}),methods:{toggleModal(){this.showModal=!this.showModal},cancel(){this.toggleModal()},confirm(){this.toggleModal(),this.mqttStore.settings.parentChargePoint1!==void 0?this.$root.sendSystemCommand("chargepointShutdown",{chargePoint:this.mqttStore.settings.parentChargePoint1}):this.$root.sendSystemCommand("systemShutdown")}}},[["render",function(w,e,f,S,u,m){const i=l("FontAwesomeIcon"),a=l("i-container"),s=l("i-button"),d=l("i-column"),h=l("i-row"),g=l("i-modal");return _(),c(s,{color:"danger",size:"lg",onClick:e[3]||(e[3]=r=>m.toggleModal())},{default:t(()=>[e[8]||(e[8]=n(" openWB ausschalten ",-1)),o(i,{"fixed-width":"",icon:["fas","fa-power-off"]}),(_(),c(x,{to:"body"},[o(g,{modelValue:u.showModal,"onUpdate:modelValue":e[2]||(e[2]=r=>u.showModal=r),size:"sm"},{header:t(()=>e[4]||(e[4]=[n(" openWB ausschalten... ",-1)])),footer:t(()=>[o(a,null,{default:t(()=>[o(h,null,{default:t(()=>[o(d,{class:"_text-align:right"},{default:t(()=>[o(s,{color:"success",onClick:e[0]||(e[0]=r=>m.cancel())},{default:t(()=>e[6]||(e[6]=[n(" Zurück ",-1)])),_:1,__:[6]})]),_:1}),o(d,null,{default:t(()=>[o(s,{color:"danger",onClick:e[1]||(e[1]=r=>m.confirm())},{default:t(()=>e[7]||(e[7]=[n(" Ausschalten ",-1)])),_:1,__:[7]})]),_:1})]),_:1})]),_:1})]),default:t(()=>[o(a,null,{default:t(()=>e[5]||(e[5]=[n(" Möchten Sie diese openWB wirklich ausschalten?",-1),I("br",null,null,-1),n(" Nach dem Ausschalten muss die Ladestation komplett spannungsfrei geschaltet werden. Erst beim erneuten Zuschalten der Spannung fährt das System wieder hoch. ",-1)])),_:1,__:[5]})]),_:1},8,["modelValue"])]))]),_:1,__:[8]})}]]),DashboardCard:z},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:y()})},[["render",function(w,e,f,S,u,m){const i=l("i-form-label"),a=l("i-column"),s=l("i-input"),d=l("i-row"),h=l("i-form-group"),g=l("reload-button"),r=l("reboot-button"),q=l("shutdown-button"),B=l("i-form"),v=l("i-container"),V=l("dashboard-card");return _(),c(V,{color:"primary"},{headerLeft:t(()=>e[0]||(e[0]=[n(" Status ",-1)])),default:t(()=>[o(v,null,{default:t(()=>[o(B,null,{default:t(()=>[o(d,null,{default:t(()=>[o(a,null,{default:t(()=>[o(h,null,{default:t(()=>[o(d,{class:"_margin-top:2"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[1]||(e[1]=[n(" IP-Adresse ",-1)])),_:1,__:[1]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_ip",plaintext:"","model-value":u.mqttStore.getSystemIp},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[2]||(e[2]=[n(" Systemzeit ",-1)])),_:1,__:[2]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_time",plaintext:"","model-value":u.mqttStore.getSystemTime},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[3]||(e[3]=[n(" Version ",-1)])),_:1,__:[3]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_version",plaintext:"","model-value":u.mqttStore.getSystemVersion},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[4]||(e[4]=[n(" Version (Details) ",-1)])),_:1,__:[4]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_commit",plaintext:"","model-value":u.mqttStore.getSystemCurrentCommit},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[5]||(e[5]=[n(" Entwicklungszweig ",-1)])),_:1,__:[5]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_branch",plaintext:"","model-value":u.mqttStore.getSystemBranch},null,8,["model-value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f.changesLocked?M("",!0):(_(),c(d,{key:0,class:"_margin-top:5",between:""},{default:t(()=>[o(a,null,{default:t(()=>[o(g,{block:""})]),_:1})]),_:1})),f.changesLocked?M("",!0):(_(),c(d,{key:1,between:""},{default:t(()=>[o(a,null,{default:t(()=>[o(r,{block:"",class:"_margin-top:2"})]),_:1}),o(a,null,{default:t(()=>[o(q,{block:"",class:"_margin-top:2"})]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})}]]);export{Z as default}; +import{u as y}from"./index-Rkba6Ib0.js";import{F as b,l as k,G as C,H as A}from"./vendor-fortawesome-C1Wk2aFl.js";import{_ as p}from"./vendor-inkline-S9CBmrTS.js";import{l as c,q as t,p as l,o as _,k as n,s as o,I as x,i as I,f as M}from"./vendor-Bzn5cd2Y.js";import{D as z}from"./DashboardCard-DS7AgUYm.js";k.add(C);const F=p({name:"ReloadButton",components:{FontAwesomeIcon:b},props:{},data:()=>({}),methods:{reloadDisplay(){location.reload()}}},[["render",function(w,e,f,S,u,m){const i=l("FontAwesomeIcon"),a=l("i-button");return _(),c(a,{color:"success",size:"lg",onClick:e[0]||(e[0]=s=>m.reloadDisplay())},{default:t(()=>[e[1]||(e[1]=n(" Display neu laden ",-1)),o(i,{"fixed-width":"",icon:["fas","fa-undo"]})]),_:1,__:[1]})}]]);k.add(C);const P=p({name:"RebootButton",components:{FontAwesomeIcon:b},props:{},data:()=>({mqttStore:y(),showModal:!1}),methods:{toggleModal(){this.showModal=!this.showModal},cancel(){this.toggleModal()},confirm(){this.toggleModal(),this.mqttStore.settings.parentChargePoint1!==void 0?this.$root.sendSystemCommand("chargepointReboot",{chargePoint:this.mqttStore.settings.parentChargePoint1}):this.$root.sendSystemCommand("systemReboot")}}},[["render",function(w,e,f,S,u,m){const i=l("FontAwesomeIcon"),a=l("i-container"),s=l("i-button"),d=l("i-column"),h=l("i-row"),g=l("i-modal");return _(),c(s,{color:"warning",size:"lg",onClick:e[3]||(e[3]=r=>m.toggleModal())},{default:t(()=>[e[8]||(e[8]=n(" openWB neu starten ",-1)),o(i,{"fixed-width":"",icon:["fas","fa-undo"]}),(_(),c(x,{to:"body"},[o(g,{modelValue:u.showModal,"onUpdate:modelValue":e[2]||(e[2]=r=>u.showModal=r),size:"sm"},{header:t(()=>e[4]||(e[4]=[n(" openWB neu starten... ",-1)])),footer:t(()=>[o(a,null,{default:t(()=>[o(h,null,{default:t(()=>[o(d,{class:"_text-align:right"},{default:t(()=>[o(s,{color:"success",onClick:e[0]||(e[0]=r=>m.cancel())},{default:t(()=>e[6]||(e[6]=[n(" Zurück ",-1)])),_:1,__:[6]})]),_:1}),o(d,null,{default:t(()=>[o(s,{color:"danger",onClick:e[1]||(e[1]=r=>m.confirm())},{default:t(()=>e[7]||(e[7]=[n(" Neustart ",-1)])),_:1,__:[7]})]),_:1})]),_:1})]),_:1})]),default:t(()=>[o(a,null,{default:t(()=>e[5]||(e[5]=[n(" Möchten Sie diese openWB wirklich neu starten? ",-1)])),_:1,__:[5]})]),_:1},8,["modelValue"])]))]),_:1,__:[8]})}]]);k.add(A);const Z=p({name:"StatusView",components:{ReloadButton:F,RebootButton:P,ShutdownButton:p({name:"ShutdownButton",components:{FontAwesomeIcon:b},props:{},data:()=>({mqttStore:y(),showModal:!1}),methods:{toggleModal(){this.showModal=!this.showModal},cancel(){this.toggleModal()},confirm(){this.toggleModal(),this.mqttStore.settings.parentChargePoint1!==void 0?this.$root.sendSystemCommand("chargepointShutdown",{chargePoint:this.mqttStore.settings.parentChargePoint1}):this.$root.sendSystemCommand("systemShutdown")}}},[["render",function(w,e,f,S,u,m){const i=l("FontAwesomeIcon"),a=l("i-container"),s=l("i-button"),d=l("i-column"),h=l("i-row"),g=l("i-modal");return _(),c(s,{color:"danger",size:"lg",onClick:e[3]||(e[3]=r=>m.toggleModal())},{default:t(()=>[e[8]||(e[8]=n(" openWB ausschalten ",-1)),o(i,{"fixed-width":"",icon:["fas","fa-power-off"]}),(_(),c(x,{to:"body"},[o(g,{modelValue:u.showModal,"onUpdate:modelValue":e[2]||(e[2]=r=>u.showModal=r),size:"sm"},{header:t(()=>e[4]||(e[4]=[n(" openWB ausschalten... ",-1)])),footer:t(()=>[o(a,null,{default:t(()=>[o(h,null,{default:t(()=>[o(d,{class:"_text-align:right"},{default:t(()=>[o(s,{color:"success",onClick:e[0]||(e[0]=r=>m.cancel())},{default:t(()=>e[6]||(e[6]=[n(" Zurück ",-1)])),_:1,__:[6]})]),_:1}),o(d,null,{default:t(()=>[o(s,{color:"danger",onClick:e[1]||(e[1]=r=>m.confirm())},{default:t(()=>e[7]||(e[7]=[n(" Ausschalten ",-1)])),_:1,__:[7]})]),_:1})]),_:1})]),_:1})]),default:t(()=>[o(a,null,{default:t(()=>e[5]||(e[5]=[n(" Möchten Sie diese openWB wirklich ausschalten?",-1),I("br",null,null,-1),n(" Nach dem Ausschalten muss die Ladestation komplett spannungsfrei geschaltet werden. Erst beim erneuten Zuschalten der Spannung fährt das System wieder hoch. ",-1)])),_:1,__:[5]})]),_:1},8,["modelValue"])]))]),_:1,__:[8]})}]]),DashboardCard:z},props:{changesLocked:{required:!1,type:Boolean,default:!1}},data:()=>({mqttStore:y()})},[["render",function(w,e,f,S,u,m){const i=l("i-form-label"),a=l("i-column"),s=l("i-input"),d=l("i-row"),h=l("i-form-group"),g=l("reload-button"),r=l("reboot-button"),q=l("shutdown-button"),B=l("i-form"),v=l("i-container"),V=l("dashboard-card");return _(),c(V,{color:"primary"},{headerLeft:t(()=>e[0]||(e[0]=[n(" Status ",-1)])),default:t(()=>[o(v,null,{default:t(()=>[o(B,null,{default:t(()=>[o(d,null,{default:t(()=>[o(a,null,{default:t(()=>[o(h,null,{default:t(()=>[o(d,{class:"_margin-top:2"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[1]||(e[1]=[n(" IP-Adresse ",-1)])),_:1,__:[1]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_ip",plaintext:"","model-value":u.mqttStore.getSystemIp},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[2]||(e[2]=[n(" Systemzeit ",-1)])),_:1,__:[2]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_time",plaintext:"","model-value":u.mqttStore.getSystemTime},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[3]||(e[3]=[n(" Version ",-1)])),_:1,__:[3]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_version",plaintext:"","model-value":u.mqttStore.getSystemVersion},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[4]||(e[4]=[n(" Version (Details) ",-1)])),_:1,__:[4]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_commit",plaintext:"","model-value":u.mqttStore.getSystemCurrentCommit},null,8,["model-value"])]),_:1})]),_:1}),o(d,{class:"_margin-top:1"},{default:t(()=>[o(a,{xl:"2",lg:"3",md:"4"},{default:t(()=>[o(i,null,{default:t(()=>e[5]||(e[5]=[n(" Entwicklungszweig ",-1)])),_:1,__:[5]})]),_:1}),o(a,null,{default:t(()=>[o(s,{id:"input_system_branch",plaintext:"","model-value":u.mqttStore.getSystemBranch},null,8,["model-value"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),f.changesLocked?M("",!0):(_(),c(d,{key:0,class:"_margin-top:5",between:""},{default:t(()=>[o(a,null,{default:t(()=>[o(g,{block:""})]),_:1})]),_:1})),f.changesLocked?M("",!0):(_(),c(d,{key:1,between:""},{default:t(()=>[o(a,null,{default:t(()=>[o(r,{block:"",class:"_margin-top:2"})]),_:1}),o(a,null,{default:t(()=>[o(q,{block:"",class:"_margin-top:2"})]),_:1})]),_:1}))]),_:1})]),_:1})]),_:1})}]]);export{Z as default}; diff --git a/packages/modules/display_themes/cards/web/assets/index-C0J-ZJ88.js b/packages/modules/display_themes/cards/web/assets/index-Rkba6Ib0.js similarity index 98% rename from packages/modules/display_themes/cards/web/assets/index-C0J-ZJ88.js rename to packages/modules/display_themes/cards/web/assets/index-Rkba6Ib0.js index e03ca0aaeb..52e64ccc45 100644 --- a/packages/modules/display_themes/cards/web/assets/index-C0J-ZJ88.js +++ b/packages/modules/display_themes/cards/web/assets/index-Rkba6Ib0.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardView-Ch-ScCyj.js","assets/DashboardCard-DS7AgUYm.js","assets/vendor-inkline-S9CBmrTS.js","assets/vendor-Bzn5cd2Y.js","assets/vendor-inkline-BxOXWZNy.css","assets/DashboardCard-Cy_vzq6d.css","assets/ChargePointPlugBadge-Dsdv-7Vn.js","assets/vendor-fortawesome-C1Wk2aFl.js","assets/ChargePointPlugBadge-HWp2u3dG.css","assets/DashboardView-BYiJMWFT.css","assets/EnergyFlowView-C1Dw5jS1.js","assets/ChargeModeModal-CNWdoEpw.js","assets/ChargeModeModal-CGs_z8ao.css","assets/EnergyFlowView-BOyDZ-Ju.css","assets/ChargePointsView-InJz5_Tj.js","assets/ChargePointsView-BF43Lifc.css","assets/StatusView-9xI7RUa0.js"])))=>i.map(i=>d[i]); -import{e as P,k as f,j as V,x as k,F as S,o as p,i as W,H as F,l as C,q as c,p as h,f as w,s,A as D,I as E,z as A,R as H,J as R,K as U,L as z,M as G,N as K}from"./vendor-Bzn5cd2Y.js";import{_ as b,I as J,c as Y}from"./vendor-inkline-S9CBmrTS.js";import{l as $,f as L,a as q,F as O,b as Z,c as Q}from"./vendor-fortawesome-C1Wk2aFl.js";(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const o of document.querySelectorAll('link[rel="modulepreload"]'))t(o);new MutationObserver(o=>{for(const n of o)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&t(a)}).observe(document,{childList:!0,subtree:!0})}function t(o){if(o.ep)return;o.ep=!0;const n=function(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}(o);fetch(o.href,n)}})();const X=b({name:"DateTime",data:()=>({dateTimeInterval:"",date:"",time:""}),mounted(){this.update(),this.dateTimeInterval=setInterval(this.update,1e3)},beforeUnmount(){clearInterval(this.dateTimeInterval)},methods:{update(){const e=new Date;this.date=e.toLocaleDateString(void 0,{weekday:"short",year:"numeric",month:"2-digit",day:"2-digit"}),this.time=e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}},[["render",function(e,t,o,n,a,i){return p(),P(S,null,[f(k(a.time),1),V(e.$slots,"default",{},()=>[t[0]||(t[0]=W("br",null,null,-1))]),f(k(a.date),1)],64)}]]),B=F("mqtt",{state:()=>({settings:{localIp:void 0,localBranch:void 0,localCommit:void 0,localVersion:void 0,parentChargePoint1:void 0,parentChargePoint2:void 0},topics:{},chartData:{}}),getters:{getChargePointFilter:e=>{let t=[];return e.settings.parentChargePoint1!==void 0&&t.push(e.settings.parentChargePoint1),e.settings.parentChargePoint2!==void 0&&t.push(e.settings.parentChargePoint2),t},getWildcardIndexList:e=>(t,o=!1)=>{let n=t;o||(n="^"+t.replaceAll("/","\\/").replaceAll("+","[^+/]+").replaceAll("#","[^#/]+")+"$");let a=Object.keys(e.topics).filter(i=>i.match(n));return a.forEach((i,r,l)=>{l[r]=parseInt(i.match(/(?:\/)([0-9]+)(?=\/)*/g)[0].replace(/[^0-9]+/g,""))}),a},getWildcardTopics:e=>(t,o=!1)=>{let n=t;return o||(n="^"+t.replaceAll("/","\\/").replaceAll("+","[^+/]+").replaceAll("#","[^#/]+")+"$"),Object.keys(e.topics).filter(a=>a.match(n)).reduce((a,i)=>({...a,[i]:e.topics[i]}),{})},getObjectIds:e=>t=>function o(n){let a=[];return n!==void 0&&n.forEach(i=>{i.type==t&&a.push(i.id),a=[...a,...o(i.children)]}),a}(e.topics["openWB/counter/get/hierarchy"]),getValueBool:e=>(t,o=!1)=>{let n=e.topics[t];return n!==void 0?n:o},getValueString:e=>(t,o="W",n="",a=!0,i=!1,r="---",l=void 0)=>{var g=!1,d=e.topics[t];if(d===void 0||l!==void 0&&d[l]===void 0)m=r;else{l!==void 0&&(d=d[l]),i&&(d*=-1);for(var m=d.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),u=d;a&&(u>999||u<-999);)switch(u/=1e3,g=!0,n){case"":n="k";break;case"k":n="M";break;case"M":n="G"}m=u.toLocaleString(void 0,{minimumFractionDigits:g?2:0,maximumFractionDigits:g?2:0})}return{textValue:`${m} ${n}${o}`,value:d,unit:o,scaledValue:u,scaledUnit:`${n}${o}`}},getChartData:e=>t=>e.chartData[t]===void 0?[]:e.chartData[t],getDisplayStandby:e=>e.topics["openWB/optional/int_display/standby"],getThemeConfiguration:e=>{if("openWB/optional/int_display/theme"in e.topics&&e.topics["openWB/optional/int_display/theme"]!==void 0&&"configuration"in e.topics["openWB/optional/int_display/theme"])return e.topics["openWB/optional/int_display/theme"].configuration},getDefaultView:e=>{if(e.getThemeConfiguration){const t={dashboard:e.getThemeConfiguration.enable_dashboard_view,"energy-flow":e.getThemeConfiguration.enable_energy_flow_view,"charge-points":e.getThemeConfiguration.enable_charge_points_view,status:e.getThemeConfiguration.enable_status_view};if(e.getThemeConfiguration.default_view!==void 0&&t[e.getThemeConfiguration.default_view]===!0)return e.getThemeConfiguration.default_view;for(const[o,n]of Object.entries(t))if(n)return o}},getDefaultViewTimeout:e=>e.getThemeConfiguration?e.getThemeConfiguration.default_view_timeout:0,getDashboardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_view,getEnergyFlowEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_energy_flow_view,getChargePointsEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_charge_points_view,getStateEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_status_view,getGridCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_grid,getHomeCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_home_consumption,getBatteryCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_battery_sum,getChargePointsCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_charge_point_sum,getPvCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_inverter_sum,getLockChanges:e=>!e.getThemeConfiguration||e.getThemeConfiguration.lock_changes,getSimpleChargePointView:e=>!!e.getThemeConfiguration&&e.getThemeConfiguration.simple_charge_point_view,getGridId(e){let t=e.topics["openWB/counter/get/hierarchy"];if(t!==void 0&&Object.keys(t).length>0){let o=Object.keys(e.topics["openWB/counter/get/hierarchy"])[0];if(e.topics["openWB/counter/get/hierarchy"][o].type=="counter")return e.topics["openWB/counter/get/hierarchy"][o].id}},getGridPower:e=>(t="textValue")=>{let o=e.getGridId;if(o===void 0)return"---";let n=e.getValueString(`openWB/counter/${o}/get/power`,"W");return Object.hasOwnProperty.call(n,t)?n[t]:t=="object"?n:void 0},getGridPowerChartData(e){let t=e.getGridId;return t===void 0?[]:e.getChartData(`openWB/counter/${t}/get/power`)},getHomePower:e=>(t="textValue")=>{let o=e.getValueString("openWB/counter/set/home_consumption","W");return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getHomePowerChartData:e=>e.getChartData("openWB/counter/set/home_consumption"),getBatteryConfigured:e=>e.getValueBool("openWB/bat/config/configured"),getBatteryPower:e=>(t="textValue")=>{let o=e.getValueString("openWB/bat/get/power","W");return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getBatteryPowerChartData:e=>e.getChartData("openWB/bat/get/power"),getBatterySoc:e=>(t="textValue")=>{let o=e.getValueString("openWB/bat/get/soc","%","",!1);return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getBatterySocChartData:e=>e.getChartData("openWB/bat/get/soc"),getPvConfigured:e=>e.getValueBool("openWB/pv/config/configured"),getPvPower:e=>(t="textValue")=>{var o=e.getValueString("openWB/pv/get/power","W","",!0,!0);return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getPvPowerChartData:e=>e.getChartData("openWB/pv/get/power").map(t=>-1*t),getChargePointSumPower:e=>(t="textValue")=>{var o=e.getValueString("openWB/chargepoint/get/power","W");return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getChargePointSumPowerChartData:e=>e.getChartData("openWB/chargepoint/get/power"),getChargePointIds(e){let t=e.getObjectIds("cp"),o=this.getChargePointFilter;return o.length>0?t.filter(n=>o.includes(n)):t},getChargePointName:e=>t=>e.topics[`openWB/chargepoint/${t}/config`]!==void 0?e.topics[`openWB/chargepoint/${t}/config`].name:"---",getChargePointPower:e=>(t,o="textValue")=>{var n=e.getValueString(`openWB/chargepoint/${t}/get/power`,"W");return Object.hasOwnProperty.call(n,o)?n[o]:o=="object"?n:void 0},getChargePointImportedSincePlugged:e=>t=>({energy:e.getValueString(`openWB/chargepoint/${t}/set/log`,"Wh","",!0,!1,"---","imported_since_plugged").textValue,range:e.getValueString(`openWB/chargepoint/${t}/set/log`,"m","k",!1,!1,"---","range_charged").textValue}),getChargePointPowerChartData:e=>t=>e.getChartData(`openWB/chargepoint/${t}/get/power`),getChargePointSetCurrent:e=>(t,o="textValue")=>{let n=e.getValueString(`openWB/chargepoint/${t}/set/current`,"A");return Object.hasOwnProperty.call(n,o)?n[o]:o=="object"?n:void 0},getChargePointPhasesInUse:e=>t=>{const o=["/","①","②","③"],n=e.topics[`openWB/chargepoint/${t}/get/phases_in_use`];return n!==void 0&&n>=0&&nt=>e.getValueBool(`openWB/chargepoint/${t}/get/plug_state`),getChargePointChargeState:e=>t=>e.getValueBool(`openWB/chargepoint/${t}/get/charge_state`),getChargePointManualLock:e=>t=>e.getValueBool(`openWB/chargepoint/${t}/set/manual_lock`),getChargepointTagState:e=>t=>[void 0,null,""].includes(e.topics[`openWB/chargepoint/${t}/set/rfid`])?[void 0,null,""].includes(e.topics[`openWB/chargepoint/${t}/get/rfid`])?0:1:2,getChargePointConnectedVehicleConfig:e=>t=>e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/config`],getChargePointConnectedVehicleChargeMode:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.translateChargeMode(e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.selected)},getChargePointConnectedVehiclePriority:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).prio},getChargePointConnectedVehicleInfo:e=>t=>e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/info`],getChargePointConnectedVehicleId:e=>t=>{if(e.getChargePointConnectedVehicleInfo(t))return e.getChargePointConnectedVehicleInfo(t).id},getChargePointConnectedVehicleChargeTemplateIndex:e=>t=>{if(e.getChargePointConnectedVehicleConfig(t))return e.getChargePointConnectedVehicleConfig(t).charge_template},getChargePointConnectedVehicleChargeTemplate:e=>t=>e.topics[`openWB/chargepoint/${t}/set/charge_template`],getChargePointConnectedVehicleEvTemplate:e=>t=>{if(e.getChargePointConnectedVehicleConfig(t))return e.getChargePointConnectedVehicleConfig(t).ev_template},getChargePointConnectedVehicleName:e=>t=>{if(e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/info`])return e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/info`].name},getChargePointConnectedVehicleSoc:e=>t=>e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/soc`],getChargePointConnectedVehicleTimeChargingActive:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).time_charging.active},getChargePointConnectedVehicleTimeChargingRunning:e=>t=>{let o=e.getChargePointConnectedVehicleConfig(t).time_charging_in_use;return o!==void 0&&o},getChargePointConnectedVehicleInstantChargingCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.instant_charging.current},getChargePointConnectedVehicleInstantChargingLimit:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.instant_charging.limit:{selected:void 0},getChargePointConnectedVehicleInstantChargingPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.instant_charging.phases_to_use},getChargePointConnectedVehiclePvChargingFeedInLimit:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.feed_in_limit},getChargePointConnectedVehiclePvChargingMinCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.min_current},getChargePointConnectedVehiclePvChargingPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.phases_to_use},getChargePointConnectedVehiclePvChargingLimit:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.limit:{selected:void 0},getChargePointConnectedVehiclePvChargingMinSoc:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.min_soc},getChargePointConnectedVehiclePvChargingMinSocCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.min_soc_current},getChargePointConnectedVehiclePvChargingMinSocPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.phases_to_use_min_soc},getChargePointConnectedVehicleEcoChargingCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.current},getChargePointConnectedVehicleEcoChargingPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.phases_to_use},getChargePointConnectedVehicleEcoChargingLimit:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.limit:{selected:void 0},getChargePointConnectedVehicleEcoChargingMaxPrice:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return 1e5*e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.max_price},getChargePointConnectedVehicleScheduledChargingPlans:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.scheduled_charging.plans:{},getChargePointConnectedVehicleTimeChargingPlans:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).time_charging.plans:{},getVehicleList:e=>e.getWildcardTopics("openWB/vehicle/+/name"),getVehicleName:e=>t=>e.topics[`openWB/vehicle/${t}/name`],getVehicleSocConfigured:e=>t=>e.topics[`openWB/vehicle/${t}/soc_module/config`].type!=null,getVehicleSocIsManual:e=>t=>e.topics[`openWB/vehicle/${t}/soc_module/config`].type=="manual",getVehicleFaultState:e=>t=>e.topics[`openWB/vehicle/${t}/get/fault_state`]?e.topics[`openWB/vehicle/${t}/get/fault_state`]:0,getSystemTime(e){if(e.topics["openWB/system/time"])return new Date(1e3*e.topics["openWB/system/time"]).toLocaleString()},getSystemIp:e=>e.settings.localIp!==void 0?e.settings.localIp:e.topics["openWB/system/ip_address"]?e.topics["openWB/system/ip_address"]:void 0,getSystemVersion:e=>e.settings.localVersion!==void 0?e.settings.localVersion:e.topics["openWB/system/version"]?e.topics["openWB/system/version"]:void 0,getSystemBranch:e=>e.settings.localBranch!==void 0?e.settings.localBranch:e.topics["openWB/system/current_branch"]?e.topics["openWB/system/current_branch"]:void 0,getSystemCurrentCommit:e=>e.settings.localCommit!==void 0?e.settings.localCommit:e.topics["openWB/system/current_commit"]?e.topics["openWB/system/current_commit"]:void 0,getRfidEnabled(){return this.getValueBool("openWB/optional/rfid/active")},getEtConfigured:e=>e.topics["openWB/optional/et/provider"]!==void 0&&e.topics["openWB/optional/et/provider"].type!==null,getEtPrices:e=>e.topics["openWB/optional/et/get/prices"]},actions:{updateSetting(e,t){e in this.settings&&(this.settings[e]=t)},initTopic(e,t=void 0){e.includes("#")||e.includes("+")||this.addTopic(e,t)},addTopic(e,t){this.topics[e]=t},removeTopic(e){e.includes("#")||e.includes("+")?Object.keys(this.getWildcardTopics(e)).forEach(t=>{delete this.topics[t]}):delete this.topics[e]},updateTopic(e,t,o=void 0){return e in this.topics?(o!=null?(n=this.topics[e],i=t,(a=o).split(".").reduce((r,l,g)=>r[l]=a.split(".").length===++g?i:r[l]||{},n)):this.topics[e]=t,this.topics[e]):void 0;var n,a,i},updateChartData(){for(const[e,t]of Object.entries(this.topics))(e.endsWith("home_consumption")||e.endsWith("power")||e.endsWith("soc"))&&(this.chartData[e]===void 0&&(this.chartData[e]=[]),t!=null&&(this.chartData[e].push(t),this.chartData[e].slice(-128)))},updateState(e,t,o=void 0){return this.updateTopic(e,t,o)},chargeModeList(){var e=[{id:"instant_charging"},{id:"pv_charging"},{id:"scheduled_charging"},{id:"eco_charging"},{id:"stop"}];return e.forEach(t=>{t.label=this.translateChargeMode(t.id).label,t.class=this.translateChargeMode(t.id).class}),e},translateChargeMode(e){switch(e){case"instant_charging":return{mode:e,label:"Sofort",class:"danger"};case"pv_charging":return{mode:e,label:"PV",class:"success"};case"scheduled_charging":return{mode:e,label:"Ziel",class:"primary"};case"time_charging":return{mode:e,label:"Zeit",class:"warning"};case"eco_charging":return{mode:e,label:"Eco",class:"secondary"};case"stop":return{mode:e,label:"Stop",class:"dark"};default:return{mode:e,label:e,class:e}}},checkChangesLockCode(e){return!(!this.getThemeConfiguration||this.getThemeConfiguration.lock_changes_code!=e)},formatDate:(e,t={year:"numeric",month:"2-digit",day:"2-digit"})=>new Date(e).toLocaleDateString(void 0,t),formatDateRange(e,t="-"){const o={year:"numeric",month:"2-digit",day:"2-digit"};let n={day:"2-digit"};const a=new Date(e[0]),i=new Date(e[1]);return a.getFullYear()==i.getFullYear()?(t=`.${t}`,a.getMonth()!=i.getMonth()&&(n.month=o.month)):n=o,`${this.formatDate(e[0],n)}${t}${this.formatDate(e[1],o)}`},formatWeeklyScheduleDays(e){const t=["Mo","Di","Mi","Do","Fr","Sa","So"];let o=[],n=null;return e.forEach((a,i)=>{a?n===null&&(n=i):n!==null&&(n===i-1?o.push(t[n]):o.push(`${t[n]}-${t[i-1]}`),n=null)}),n!==null&&(n===e.length-1?o.push(t[n]):o.push(`${t[n]}-${t[e.length-1]}`)),o.join(", ")}}}),ee=b({name:"NavBar",components:{NavItem:b({name:"NavItem",props:{to:{type:Object,required:!0}}},[["render",function(e,t,o,n,a,i){const r=h("i-nav-item");return p(),C(r,{to:o.to,"active-class":"-active",class:"_border _border-color:primary _text-align:center"},{default:c(()=>[V(e.$slots,"default",{},void 0,!0)]),_:3},8,["to"])}],["__scopeId","data-v-1db6ae73"]])},data:()=>({mqttStore:B()})},[["render",function(e,t,o,n,a,i){const r=h("nav-item"),l=h("i-nav");return p(),C(l,{vertical:"",class:"_align-items:stretch",size:"lg"},{default:c(()=>[a.mqttStore.getDashboardEnabled?(p(),C(r,{key:0,to:{name:"dashboard"}},{default:c(()=>t[0]||(t[0]=[f(" Übersicht ",-1)])),_:1,__:[0]})):w("",!0),a.mqttStore.getEnergyFlowEnabled?(p(),C(r,{key:1,to:{name:"energy-flow"}},{default:c(()=>t[1]||(t[1]=[f(" Energiefluss ",-1)])),_:1,__:[1]})):w("",!0),a.mqttStore.getChargePointsEnabled&&a.mqttStore.getChargePointIds.length>0?(p(),C(r,{key:2,to:{name:"charge-points"}},{default:c(()=>t[2]||(t[2]=[f(" Ladepunkte ",-1)])),_:1,__:[2]})):w("",!0),a.mqttStore.getStateEnabled?(p(),C(r,{key:3,to:{name:"status"}},{default:c(()=>t[3]||(t[3]=[f(" Status ",-1)])),_:1,__:[3]})):w("",!0)]),_:1})}]]);$.add(L,q);const te=b({name:"NumberPad",components:{FontAwesomeIcon:O},emits:["key:digit","key:clear","key:delete"],data:()=>({buttonRows:[[{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"}],[{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6"}],[{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"}]]}),methods:{emitDigit(e){this.$emit("key:digit",e)},emitClear(){this.$emit("key:clear")},emitDelete(){this.$emit("key:delete")}}},[["render",function(e,t,o,n,a,i){const r=h("i-button"),l=h("i-column"),g=h("i-row"),d=h("FontAwesomeIcon"),m=h("i-container");return p(),C(m,null,{default:c(()=>[(p(!0),P(S,null,D(a.buttonRows,u=>(p(),C(g,{key:u,center:"",class:"_padding-bottom:1"},{default:c(()=>[(p(!0),P(S,null,D(u,_=>(p(),C(l,{key:_.value,class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:v=>i.emitDigit(_.value)},{default:c(()=>[f(k(_.label),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:2},1024))),128)),s(g,{center:""},{default:c(()=>[s(l,{class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:t[0]||(t[0]=u=>i.emitClear())},{default:c(()=>[s(d,{"fixed-width":"",icon:["fas","fa-eraser"]})]),_:1})]),_:1}),s(l,{class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:t[1]||(t[1]=u=>i.emitDigit("0"))},{default:c(()=>t[3]||(t[3]=[f(" 0 ",-1)])),_:1,__:[3]})]),_:1}),s(l,{class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:t[2]||(t[2]=u=>i.emitDelete())},{default:c(()=>[s(d,{"fixed-width":"",icon:["fas","fa-delete-left"]})]),_:1})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-4e2103db"]]),oe=b({name:"CodeInputModal",components:{NumberPad:te},props:{modelValue:{type:Boolean,required:!0},backgroundColor:{type:String,default:"warning"},placeholderCharacter:{type:String,default:"*",validator:e=>e.length==1},inputVisible:{type:Boolean,default:!1},minLength:{type:Number,default:4},maxLength:{type:Number,default:4}},emits:["update:modelValue","update:inputValue"],data(){return{number:"",modalBackground:this.backgroundColor}},computed:{placeholder(){return this.placeholderCharacter.repeat(this.minLength)},enableSubmit(){return this.number.length>=this.minLength&&this.number.length<=this.maxLength}},watch:{modelValue(e,t){e===!1&&t===!0&&this.clear()}},methods:{abort(){this.$emit("update:modelValue",!1)},addDigit(e){this.number.length{this.$emit("update:modelValue",!1),this.modalBackground=this.backgroundColor},500)},error(e="danger"){this.modalBackground=e,setTimeout(()=>{this.clear(),this.modalBackground=this.backgroundColor},2e3)}}},[["render",function(e,t,o,n,a,i){const r=h("i-input"),l=h("i-column"),g=h("i-row"),d=h("NumberPad"),m=h("i-container"),u=h("i-button"),_=h("i-modal");return p(),C(E,{to:"body"},[s(_,{"model-value":o.modelValue,color:a.modalBackground,"onUpdate:modelValue":t[4]||(t[4]=v=>e.$emit("update:modelValue",v))},{header:c(()=>[V(e.$slots,"header",{},()=>[t[5]||(t[5]=f(" **HEADER** ",-1))])]),footer:c(()=>[s(m,null,{default:c(()=>[s(g,null,{default:c(()=>[s(l,null,{default:c(()=>[s(u,{color:"danger",onClick:i.abort},{default:c(()=>[V(e.$slots,"abort",{},()=>[t[6]||(t[6]=f(" Zurück ",-1))])]),_:3},8,["onClick"])]),_:3}),s(l,{class:"_text-align:right"},{default:c(()=>[i.enableSubmit?(p(),C(u,{key:0,color:"success",onClick:i.submit},{default:c(()=>[V(e.$slots,"submit",{},()=>[t[7]||(t[7]=f(" OK ",-1))])]),_:3},8,["onClick"])):w("",!0)]),_:3})]),_:3})]),_:3})]),default:c(()=>[s(m,null,{default:c(()=>[s(g,{center:"",class:"_padding-bottom:1"},{default:c(()=>[s(l,null,{default:c(()=>[s(r,{modelValue:a.number,"onUpdate:modelValue":t[0]||(t[0]=v=>a.number=v),placeholder:i.placeholder,readonly:"",size:"lg",type:o.inputVisible?"text":"password",class:"_text-align:center"},null,8,["modelValue","placeholder","type"])]),_:1})]),_:1}),s(d,{"onKey:digit":t[1]||(t[1]=v=>i.addDigit(v)),"onKey:clear":t[2]||(t[2]=v=>i.clear()),"onKey:delete":t[3]||(t[3]=v=>i.removeDigit(v))})]),_:1})]),_:3},8,["model-value","color"])])}]]);$.add(Z,Q,L,q);const ne={key:0,class:"_padding-left:1"},x="/openWB/web/display/themes/cards/openWB_logo_dark.png",ie=b({name:"OpenwbDisplayCardsApp",components:{RouterView:H,DateTime:X,NavBar:ee,LockNavItem:b({name:"LockNavItem",components:{FontAwesomeIcon:O,CodeInputModal:oe},props:{},data:()=>({mqttStore:B(),modalPinEntryVisible:!1,modalPinEntryColor:"warning",code:"",countdown:0,countdownInterval:void 0,events:["mousemove","touchmove","wheel","click"]}),computed:{changesLocked:{get(){return this.mqttStore.settings.changesLocked},set(e){this.mqttStore.settings.changesLocked=e}},timer(){return Math.trunc(this.countdown/60).toString()+":"+(this.countdown%60).toString().padStart(2,"0")}},mounted(){this.changesLocked=!0},methods:{toggleChangesLock(){this.changesLocked?this.unlockChanges():this.lockChanges()},unlockChanges(){this.modalPinEntryVisible=!0},checkUnlockCode(e){this.mqttStore.checkChangesLockCode(e)?(this.$refs.lockInput.success("success"),this.changesLocked=!1,this.mqttStore.getDisplayStandby>0&&(this.countdown=this.mqttStore.getDisplayStandby,this.countdownInterval=setInterval(this.updateCountdown,1e3),this.events.forEach(t=>{document.addEventListener(t,this.handleDocumentEvent,{passive:!0})}))):this.$refs.lockInput.error("danger")},lockChanges(){this.changesLocked=!0,this.events.forEach(e=>{document.removeEventListener(e,this.handleDocumentEvent,{passive:!0})}),this.countdownInterval!==void 0&&(clearInterval(this.countdownInterval),this.countdownInterval=void 0)},updateCountdown(){this.countdown-=1,this.countdown<1&&this.lockChanges()},handleDocumentEvent(){this.countdown=this.mqttStore.getDisplayStandby}}},[["render",function(e,t,o,n,a,i){const r=h("FontAwesomeIcon"),l=h("i-button"),g=h("CodeInputModal");return p(),P(S,null,[a.mqttStore.getLockChanges?(p(),C(l,{key:0,class:"_padding-left:0 _padding-right:0 _margin-bottom:1",size:"lg",block:"",color:i.changesLocked?"danger":"success",onClick:t[0]||(t[0]=d=>i.toggleChangesLock())},{default:c(()=>[s(r,{"fixed-width":"",icon:i.changesLocked?["fas","fa-lock"]:["fas","fa-lock-open"],class:A(i.changesLocked?"_color:danger-80":"_color:success-80")},null,8,["icon","class"]),!i.changesLocked&&a.countdownInterval?(p(),P("span",ne,k(i.timer),1)):w("",!0)]),_:1},8,["color"])):w("",!0),s(g,{ref:"lockInput",modelValue:a.modalPinEntryVisible,"onUpdate:modelValue":t[1]||(t[1]=d=>a.modalPinEntryVisible=d),"min-length":4,"max-length":10,"onUpdate:inputValue":i.checkUnlockCode},{header:c(()=>t[2]||(t[2]=[f(" Bitte den PIN zur Freigabe von Änderungen eingeben. ",-1)])),_:1},8,["modelValue","onUpdate:inputValue"])],64)}]]),TouchBlocker:b({name:"TouchBlocker",data:()=>({mqttStore:B(),show:!1,touchBlockerCountdown:void 0,touchBlockerCountdownInterval:void 0,defaultViewCountdown:void 0,defaultViewCountdownInterval:void 0,events:["mousemove","touchmove","wheel","click"],eventHandlerSetup:!1}),computed:{configuredDisplayStandby(){if(this.mqttStore.getDisplayStandby!==0&&this.mqttStore.getDisplayStandby!==void 0)return this.mqttStore.getDisplayStandby},configuredDefaultViewTimeout(){if(this.mqttStore.getDefaultViewTimeout!==0&&this.mqttStore.getDefaultViewTimeout!==void 0)return this.mqttStore.getDefaultViewTimeout},touchBlockerTimeout(){return Math.max(this.configuredDisplayStandby-3,1)},defaultViewTimeout(){return this.configuredDefaultViewTimeout}},mounted(){this.setupEventHandler(),this.setupTouchBlockerTimeout(),this.setupDefaultViewTimeout()},unmounted(){this.clearEventHandler(),this.clearTouchBlockerTimeout(),this.clearDefaultViewTimeout()},methods:{handleTouchBlockerClick(e){e===!1&&(this.show=!1,this.setupEventHandler(),this.setupTouchBlockerTimeout(),this.setupDefaultViewTimeout())},setupEventHandler(){this.eventHandlerSetup||(this.events.forEach(e=>{document.addEventListener(e,this.handleDocumentEvent,{passive:!0})}),this.eventHandlerSetup=!0)},clearEventHandler(){this.eventHandlerSetup&&(this.events.forEach(e=>{document.removeEventListener(e,this.handleDocumentEvent,{passive:!0})}),this.eventHandlerSetup=!1)},setupTouchBlockerTimeout(){this.touchBlockerCountdownCountdownInterval===void 0&&(this.touchBlockerCountdownCountdownInterval=setInterval(this.updateTouchBlockerCountdown,1e3))},clearTouchBlockerTimeout(){this.touchBlockerCountdownCountdownInterval!==void 0&&(clearInterval(this.touchBlockerCountdownCountdownInterval),this.touchBlockerCountdownCountdownInterval=void 0)},updateTouchBlockerCountdown(){this.touchBlockerCountdown===void 0?this.touchBlockerCountdown=this.touchBlockerTimeout:(this.touchBlockerCountdown-=1,this.touchBlockerCountdown<1&&this.showTouchBlocker())},setupDefaultViewTimeout(){this.defaultViewCountdownInterval===void 0&&this.mqttStore.getDefaultView!==this.$route.name&&this.defaultViewTimeout!==void 0&&(this.defaultViewCountdownInterval=setInterval(this.updateDefaultViewCountdown,1e3))},clearDefaultViewTimeout(){this.defaultViewCountdownInterval!==void 0&&(clearInterval(this.defaultViewCountdownInterval),this.defaultViewCountdownInterval=void 0)},updateDefaultViewCountdown(){this.defaultViewCountdown===void 0&&this.defaultViewTimeout!==void 0?this.defaultViewCountdown=this.defaultViewTimeout:this.$route.name===this.mqttStore.getDefaultView?this.clearDefaultViewTimeout():(this.defaultViewCountdown-=1,this.defaultViewCountdown<1&&this.showDefaultView())},handleDocumentEvent(){this.touchBlockerCountdown=this.touchBlockerTimeout,this.defaultViewCountdown=this.defaultViewTimeout,this.setupDefaultViewTimeout(),this.show=!1},showTouchBlocker(){this.show=!0,this.clearTouchBlockerTimeout()},showDefaultView(){this.clearDefaultViewTimeout(),this.$route.name!==this.mqttStore.getDefaultView&&this.$router.push({name:this.mqttStore.getDefaultView})}}},[["render",function(e,t,o,n,a,i){const r=h("IModal");return p(),C(E,{to:"body"},[s(r,{class:"touch-blocker",size:"sm",color:"dark","model-value":a.show,"onUpdate:modelValue":t[0]||(t[0]=l=>i.handleTouchBlockerClick(l))},{default:c(()=>t[1]||(t[1]=[W("img",{class:"logo",src:x},null,-1),W("p",null," Bitte das Display berühren. ",-1)])),_:1,__:[1]},8,["model-value"])])}],["__scopeId","data-v-2d58d6dd"]])},data:()=>({client:{connected:!1},connection:{protocol:location.protocol=="https:"?"wss":"ws",host:location.hostname,port:parseInt(location.port)||(location.protocol=="https:"?443:80),endpoint:"/ws",connectTimeout:4e3,reconnectPeriod:4e3},mqttTopicsToSubscribe:["openWB/bat/config/configured","openWB/bat/get/power","openWB/bat/get/soc","openWB/chargepoint/+/config","openWB/chargepoint/+/get/charge_state","openWB/chargepoint/+/get/connected_vehicle/+","openWB/chargepoint/+/set/charge_template","openWB/chargepoint/+/set/charge_template/chargemode/scheduled_charging/plans/+","openWB/chargepoint/+/set/charge_template/time_charging/plans/+","openWB/chargepoint/+/get/phases_in_use","openWB/chargepoint/+/get/plug_state","openWB/chargepoint/+/get/power","openWB/chargepoint/+/get/rfid","openWB/chargepoint/+/set/current","openWB/chargepoint/+/set/manual_lock","openWB/chargepoint/+/set/log","openWB/chargepoint/+/set/rfid","openWB/chargepoint/get/power","openWB/counter/+/get/power","openWB/counter/get/hierarchy","openWB/counter/set/home_consumption","openWB/optional/et/provider","openWB/optional/et/get/prices","openWB/optional/int_display/theme","openWB/optional/int_display/standby","openWB/optional/rfid/active","openWB/pv/config/configured","openWB/pv/get/power","openWB/system/current_branch","openWB/system/current_commit","openWB/system/ip_address","openWB/system/time","openWB/system/version","openWB/vehicle/+/get/fault_state","openWB/vehicle/+/name","openWB/vehicle/+/soc_module/config"],mqttStore:B(),chartInterval:"",clearConsoleHandler:void 0}),computed:{changesLocked(){return this.mqttStore.getLockChanges&&this.mqttStore.settings.changesLocked}},created(){this.createConnection()},mounted(){let e=window.location.search;if(e!=""){let n=new URLSearchParams(e);if(n.has("data")){let a=JSON.parse(n.get("data"));Object.entries(a).forEach(([i,r])=>{i.startsWith("parentChargePoint")?this.mqttStore.updateSetting(i,parseInt(r)):this.mqttStore.updateSetting(i,r)})}}this.doSubscribe(this.mqttTopicsToSubscribe),this.chartInterval=setInterval(this.mqttStore.updateChartData,5e3);const t=new Date,o=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1,0,0,0,0).getTime()-t.getTime();this.clearConsoleHandler=setTimeout(()=>this.clearConsole(),o)},beforeUnmount(){this.doUnsubscribe(this.mqttTopicsToSubscribe),clearInterval(this.chartInterval),clearTimeout(this.clearConsoleHandler)},methods:{clearConsole(){this.clearConsoleHandler=setTimeout(()=>this.clearConsole(),864e5)},createConnection(){const{protocol:e,host:t,port:o,endpoint:n,...a}=this.connection,i=`${e}://${t}:${o}${n}`;try{this.client=R.connect(i,a)}catch{}this.client.on("connect",()=>{}),this.client.on("error",r=>{}),this.client.on("message",(r,l)=>{if(l.toString().length>0){let g;try{g=JSON.parse(l.toString())}catch{g=l.toString()}this.mqttStore.addTopic(r,g)}else this.mqttStore.removeTopic(r)})},doSubscribe(e){e.forEach(t=>{this.mqttStore.initTopic(t)}),this.client.subscribe(e,{},t=>{})},doUnsubscribe(e){e.forEach(t=>{this.mqttStore.removeTopic(t)}),this.client.unsubscribe(e,t=>{})},doPublish(e,t,o=!0,n=2){let a={qos:n,retain:o};this.client.publish(e,JSON.stringify(t),a,i=>{})},sendTopicToBroker(e,t=void 0){let o=e.replace("openWB/","openWB/set/");t===void 0&&(t=this.mqttStore.topics[e]),this.doPublish(o,t)},sendCommand(e){this.doPublish("openWB/set/command/"+this.client.options.clientId+"/todo",e,!1)},sendSystemCommand(e,t={}){this.sendCommand({command:e,data:t})}}},[["render",function(e,t,o,n,a,i){const r=h("DateTime"),l=h("i-column"),g=h("i-row"),d=h("i-container"),m=h("LockNavItem"),u=h("NavBar"),_=h("TouchBlocker"),v=h("i-layout-aside"),j=h("RouterView"),M=h("i-layout-content"),N=h("i-layout");return p(),C(N,{vertical:""},{default:c(()=>[s(v,{class:"_position:fixed"},{default:c(()=>[s(d,{fluid:"",class:"_margin-bottom:1"},{default:c(()=>[s(g,{center:""},{default:c(()=>[s(l,null,{default:c(()=>[s(r)]),_:1})]),_:1})]),_:1}),s(m),s(u,{"changes-locked":i.changesLocked},null,8,["changes-locked"]),s(_)]),_:1}),s(M,null,{default:c(()=>[s(j,{"changes-locked":i.changesLocked},null,8,["changes-locked"])]),_:1})]),_:1})}],["__scopeId","data-v-6f8bc44f"]]),I={},T=function(e,t,o){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),r=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));n=Promise.allSettled(t.map(l=>{if((l=function(u){return"/openWB/web/display/themes/cards/"+u}(l))in I)return;I[l]=!0;const g=l.endsWith(".css"),d=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");return m.rel=g?"stylesheet":"modulepreload",g||(m.as="script"),m.crossOrigin="",m.href=l,r&&m.setAttribute("nonce",r),document.head.appendChild(m),g?new Promise((u,_)=>{m.addEventListener("load",u),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${l}`)))}):void 0}))}function a(i){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=i,window.dispatchEvent(r),!r.defaultPrevented)throw i}return n.then(i=>{for(const r of i||[])r.status==="rejected"&&a(r.reason);return e().catch(a)})},ae=b({name:"WelcomeView",data:()=>({mqttStore:B()}),mounted(){setTimeout(this.selectFirstRoute,3e3)},methods:{selectFirstRoute(){this.mqttStore.getDefaultView&&this.$router.push({name:this.mqttStore.getDefaultView})}}},[["render",function(e,t,o,n,a,i){const r=h("i-card"),l=h("i-column"),g=h("i-row"),d=h("i-container");return p(),C(d,null,{default:c(()=>[s(g,{center:"",middle:""},{default:c(()=>[s(l,null,{default:c(()=>[s(r,{color:"primary"},{header:c(()=>t[0]||(t[0]=[f(" Cards Theme ",-1)])),default:c(()=>[t[1]||(t[1]=W("img",{class:"logo",src:x},null,-1))]),_:1,__:[1]})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-e364c277"]]),re=U({history:z("/openWB/web/display/themes/cards/"),routes:[{path:"/",name:"welcome",component:ae},{path:"/Dashboard",name:"dashboard",component:()=>T(()=>import("./DashboardView-Ch-ScCyj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))},{path:"/EnergyFlow",name:"energy-flow",component:()=>T(()=>import("./EnergyFlowView-C1Dw5jS1.js"),__vite__mapDeps([10,1,2,3,4,5,11,12,7,13]))},{path:"/ChargePoints",name:"charge-points",component:()=>T(()=>import("./ChargePointsView-InJz5_Tj.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,11,12,15]))},{path:"/Status",name:"status",component:()=>T(()=>import("./StatusView-9xI7RUa0.js"),__vite__mapDeps([16,7,3,2,4,1,5]))}]}),y=G(ie);y.use(K()),y.use(re),y.use(J,{colorMode:"dark",components:Y}),y.mount("#app");export{oe as C,te as N,B as u}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardView-D6rYO19_.js","assets/DashboardCard-DS7AgUYm.js","assets/vendor-inkline-S9CBmrTS.js","assets/vendor-Bzn5cd2Y.js","assets/vendor-inkline-BxOXWZNy.css","assets/DashboardCard-Cy_vzq6d.css","assets/ChargePointPlugBadge-Cea5-sTy.js","assets/vendor-fortawesome-C1Wk2aFl.js","assets/ChargePointPlugBadge-HWp2u3dG.css","assets/DashboardView-BYiJMWFT.css","assets/EnergyFlowView-CtSxCBuI.js","assets/ChargeModeModal-D_G7wsgY.js","assets/ChargeModeModal-CGs_z8ao.css","assets/EnergyFlowView-BOyDZ-Ju.css","assets/ChargePointsView-Dcp__6hw.js","assets/ChargePointsView-CWQMPYO-.css","assets/StatusView--LrW5-ZS.js"])))=>i.map(i=>d[i]); +import{e as P,k as f,j as V,x as k,F as S,o as p,i as W,H as F,l as C,q as c,p as h,f as w,s,A as D,I as E,z as A,R as H,J as R,K as U,L as z,M as G,N as K}from"./vendor-Bzn5cd2Y.js";import{_ as b,I as J,c as Y}from"./vendor-inkline-S9CBmrTS.js";import{l as $,f as L,a as q,F as O,b as Z,c as Q}from"./vendor-fortawesome-C1Wk2aFl.js";(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const o of document.querySelectorAll('link[rel="modulepreload"]'))t(o);new MutationObserver(o=>{for(const n of o)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&t(a)}).observe(document,{childList:!0,subtree:!0})}function t(o){if(o.ep)return;o.ep=!0;const n=function(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}(o);fetch(o.href,n)}})();const X=b({name:"DateTime",data:()=>({dateTimeInterval:"",date:"",time:""}),mounted(){this.update(),this.dateTimeInterval=setInterval(this.update,1e3)},beforeUnmount(){clearInterval(this.dateTimeInterval)},methods:{update(){const e=new Date;this.date=e.toLocaleDateString(void 0,{weekday:"short",year:"numeric",month:"2-digit",day:"2-digit"}),this.time=e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}}},[["render",function(e,t,o,n,a,i){return p(),P(S,null,[f(k(a.time),1),V(e.$slots,"default",{},()=>[t[0]||(t[0]=W("br",null,null,-1))]),f(k(a.date),1)],64)}]]),B=F("mqtt",{state:()=>({settings:{localIp:void 0,localBranch:void 0,localCommit:void 0,localVersion:void 0,parentChargePoint1:void 0,parentChargePoint2:void 0},topics:{},chartData:{}}),getters:{getChargePointFilter:e=>{let t=[];return e.settings.parentChargePoint1!==void 0&&t.push(e.settings.parentChargePoint1),e.settings.parentChargePoint2!==void 0&&t.push(e.settings.parentChargePoint2),t},getWildcardIndexList:e=>(t,o=!1)=>{let n=t;o||(n="^"+t.replaceAll("/","\\/").replaceAll("+","[^+/]+").replaceAll("#","[^#/]+")+"$");let a=Object.keys(e.topics).filter(i=>i.match(n));return a.forEach((i,r,l)=>{l[r]=parseInt(i.match(/(?:\/)([0-9]+)(?=\/)*/g)[0].replace(/[^0-9]+/g,""))}),a},getWildcardTopics:e=>(t,o=!1)=>{let n=t;return o||(n="^"+t.replaceAll("/","\\/").replaceAll("+","[^+/]+").replaceAll("#","[^#/]+")+"$"),Object.keys(e.topics).filter(a=>a.match(n)).reduce((a,i)=>({...a,[i]:e.topics[i]}),{})},getObjectIds:e=>t=>function o(n){let a=[];return n!==void 0&&n.forEach(i=>{i.type==t&&a.push(i.id),a=[...a,...o(i.children)]}),a}(e.topics["openWB/counter/get/hierarchy"]),getValueBool:e=>(t,o=!1)=>{let n=e.topics[t];return n!==void 0?n:o},getValueString:e=>(t,o="W",n="",a=!0,i=!1,r="---",l=void 0)=>{var g=!1,d=e.topics[t];if(d===void 0||l!==void 0&&d[l]===void 0)m=r;else{l!==void 0&&(d=d[l]),i&&(d*=-1);for(var m=d.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:0}),u=d;a&&(u>999||u<-999);)switch(u/=1e3,g=!0,n){case"":n="k";break;case"k":n="M";break;case"M":n="G"}m=u.toLocaleString(void 0,{minimumFractionDigits:g?2:0,maximumFractionDigits:g?2:0})}return{textValue:`${m} ${n}${o}`,value:d,unit:o,scaledValue:u,scaledUnit:`${n}${o}`}},getChartData:e=>t=>e.chartData[t]===void 0?[]:e.chartData[t],getDisplayStandby:e=>e.topics["openWB/optional/int_display/standby"],getThemeConfiguration:e=>{if("openWB/optional/int_display/theme"in e.topics&&e.topics["openWB/optional/int_display/theme"]!==void 0&&"configuration"in e.topics["openWB/optional/int_display/theme"])return e.topics["openWB/optional/int_display/theme"].configuration},getDefaultView:e=>{if(e.getThemeConfiguration){const t={dashboard:e.getThemeConfiguration.enable_dashboard_view,"energy-flow":e.getThemeConfiguration.enable_energy_flow_view,"charge-points":e.getThemeConfiguration.enable_charge_points_view,status:e.getThemeConfiguration.enable_status_view};if(e.getThemeConfiguration.default_view!==void 0&&t[e.getThemeConfiguration.default_view]===!0)return e.getThemeConfiguration.default_view;for(const[o,n]of Object.entries(t))if(n)return o}},getDefaultViewTimeout:e=>e.getThemeConfiguration?e.getThemeConfiguration.default_view_timeout:0,getDashboardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_view,getEnergyFlowEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_energy_flow_view,getChargePointsEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_charge_points_view,getStateEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_status_view,getGridCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_grid,getHomeCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_home_consumption,getBatteryCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_battery_sum,getChargePointsCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_charge_point_sum,getPvCardEnabled:e=>!e.getThemeConfiguration||e.getThemeConfiguration.enable_dashboard_card_inverter_sum,getLockChanges:e=>!e.getThemeConfiguration||e.getThemeConfiguration.lock_changes,getSimpleChargePointView:e=>!!e.getThemeConfiguration&&e.getThemeConfiguration.simple_charge_point_view,getGridId(e){let t=e.topics["openWB/counter/get/hierarchy"];if(t!==void 0&&Object.keys(t).length>0){let o=Object.keys(e.topics["openWB/counter/get/hierarchy"])[0];if(e.topics["openWB/counter/get/hierarchy"][o].type=="counter")return e.topics["openWB/counter/get/hierarchy"][o].id}},getGridPower:e=>(t="textValue")=>{let o=e.getGridId;if(o===void 0)return"---";let n=e.getValueString(`openWB/counter/${o}/get/power`,"W");return Object.hasOwnProperty.call(n,t)?n[t]:t=="object"?n:void 0},getGridPowerChartData(e){let t=e.getGridId;return t===void 0?[]:e.getChartData(`openWB/counter/${t}/get/power`)},getHomePower:e=>(t="textValue")=>{let o=e.getValueString("openWB/counter/set/home_consumption","W");return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getHomePowerChartData:e=>e.getChartData("openWB/counter/set/home_consumption"),getBatteryConfigured:e=>e.getValueBool("openWB/bat/config/configured"),getBatteryPower:e=>(t="textValue")=>{let o=e.getValueString("openWB/bat/get/power","W");return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getBatteryPowerChartData:e=>e.getChartData("openWB/bat/get/power"),getBatterySoc:e=>(t="textValue")=>{let o=e.getValueString("openWB/bat/get/soc","%","",!1);return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getBatterySocChartData:e=>e.getChartData("openWB/bat/get/soc"),getPvConfigured:e=>e.getValueBool("openWB/pv/config/configured"),getPvPower:e=>(t="textValue")=>{var o=e.getValueString("openWB/pv/get/power","W","",!0,!0);return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getPvPowerChartData:e=>e.getChartData("openWB/pv/get/power").map(t=>-1*t),getChargePointSumPower:e=>(t="textValue")=>{var o=e.getValueString("openWB/chargepoint/get/power","W");return Object.hasOwnProperty.call(o,t)?o[t]:t=="object"?o:void 0},getChargePointSumPowerChartData:e=>e.getChartData("openWB/chargepoint/get/power"),getChargePointIds(e){let t=e.getObjectIds("cp"),o=this.getChargePointFilter;return o.length>0?t.filter(n=>o.includes(n)):t},getChargePointName:e=>t=>e.topics[`openWB/chargepoint/${t}/config`]!==void 0?e.topics[`openWB/chargepoint/${t}/config`].name:"---",getChargePointPower:e=>(t,o="textValue")=>{var n=e.getValueString(`openWB/chargepoint/${t}/get/power`,"W");return Object.hasOwnProperty.call(n,o)?n[o]:o=="object"?n:void 0},getChargePointImportedSincePlugged:e=>t=>({energy:e.getValueString(`openWB/chargepoint/${t}/set/log`,"Wh","",!0,!1,"---","imported_since_plugged").textValue,range:e.getValueString(`openWB/chargepoint/${t}/set/log`,"m","k",!1,!1,"---","range_charged").textValue}),getChargePointPowerChartData:e=>t=>e.getChartData(`openWB/chargepoint/${t}/get/power`),getChargePointSetCurrent:e=>(t,o="textValue")=>{let n=e.getValueString(`openWB/chargepoint/${t}/set/current`,"A");return Object.hasOwnProperty.call(n,o)?n[o]:o=="object"?n:void 0},getChargePointPhasesInUse:e=>t=>{const o=["/","①","②","③"],n=e.topics[`openWB/chargepoint/${t}/get/phases_in_use`];return n!==void 0&&n>=0&&nt=>e.getValueBool(`openWB/chargepoint/${t}/get/plug_state`),getChargePointChargeState:e=>t=>e.getValueBool(`openWB/chargepoint/${t}/get/charge_state`),getChargePointManualLock:e=>t=>e.getValueBool(`openWB/chargepoint/${t}/set/manual_lock`),getChargepointTagState:e=>t=>[void 0,null,""].includes(e.topics[`openWB/chargepoint/${t}/set/rfid`])?[void 0,null,""].includes(e.topics[`openWB/chargepoint/${t}/get/rfid`])?0:1:2,getChargePointConnectedVehicleConfig:e=>t=>e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/config`],getChargePointConnectedVehicleChargeMode:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.translateChargeMode(e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.selected)},getChargePointConnectedVehiclePriority:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).prio},getChargePointConnectedVehicleInfo:e=>t=>e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/info`],getChargePointConnectedVehicleId:e=>t=>{if(e.getChargePointConnectedVehicleInfo(t))return e.getChargePointConnectedVehicleInfo(t).id},getChargePointConnectedVehicleChargeTemplateIndex:e=>t=>{if(e.getChargePointConnectedVehicleConfig(t))return e.getChargePointConnectedVehicleConfig(t).charge_template},getChargePointConnectedVehicleChargeTemplate:e=>t=>e.topics[`openWB/chargepoint/${t}/set/charge_template`],getChargePointConnectedVehicleEvTemplate:e=>t=>{if(e.getChargePointConnectedVehicleConfig(t))return e.getChargePointConnectedVehicleConfig(t).ev_template},getChargePointConnectedVehicleName:e=>t=>{if(e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/info`])return e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/info`].name},getChargePointConnectedVehicleSoc:e=>t=>e.topics[`openWB/chargepoint/${t}/get/connected_vehicle/soc`],getChargePointConnectedVehicleTimeChargingActive:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).time_charging.active},getChargePointConnectedVehicleTimeChargingRunning:e=>t=>{let o=e.getChargePointConnectedVehicleConfig(t).time_charging_in_use;return o!==void 0&&o},getChargePointConnectedVehicleInstantChargingCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.instant_charging.current},getChargePointConnectedVehicleInstantChargingLimit:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.instant_charging.limit:{selected:void 0},getChargePointConnectedVehicleInstantChargingPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.instant_charging.phases_to_use},getChargePointConnectedVehiclePvChargingFeedInLimit:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.feed_in_limit},getChargePointConnectedVehiclePvChargingMinCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.min_current},getChargePointConnectedVehiclePvChargingPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.phases_to_use},getChargePointConnectedVehiclePvChargingLimit:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.limit:{selected:void 0},getChargePointConnectedVehiclePvChargingMinSoc:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.min_soc},getChargePointConnectedVehiclePvChargingMinSocCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.min_soc_current},getChargePointConnectedVehiclePvChargingMinSocPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.pv_charging.phases_to_use_min_soc},getChargePointConnectedVehicleEcoChargingCurrent:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.current},getChargePointConnectedVehicleEcoChargingPhases:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.phases_to_use},getChargePointConnectedVehicleEcoChargingLimit:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.limit:{selected:void 0},getChargePointConnectedVehicleEcoChargingMaxPrice:e=>t=>{if(e.getChargePointConnectedVehicleChargeTemplate(t))return 1e5*e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.eco_charging.max_price},getChargePointConnectedVehicleScheduledChargingPlans:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).chargemode.scheduled_charging.plans:{},getChargePointConnectedVehicleTimeChargingPlans:e=>t=>e.getChargePointConnectedVehicleChargeTemplate(t)?e.getChargePointConnectedVehicleChargeTemplate(t).time_charging.plans:{},getVehicleList:e=>e.getWildcardTopics("openWB/vehicle/+/name"),getVehicleName:e=>t=>e.topics[`openWB/vehicle/${t}/name`],getVehicleSocConfigured:e=>t=>e.topics[`openWB/vehicle/${t}/soc_module/config`].type!=null,getVehicleSocIsManual:e=>t=>e.topics[`openWB/vehicle/${t}/soc_module/config`].type=="manual",getVehicleFaultState:e=>t=>e.topics[`openWB/vehicle/${t}/get/fault_state`]?e.topics[`openWB/vehicle/${t}/get/fault_state`]:0,getSystemTime(e){if(e.topics["openWB/system/time"])return new Date(1e3*e.topics["openWB/system/time"]).toLocaleString()},getSystemIp:e=>e.settings.localIp!==void 0?e.settings.localIp:e.topics["openWB/system/ip_address"]?e.topics["openWB/system/ip_address"]:void 0,getSystemVersion:e=>e.settings.localVersion!==void 0?e.settings.localVersion:e.topics["openWB/system/version"]?e.topics["openWB/system/version"]:void 0,getSystemBranch:e=>e.settings.localBranch!==void 0?e.settings.localBranch:e.topics["openWB/system/current_branch"]?e.topics["openWB/system/current_branch"]:void 0,getSystemCurrentCommit:e=>e.settings.localCommit!==void 0?e.settings.localCommit:e.topics["openWB/system/current_commit"]?e.topics["openWB/system/current_commit"]:void 0,getRfidEnabled(){return this.getValueBool("openWB/optional/rfid/active")},getEtConfigured:e=>e.topics["openWB/optional/et/provider"]!==void 0&&e.topics["openWB/optional/et/provider"].type!==null,getEtPrices:e=>e.topics["openWB/optional/et/get/prices"]},actions:{updateSetting(e,t){e in this.settings&&(this.settings[e]=t)},initTopic(e,t=void 0){e.includes("#")||e.includes("+")||this.addTopic(e,t)},addTopic(e,t){this.topics[e]=t},removeTopic(e){e.includes("#")||e.includes("+")?Object.keys(this.getWildcardTopics(e)).forEach(t=>{delete this.topics[t]}):delete this.topics[e]},updateTopic(e,t,o=void 0){return e in this.topics?(o!=null?(n=this.topics[e],i=t,(a=o).split(".").reduce((r,l,g)=>r[l]=a.split(".").length===++g?i:r[l]||{},n)):this.topics[e]=t,this.topics[e]):void 0;var n,a,i},updateChartData(){for(const[e,t]of Object.entries(this.topics))(e.endsWith("home_consumption")||e.endsWith("power")||e.endsWith("soc"))&&(this.chartData[e]===void 0&&(this.chartData[e]=[]),t!=null&&(this.chartData[e].push(t),this.chartData[e].slice(-128)))},updateState(e,t,o=void 0){return this.updateTopic(e,t,o)},chargeModeList(){var e=[{id:"instant_charging"},{id:"pv_charging"},{id:"scheduled_charging"},{id:"eco_charging"},{id:"stop"}];return e.forEach(t=>{t.label=this.translateChargeMode(t.id).label,t.class=this.translateChargeMode(t.id).class}),e},translateChargeMode(e){switch(e){case"instant_charging":return{mode:e,label:"Sofort",class:"danger"};case"pv_charging":return{mode:e,label:"PV",class:"success"};case"scheduled_charging":return{mode:e,label:"Ziel",class:"primary"};case"time_charging":return{mode:e,label:"Zeit",class:"warning"};case"eco_charging":return{mode:e,label:"Eco",class:"secondary"};case"stop":return{mode:e,label:"Stop",class:"dark"};default:return{mode:e,label:e,class:e}}},checkChangesLockCode(e){return!(!this.getThemeConfiguration||this.getThemeConfiguration.lock_changes_code!=e)},formatDate:(e,t={year:"numeric",month:"2-digit",day:"2-digit"})=>new Date(e).toLocaleDateString(void 0,t),formatDateRange(e,t="-"){const o={year:"numeric",month:"2-digit",day:"2-digit"};let n={day:"2-digit"};const a=new Date(e[0]),i=new Date(e[1]);return a.getFullYear()==i.getFullYear()?(t=`.${t}`,a.getMonth()!=i.getMonth()&&(n.month=o.month)):n=o,`${this.formatDate(e[0],n)}${t}${this.formatDate(e[1],o)}`},formatWeeklyScheduleDays(e){const t=["Mo","Di","Mi","Do","Fr","Sa","So"];let o=[],n=null;return e.forEach((a,i)=>{a?n===null&&(n=i):n!==null&&(n===i-1?o.push(t[n]):o.push(`${t[n]}-${t[i-1]}`),n=null)}),n!==null&&(n===e.length-1?o.push(t[n]):o.push(`${t[n]}-${t[e.length-1]}`)),o.join(", ")}}}),ee=b({name:"NavBar",components:{NavItem:b({name:"NavItem",props:{to:{type:Object,required:!0}}},[["render",function(e,t,o,n,a,i){const r=h("i-nav-item");return p(),C(r,{to:o.to,"active-class":"-active",class:"_border _border-color:primary _text-align:center"},{default:c(()=>[V(e.$slots,"default",{},void 0,!0)]),_:3},8,["to"])}],["__scopeId","data-v-1db6ae73"]])},data:()=>({mqttStore:B()})},[["render",function(e,t,o,n,a,i){const r=h("nav-item"),l=h("i-nav");return p(),C(l,{vertical:"",class:"_align-items:stretch",size:"lg"},{default:c(()=>[a.mqttStore.getDashboardEnabled?(p(),C(r,{key:0,to:{name:"dashboard"}},{default:c(()=>t[0]||(t[0]=[f(" Übersicht ",-1)])),_:1,__:[0]})):w("",!0),a.mqttStore.getEnergyFlowEnabled?(p(),C(r,{key:1,to:{name:"energy-flow"}},{default:c(()=>t[1]||(t[1]=[f(" Energiefluss ",-1)])),_:1,__:[1]})):w("",!0),a.mqttStore.getChargePointsEnabled&&a.mqttStore.getChargePointIds.length>0?(p(),C(r,{key:2,to:{name:"charge-points"}},{default:c(()=>t[2]||(t[2]=[f(" Ladepunkte ",-1)])),_:1,__:[2]})):w("",!0),a.mqttStore.getStateEnabled?(p(),C(r,{key:3,to:{name:"status"}},{default:c(()=>t[3]||(t[3]=[f(" Status ",-1)])),_:1,__:[3]})):w("",!0)]),_:1})}]]);$.add(L,q);const te=b({name:"NumberPad",components:{FontAwesomeIcon:O},emits:["key:digit","key:clear","key:delete"],data:()=>({buttonRows:[[{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"}],[{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6"}],[{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"}]]}),methods:{emitDigit(e){this.$emit("key:digit",e)},emitClear(){this.$emit("key:clear")},emitDelete(){this.$emit("key:delete")}}},[["render",function(e,t,o,n,a,i){const r=h("i-button"),l=h("i-column"),g=h("i-row"),d=h("FontAwesomeIcon"),m=h("i-container");return p(),C(m,null,{default:c(()=>[(p(!0),P(S,null,D(a.buttonRows,u=>(p(),C(g,{key:u,center:"",class:"_padding-bottom:1"},{default:c(()=>[(p(!0),P(S,null,D(u,_=>(p(),C(l,{key:_.value,class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:v=>i.emitDigit(_.value)},{default:c(()=>[f(k(_.label),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:2},1024))),128)),s(g,{center:""},{default:c(()=>[s(l,{class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:t[0]||(t[0]=u=>i.emitClear())},{default:c(()=>[s(d,{"fixed-width":"",icon:["fas","fa-eraser"]})]),_:1})]),_:1}),s(l,{class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:t[1]||(t[1]=u=>i.emitDigit("0"))},{default:c(()=>t[3]||(t[3]=[f(" 0 ",-1)])),_:1,__:[3]})]),_:1}),s(l,{class:"pin-button-column"},{default:c(()=>[s(r,{size:"lg",class:"pin-button",onClick:t[2]||(t[2]=u=>i.emitDelete())},{default:c(()=>[s(d,{"fixed-width":"",icon:["fas","fa-delete-left"]})]),_:1})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-4e2103db"]]),oe=b({name:"CodeInputModal",components:{NumberPad:te},props:{modelValue:{type:Boolean,required:!0},backgroundColor:{type:String,default:"warning"},placeholderCharacter:{type:String,default:"*",validator:e=>e.length==1},inputVisible:{type:Boolean,default:!1},minLength:{type:Number,default:4},maxLength:{type:Number,default:4}},emits:["update:modelValue","update:inputValue"],data(){return{number:"",modalBackground:this.backgroundColor}},computed:{placeholder(){return this.placeholderCharacter.repeat(this.minLength)},enableSubmit(){return this.number.length>=this.minLength&&this.number.length<=this.maxLength}},watch:{modelValue(e,t){e===!1&&t===!0&&this.clear()}},methods:{abort(){this.$emit("update:modelValue",!1)},addDigit(e){this.number.length{this.$emit("update:modelValue",!1),this.modalBackground=this.backgroundColor},500)},error(e="danger"){this.modalBackground=e,setTimeout(()=>{this.clear(),this.modalBackground=this.backgroundColor},2e3)}}},[["render",function(e,t,o,n,a,i){const r=h("i-input"),l=h("i-column"),g=h("i-row"),d=h("NumberPad"),m=h("i-container"),u=h("i-button"),_=h("i-modal");return p(),C(E,{to:"body"},[s(_,{"model-value":o.modelValue,color:a.modalBackground,"onUpdate:modelValue":t[4]||(t[4]=v=>e.$emit("update:modelValue",v))},{header:c(()=>[V(e.$slots,"header",{},()=>[t[5]||(t[5]=f(" **HEADER** ",-1))])]),footer:c(()=>[s(m,null,{default:c(()=>[s(g,null,{default:c(()=>[s(l,null,{default:c(()=>[s(u,{color:"danger",onClick:i.abort},{default:c(()=>[V(e.$slots,"abort",{},()=>[t[6]||(t[6]=f(" Zurück ",-1))])]),_:3},8,["onClick"])]),_:3}),s(l,{class:"_text-align:right"},{default:c(()=>[i.enableSubmit?(p(),C(u,{key:0,color:"success",onClick:i.submit},{default:c(()=>[V(e.$slots,"submit",{},()=>[t[7]||(t[7]=f(" OK ",-1))])]),_:3},8,["onClick"])):w("",!0)]),_:3})]),_:3})]),_:3})]),default:c(()=>[s(m,null,{default:c(()=>[s(g,{center:"",class:"_padding-bottom:1"},{default:c(()=>[s(l,null,{default:c(()=>[s(r,{modelValue:a.number,"onUpdate:modelValue":t[0]||(t[0]=v=>a.number=v),placeholder:i.placeholder,readonly:"",size:"lg",type:o.inputVisible?"text":"password",class:"_text-align:center"},null,8,["modelValue","placeholder","type"])]),_:1})]),_:1}),s(d,{"onKey:digit":t[1]||(t[1]=v=>i.addDigit(v)),"onKey:clear":t[2]||(t[2]=v=>i.clear()),"onKey:delete":t[3]||(t[3]=v=>i.removeDigit(v))})]),_:1})]),_:3},8,["model-value","color"])])}]]);$.add(Z,Q,L,q);const ne={key:0,class:"_padding-left:1"},x="/openWB/web/display/themes/cards/openWB_logo_dark.png",ie=b({name:"OpenwbDisplayCardsApp",components:{RouterView:H,DateTime:X,NavBar:ee,LockNavItem:b({name:"LockNavItem",components:{FontAwesomeIcon:O,CodeInputModal:oe},props:{},data:()=>({mqttStore:B(),modalPinEntryVisible:!1,modalPinEntryColor:"warning",code:"",countdown:0,countdownInterval:void 0,events:["mousemove","touchmove","wheel","click"]}),computed:{changesLocked:{get(){return this.mqttStore.settings.changesLocked},set(e){this.mqttStore.settings.changesLocked=e}},timer(){return Math.trunc(this.countdown/60).toString()+":"+(this.countdown%60).toString().padStart(2,"0")}},mounted(){this.changesLocked=!0},methods:{toggleChangesLock(){this.changesLocked?this.unlockChanges():this.lockChanges()},unlockChanges(){this.modalPinEntryVisible=!0},checkUnlockCode(e){this.mqttStore.checkChangesLockCode(e)?(this.$refs.lockInput.success("success"),this.changesLocked=!1,this.mqttStore.getDisplayStandby>0&&(this.countdown=this.mqttStore.getDisplayStandby,this.countdownInterval=setInterval(this.updateCountdown,1e3),this.events.forEach(t=>{document.addEventListener(t,this.handleDocumentEvent,{passive:!0})}))):this.$refs.lockInput.error("danger")},lockChanges(){this.changesLocked=!0,this.events.forEach(e=>{document.removeEventListener(e,this.handleDocumentEvent,{passive:!0})}),this.countdownInterval!==void 0&&(clearInterval(this.countdownInterval),this.countdownInterval=void 0)},updateCountdown(){this.countdown-=1,this.countdown<1&&this.lockChanges()},handleDocumentEvent(){this.countdown=this.mqttStore.getDisplayStandby}}},[["render",function(e,t,o,n,a,i){const r=h("FontAwesomeIcon"),l=h("i-button"),g=h("CodeInputModal");return p(),P(S,null,[a.mqttStore.getLockChanges?(p(),C(l,{key:0,class:"_padding-left:0 _padding-right:0 _margin-bottom:1",size:"lg",block:"",color:i.changesLocked?"danger":"success",onClick:t[0]||(t[0]=d=>i.toggleChangesLock())},{default:c(()=>[s(r,{"fixed-width":"",icon:i.changesLocked?["fas","fa-lock"]:["fas","fa-lock-open"],class:A(i.changesLocked?"_color:danger-80":"_color:success-80")},null,8,["icon","class"]),!i.changesLocked&&a.countdownInterval?(p(),P("span",ne,k(i.timer),1)):w("",!0)]),_:1},8,["color"])):w("",!0),s(g,{ref:"lockInput",modelValue:a.modalPinEntryVisible,"onUpdate:modelValue":t[1]||(t[1]=d=>a.modalPinEntryVisible=d),"min-length":4,"max-length":10,"onUpdate:inputValue":i.checkUnlockCode},{header:c(()=>t[2]||(t[2]=[f(" Bitte den PIN zur Freigabe von Änderungen eingeben. ",-1)])),_:1},8,["modelValue","onUpdate:inputValue"])],64)}]]),TouchBlocker:b({name:"TouchBlocker",data:()=>({mqttStore:B(),show:!1,touchBlockerCountdown:void 0,touchBlockerCountdownInterval:void 0,defaultViewCountdown:void 0,defaultViewCountdownInterval:void 0,events:["mousemove","touchmove","wheel","click"],eventHandlerSetup:!1}),computed:{configuredDisplayStandby(){if(this.mqttStore.getDisplayStandby!==0&&this.mqttStore.getDisplayStandby!==void 0)return this.mqttStore.getDisplayStandby},configuredDefaultViewTimeout(){if(this.mqttStore.getDefaultViewTimeout!==0&&this.mqttStore.getDefaultViewTimeout!==void 0)return this.mqttStore.getDefaultViewTimeout},touchBlockerTimeout(){return Math.max(this.configuredDisplayStandby-3,1)},defaultViewTimeout(){return this.configuredDefaultViewTimeout}},mounted(){this.setupEventHandler(),this.setupTouchBlockerTimeout(),this.setupDefaultViewTimeout()},unmounted(){this.clearEventHandler(),this.clearTouchBlockerTimeout(),this.clearDefaultViewTimeout()},methods:{handleTouchBlockerClick(e){e===!1&&(this.show=!1,this.setupEventHandler(),this.setupTouchBlockerTimeout(),this.setupDefaultViewTimeout())},setupEventHandler(){this.eventHandlerSetup||(this.events.forEach(e=>{document.addEventListener(e,this.handleDocumentEvent,{passive:!0})}),this.eventHandlerSetup=!0)},clearEventHandler(){this.eventHandlerSetup&&(this.events.forEach(e=>{document.removeEventListener(e,this.handleDocumentEvent,{passive:!0})}),this.eventHandlerSetup=!1)},setupTouchBlockerTimeout(){this.touchBlockerCountdownCountdownInterval===void 0&&(this.touchBlockerCountdownCountdownInterval=setInterval(this.updateTouchBlockerCountdown,1e3))},clearTouchBlockerTimeout(){this.touchBlockerCountdownCountdownInterval!==void 0&&(clearInterval(this.touchBlockerCountdownCountdownInterval),this.touchBlockerCountdownCountdownInterval=void 0)},updateTouchBlockerCountdown(){this.touchBlockerCountdown===void 0?this.touchBlockerCountdown=this.touchBlockerTimeout:(this.touchBlockerCountdown-=1,this.touchBlockerCountdown<1&&this.showTouchBlocker())},setupDefaultViewTimeout(){this.defaultViewCountdownInterval===void 0&&this.mqttStore.getDefaultView!==this.$route.name&&this.defaultViewTimeout!==void 0&&(this.defaultViewCountdownInterval=setInterval(this.updateDefaultViewCountdown,1e3))},clearDefaultViewTimeout(){this.defaultViewCountdownInterval!==void 0&&(clearInterval(this.defaultViewCountdownInterval),this.defaultViewCountdownInterval=void 0)},updateDefaultViewCountdown(){this.defaultViewCountdown===void 0&&this.defaultViewTimeout!==void 0?this.defaultViewCountdown=this.defaultViewTimeout:this.$route.name===this.mqttStore.getDefaultView?this.clearDefaultViewTimeout():(this.defaultViewCountdown-=1,this.defaultViewCountdown<1&&this.showDefaultView())},handleDocumentEvent(){this.touchBlockerCountdown=this.touchBlockerTimeout,this.defaultViewCountdown=this.defaultViewTimeout,this.setupDefaultViewTimeout(),this.show=!1},showTouchBlocker(){this.show=!0,this.clearTouchBlockerTimeout()},showDefaultView(){this.clearDefaultViewTimeout(),this.$route.name!==this.mqttStore.getDefaultView&&this.$router.push({name:this.mqttStore.getDefaultView})}}},[["render",function(e,t,o,n,a,i){const r=h("IModal");return p(),C(E,{to:"body"},[s(r,{class:"touch-blocker",size:"sm",color:"dark","model-value":a.show,"onUpdate:modelValue":t[0]||(t[0]=l=>i.handleTouchBlockerClick(l))},{default:c(()=>t[1]||(t[1]=[W("img",{class:"logo",src:x},null,-1),W("p",null," Bitte das Display berühren. ",-1)])),_:1,__:[1]},8,["model-value"])])}],["__scopeId","data-v-2d58d6dd"]])},data:()=>({client:{connected:!1},connection:{protocol:location.protocol=="https:"?"wss":"ws",host:location.hostname,port:parseInt(location.port)||(location.protocol=="https:"?443:80),endpoint:"/ws",connectTimeout:4e3,reconnectPeriod:4e3},mqttTopicsToSubscribe:["openWB/bat/config/configured","openWB/bat/get/power","openWB/bat/get/soc","openWB/chargepoint/+/config","openWB/chargepoint/+/get/charge_state","openWB/chargepoint/+/get/connected_vehicle/+","openWB/chargepoint/+/set/charge_template","openWB/chargepoint/+/set/charge_template/chargemode/scheduled_charging/plans/+","openWB/chargepoint/+/set/charge_template/time_charging/plans/+","openWB/chargepoint/+/get/phases_in_use","openWB/chargepoint/+/get/plug_state","openWB/chargepoint/+/get/power","openWB/chargepoint/+/get/rfid","openWB/chargepoint/+/set/current","openWB/chargepoint/+/set/manual_lock","openWB/chargepoint/+/set/log","openWB/chargepoint/+/set/rfid","openWB/chargepoint/get/power","openWB/counter/+/get/power","openWB/counter/get/hierarchy","openWB/counter/set/home_consumption","openWB/optional/et/provider","openWB/optional/et/get/prices","openWB/optional/int_display/theme","openWB/optional/int_display/standby","openWB/optional/rfid/active","openWB/pv/config/configured","openWB/pv/get/power","openWB/system/current_branch","openWB/system/current_commit","openWB/system/ip_address","openWB/system/time","openWB/system/version","openWB/vehicle/+/get/fault_state","openWB/vehicle/+/name","openWB/vehicle/+/soc_module/config"],mqttStore:B(),chartInterval:"",clearConsoleHandler:void 0}),computed:{changesLocked(){return this.mqttStore.getLockChanges&&this.mqttStore.settings.changesLocked}},created(){this.createConnection()},mounted(){let e=window.location.search;if(e!=""){let n=new URLSearchParams(e);if(n.has("data")){let a=JSON.parse(n.get("data"));Object.entries(a).forEach(([i,r])=>{i.startsWith("parentChargePoint")?this.mqttStore.updateSetting(i,parseInt(r)):this.mqttStore.updateSetting(i,r)})}}this.doSubscribe(this.mqttTopicsToSubscribe),this.chartInterval=setInterval(this.mqttStore.updateChartData,5e3);const t=new Date,o=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1,0,0,0,0).getTime()-t.getTime();this.clearConsoleHandler=setTimeout(()=>this.clearConsole(),o)},beforeUnmount(){this.doUnsubscribe(this.mqttTopicsToSubscribe),clearInterval(this.chartInterval),clearTimeout(this.clearConsoleHandler)},methods:{clearConsole(){this.clearConsoleHandler=setTimeout(()=>this.clearConsole(),864e5)},createConnection(){const{protocol:e,host:t,port:o,endpoint:n,...a}=this.connection,i=`${e}://${t}:${o}${n}`;try{this.client=R.connect(i,a)}catch{}this.client.on("connect",()=>{}),this.client.on("error",r=>{}),this.client.on("message",(r,l)=>{if(l.toString().length>0){let g;try{g=JSON.parse(l.toString())}catch{g=l.toString()}this.mqttStore.addTopic(r,g)}else this.mqttStore.removeTopic(r)})},doSubscribe(e){e.forEach(t=>{this.mqttStore.initTopic(t)}),this.client.subscribe(e,{},t=>{})},doUnsubscribe(e){e.forEach(t=>{this.mqttStore.removeTopic(t)}),this.client.unsubscribe(e,t=>{})},doPublish(e,t,o=!0,n=2){let a={qos:n,retain:o};this.client.publish(e,JSON.stringify(t),a,i=>{})},sendTopicToBroker(e,t=void 0){let o=e.replace("openWB/","openWB/set/");t===void 0&&(t=this.mqttStore.topics[e]),this.doPublish(o,t)},sendCommand(e){this.doPublish("openWB/set/command/"+this.client.options.clientId+"/todo",e,!1)},sendSystemCommand(e,t={}){this.sendCommand({command:e,data:t})}}},[["render",function(e,t,o,n,a,i){const r=h("DateTime"),l=h("i-column"),g=h("i-row"),d=h("i-container"),m=h("LockNavItem"),u=h("NavBar"),_=h("TouchBlocker"),v=h("i-layout-aside"),j=h("RouterView"),M=h("i-layout-content"),N=h("i-layout");return p(),C(N,{vertical:""},{default:c(()=>[s(v,{class:"_position:fixed"},{default:c(()=>[s(d,{fluid:"",class:"_margin-bottom:1"},{default:c(()=>[s(g,{center:""},{default:c(()=>[s(l,null,{default:c(()=>[s(r)]),_:1})]),_:1})]),_:1}),s(m),s(u,{"changes-locked":i.changesLocked},null,8,["changes-locked"]),s(_)]),_:1}),s(M,null,{default:c(()=>[s(j,{"changes-locked":i.changesLocked},null,8,["changes-locked"])]),_:1})]),_:1})}],["__scopeId","data-v-6f8bc44f"]]),I={},T=function(e,t,o){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),r=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));n=Promise.allSettled(t.map(l=>{if((l=function(u){return"/openWB/web/display/themes/cards/"+u}(l))in I)return;I[l]=!0;const g=l.endsWith(".css"),d=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const m=document.createElement("link");return m.rel=g?"stylesheet":"modulepreload",g||(m.as="script"),m.crossOrigin="",m.href=l,r&&m.setAttribute("nonce",r),document.head.appendChild(m),g?new Promise((u,_)=>{m.addEventListener("load",u),m.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${l}`)))}):void 0}))}function a(i){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=i,window.dispatchEvent(r),!r.defaultPrevented)throw i}return n.then(i=>{for(const r of i||[])r.status==="rejected"&&a(r.reason);return e().catch(a)})},ae=b({name:"WelcomeView",data:()=>({mqttStore:B()}),mounted(){setTimeout(this.selectFirstRoute,3e3)},methods:{selectFirstRoute(){this.mqttStore.getDefaultView&&this.$router.push({name:this.mqttStore.getDefaultView})}}},[["render",function(e,t,o,n,a,i){const r=h("i-card"),l=h("i-column"),g=h("i-row"),d=h("i-container");return p(),C(d,null,{default:c(()=>[s(g,{center:"",middle:""},{default:c(()=>[s(l,null,{default:c(()=>[s(r,{color:"primary"},{header:c(()=>t[0]||(t[0]=[f(" Cards Theme ",-1)])),default:c(()=>[t[1]||(t[1]=W("img",{class:"logo",src:x},null,-1))]),_:1,__:[1]})]),_:1})]),_:1})]),_:1})}],["__scopeId","data-v-e364c277"]]),re=U({history:z("/openWB/web/display/themes/cards/"),routes:[{path:"/",name:"welcome",component:ae},{path:"/Dashboard",name:"dashboard",component:()=>T(()=>import("./DashboardView-D6rYO19_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))},{path:"/EnergyFlow",name:"energy-flow",component:()=>T(()=>import("./EnergyFlowView-CtSxCBuI.js"),__vite__mapDeps([10,1,2,3,4,5,11,12,7,13]))},{path:"/ChargePoints",name:"charge-points",component:()=>T(()=>import("./ChargePointsView-Dcp__6hw.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,8,11,12,15]))},{path:"/Status",name:"status",component:()=>T(()=>import("./StatusView--LrW5-ZS.js"),__vite__mapDeps([16,7,3,2,4,1,5]))}]}),y=G(ie);y.use(K()),y.use(re),y.use(J,{colorMode:"dark",components:Y}),y.mount("#app");export{oe as C,te as N,B as u}; diff --git a/packages/modules/display_themes/cards/web/index.html b/packages/modules/display_themes/cards/web/index.html index 03b716a1be..b99ca0a660 100644 --- a/packages/modules/display_themes/cards/web/index.html +++ b/packages/modules/display_themes/cards/web/index.html @@ -6,7 +6,7 @@ openWB Display - Cards - + diff --git a/packages/modules/vehicles/tesla/api.py b/packages/modules/vehicles/tesla/api.py index 802577771a..aec7abbdbf 100644 --- a/packages/modules/vehicles/tesla/api.py +++ b/packages/modules/vehicles/tesla/api.py @@ -27,27 +27,27 @@ def post_wake_up_command(vehicle: int, token: TeslaSocToken) -> str: vehicle_id = __get_vehicle_id(vehicle, token) - command = "vehicles/"+str(vehicle_id)+"/wake_up" - log.debug("Sending command: \"%s\"" % (command)) + command = f"vehicles/{vehicle_id}/wake_up" + log.debug(f"Sending command: '{command}'") headers = { "user-agent": UA, "x-tesla-user-agent": X_TESLA_USER_AGENT, "authorization": "bearer " + token.access_token } session = req.get_http_session() - response = session.post("https://owner-api.teslamotors.com/api/1/" + command, headers=headers, timeout=50).json() + response = session.post(f"https://owner-api.teslamotors.com/api/1/{command}", headers=headers, timeout=50).json() return response["response"]["state"] def request_soc_range(vehicle: int, token: TeslaSocToken) -> Tuple[float, float, float]: vehicle_id = __get_vehicle_id(vehicle, token) - data_part = "vehicles/"+str(vehicle_id)+"/vehicle_data" + data_part = f"vehicles/{vehicle_id}/vehicle_data" response = __request_data(data_part, token) response = json.loads(response) soc = float(response["response"]["charge_state"]["battery_level"]) # convert miles to km - range = float(response["response"]["charge_state"]["battery_range"]) * 1.60934 - soc_timestamp = float(response["response"]["charge_state"]["timestamp"]) + range = int(float(response["response"]["charge_state"]["battery_range"]) * 1.60934) + soc_timestamp = float(response["response"]["charge_state"]["timestamp"]) / 1000 return soc, range, soc_timestamp @@ -88,20 +88,20 @@ def __get_vehicle_id(index: int, token: TeslaSocToken) -> str: products = __request_data('products', token) try: vehicle_id = str(json.loads(products)["response"][index]["id"]) - log.debug("vehicle_id for entry %d: %s" % (index, vehicle_id)) + log.debug(f"vehicle_id for entry {index}: {vehicle_id}") except IndexError: - raise Exception("Zur Tesla-ID "+str(index)+" konnte kein Fahrzeug im Account gefunden werden.") + raise Exception(f"Zur Tesla-ID {index} konnte kein Fahrzeug im Account gefunden werden.") return vehicle_id def __request_data(data_part: str, token: TeslaSocToken) -> str: - log.debug("Requesting data: \"%s\"" % (data_part)) + log.debug(f"Requesting data: '{data_part}'") headers = { "user-agent": UA, "x-tesla-user-agent": X_TESLA_USER_AGENT, "authorization": "bearer " + token.access_token } - response = req.get_http_session().get("https://owner-api.teslamotors.com/api/1/" + data_part, + response = req.get_http_session().get(f"https://owner-api.teslamotors.com/api/1/{data_part}", headers=headers, timeout=50) return response.text diff --git a/packages/modules/vehicles/tesla/soc.py b/packages/modules/vehicles/tesla/soc.py index dcb9f41c31..25f03a4479 100644 --- a/packages/modules/vehicles/tesla/soc.py +++ b/packages/modules/vehicles/tesla/soc.py @@ -19,7 +19,13 @@ def fetch(vehicle_config: TeslaSoc, vehicle_update_data: VehicleUpdateData) -> CarState: vehicle_config.configuration.token = api.validate_token(vehicle_config.configuration.token) if vehicle_update_data.charge_state is False: - _wake_up_car(vehicle_config) + try: + _wake_up_car(vehicle_config) + except Exception as e: + log.warning( + f"Fehler beim Aufwecken des Fahrzeugs: {e}\n" + "Der abgerufene SoC-Wert ist möglicherweise veraltet." + ) soc, range, soc_timestamp = api.request_soc_range( vehicle=vehicle_config.configuration.tesla_ev_num, token=vehicle_config.configuration.token) return CarState(soc=soc, range=range, soc_timestamp=soc_timestamp) @@ -36,10 +42,10 @@ def _wake_up_car(vehicle_config: TeslaSoc): break counter = counter+1 time.sleep(5) - log.debug("Loop: "+str(counter)+", State: "+str(state)) - log.info("Status nach Aufwecken: "+str(state)) + log.debug(f"Loop: {counter}, State: {state}") + log.info(f"Status nach Aufwecken: {state}") if state != "online": - raise Exception("EV konnte nicht geweckt werden.") + raise Exception(f"EV konnte nicht geweckt werden. Status: {state}") def create_vehicle(vehicle_config: TeslaSoc, vehicle: int): @@ -55,10 +61,10 @@ def read_legacy(id: int, tesla_ev_num: int, charge_state: bool): - log.debug('SoC-Module tesla num: ' + str(id)) - log.debug('SoC-Module tesla token_file: ' + str(token_file)) - log.debug('SoC-Module tesla tesla_ev_num: ' + str(tesla_ev_num)) - log.debug('SoC-Module tesla charge_state: ' + str(charge_state)) + log.debug(f"SoC-Module tesla num: {id}") + log.debug(f"SoC-Module tesla token_file: {token_file}") + log.debug(f"SoC-Module tesla tesla_ev_num: {tesla_ev_num}") + log.debug(f"SoC-Module tesla charge_state: {charge_state}") with open(token_file, "r") as f: token = json.load(f) diff --git a/packages/modules/web_themes/colors/source/src/assets/js/themeConfig.ts b/packages/modules/web_themes/colors/source/src/assets/js/themeConfig.ts index e215dd9572..786d6ec07b 100644 --- a/packages/modules/web_themes/colors/source/src/assets/js/themeConfig.ts +++ b/packages/modules/web_themes/colors/source/src/assets/js/themeConfig.ts @@ -43,8 +43,6 @@ export class Config { private _lowerPriceBound = 0 private _upperPriceBound = 0 private _showPmLabels = true - isEtEnabled: boolean = false - etPrice: number = 20.5 showRightButton = true showLeftButton = true // graphMode = '' @@ -407,6 +405,7 @@ export class GlobalData { cpDailyExported = 0 evuId = 0 etProvider = '' + country = 'de' get pvBatteryPriority() { return this._pvBatteryPriority } diff --git a/packages/modules/web_themes/colors/source/src/components/chargePointList/VehicleData.vue b/packages/modules/web_themes/colors/source/src/components/chargePointList/VehicleData.vue index 24744fb9d2..dc752f4ee7 100644 --- a/packages/modules/web_themes/colors/source/src/components/chargePointList/VehicleData.vue +++ b/packages/modules/web_themes/colors/source/src/components/chargePointList/VehicleData.vue @@ -120,14 +120,14 @@ heading="Strompreis:" class="grid-col-4 grid-left" > - {{ currentPrice }} ct + {{ etData.etCurrentPriceString }} {{ props.chargepoint.etActive ? (Math.round(props.chargepoint.etMaxPrice * 10) / 10).toFixed(1) + - ' ct' + priceUnit : '-' }} { } } }) - +const priceUnit = computed(() => { + return globalData.country === 'ch' ? ' Rp' : ' ct' +}) //methods function loadSoc() { updateServer('socUpdate', 1, props.chargepoint.connectedVehicle) diff --git a/packages/modules/web_themes/colors/source/src/components/chargePointList/cpConfig/ConfigPv.vue b/packages/modules/web_themes/colors/source/src/components/chargePointList/cpConfig/ConfigPv.vue index 61229674ed..9eeed9ee12 100755 --- a/packages/modules/web_themes/colors/source/src/components/chargePointList/cpConfig/ConfigPv.vue +++ b/packages/modules/web_themes/colors/source/src/components/chargePointList/cpConfig/ConfigPv.vue @@ -11,7 +11,7 @@ -
+
Stärke: -
+
SoC: re_cp.test(key)) - .forEach((key) => { - const found = key.match(re_cp) - if (found && found[1]) { - values['cp' + found[1]] = +(data[key] ?? 0) - } - }) + Object.keys(data) + .filter((key) => re_cp.test(key)) + .forEach((key) => { + const found = key.match(re_cp) + if (found && found[1]) { + values['cp' + found[1]] = +(data[key] ?? 0) + } + }) values.selfUsage = values.pv - values.evuOut if (values.selfUsage < 0) { values.selfUsage = 0 diff --git a/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue b/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue index 53fe483039..1883077239 100755 --- a/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue +++ b/packages/modules/web_themes/colors/source/src/components/priceChart/GlobalPriceChart.vue @@ -127,7 +127,11 @@ const xAxisGenerator = computed(() => { .ticks(plotdata.value.length) .tickSize(5) .tickSizeInner(-height) - .tickFormat((d) => (d.getHours() % 6 == 0 ? timeFormat('%H:%M')(d) : '')) + .tickFormat((d) => + d.getHours() % 6 == 0 && d.getMinutes() == 0 + ? timeFormat('%H:%M')(d) + : '', + ) }) const yAxisGenerator = computed(() => { return ( @@ -156,7 +160,9 @@ const draw = computed(() => { bargroups .append('rect') .attr('class', 'bar') - .attr('x', (d) => xScale.value(d[0])) + .attr('x', (d) => { + return xScale.value(d[0]) + }) .attr('y', (d) => yScale.value(d[1])) .attr('width', barwidth.value) .attr('height', (d) => yScale.value(yDomain.value[0]) - yScale.value(d[1])) @@ -172,7 +178,11 @@ const draw = computed(() => { .selectAll('.tick line') .attr('stroke', 'var(--color-bg)') .attr('stroke-width', (d) => - (d as Date).getHours() % 6 == 0 ? '2' : '0.5', + (d as Date).getMinutes() == 0 + ? (d as Date).getHours() % 6 == 0 + ? '2' + : '0.5' + : '0', ) xAxis.select('.domain').attr('stroke', 'var(--color-bg') // Y Axis diff --git a/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue b/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue index 7399c297cb..1ecbebd3f1 100755 --- a/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue +++ b/packages/modules/web_themes/colors/source/src/components/priceChart/PriceChart.vue @@ -23,7 +23,7 @@ :show-subrange="true" :subrange-min="prices[0]" :subrange-max="prices[prices.length - 1]" - unit="ct" + :unit="globalData.country == 'ch' ? 'Rp' : 'ct'" />
@@ -50,6 +50,7 @@ - + + diff --git a/packages/modules/web_themes/koala/source/src/components/BatteryCard.vue b/packages/modules/web_themes/koala/source/src/components/BatteryCard.vue index e94f44a0ab..202d5a9390 100644 --- a/packages/modules/web_themes/koala/source/src/components/BatteryCard.vue +++ b/packages/modules/web_themes/koala/source/src/components/BatteryCard.vue @@ -7,15 +7,17 @@ 'full-height': props.fullHeight, }" > - +
{{ cardTitle }}
- +
diff --git a/packages/modules/web_themes/koala/source/src/components/ChargePointInformation.vue b/packages/modules/web_themes/koala/source/src/components/ChargePointInformation.vue index 6c03688eaa..ed7e453845 100644 --- a/packages/modules/web_themes/koala/source/src/components/ChargePointInformation.vue +++ b/packages/modules/web_themes/koala/source/src/components/ChargePointInformation.vue @@ -23,20 +23,34 @@ @row-click="onRowClick" > + +