@@ -6,6 +6,8 @@ All notable changes to NextFloor, newest first. Every release lists what is **Ad
### Added
### Added
- **Native Symcon archive trends:** Logged values expose a compact trend icon in floating room cards and room/HVAC/weather/meter readouts. A lazy dialog reads original archive data with custom time/resolution and Y limits, time navigation, wheel/drag zoom, line/step/bar/table views, min/max, live refresh and CSV export. Counter aggregation uses native interval consumption; Boolean/string logs, empty/error/limited responses and different units are handled explicitly.
- **Native Symcon utility meters:** Discover electricity, water, gas, heating and cooling meters in a room's linked area hierarchy, including hidden categories and dummy modules. Display instantaneous power/flow and cumulative energy/consumption separately, sum compatible room readings per floor, and allow independent floor meter overrides for every medium through the object-tree picker. Preserve periods and units, deduplicate links, prefer parent totals over sub-meters, watch live updates, and expose room and floor reports.
- **Native Symcon utility meters:** Discover electricity, water, gas, heating and cooling meters in a room's linked area hierarchy, including hidden categories and dummy modules. Display instantaneous power/flow and cumulative energy/consumption separately, sum compatible room readings per floor, and allow independent floor meter overrides for every medium through the object-tree picker. Preserve periods and units, deduplicate links, prefer parent totals over sub-meters, watch live updates, and expose room and floor reports.
- **Native Symcon room climate and clocks:** Select underfloor heating, supply/extract VSRs and temperatures, reheater and an aliased Integer room status from the object tree. The room menu displays and controls native writable values and shows multiple classic weekly schedules with day groups, switch points, action labels and activation controls.
- **Native Symcon room climate and clocks:** Select underfloor heating, supply/extract VSRs and temperatures, reheater and an aliased Integer room status from the object tree. The room menu displays and controls native writable values and shows multiple classic weekly schedules with day groups, switch points, action labels and activation controls.
@@ -23,6 +25,8 @@ All notable changes to NextFloor, newest first. Every release lists what is **Ad
### Changed
### Changed
- **Explicit Symcon area names:** Selecting a room area preserves the room name. A dedicated button adopts only the actual leaf category name.
- **Incomplete Symcon utility sums:** Keep the sum of available meter values and prefix it with `Err:` in room/floor reports and power labels. Show `Err: –` when every source is unavailable and remove the marker automatically after recovery.
- **Incomplete Symcon utility sums:** Keep the sum of available meter values and prefix it with `Err:` in room/floor reports and power labels. Show `Err: –` when every source is unavailable and remove the marker automatically after recovery.
- **Symcon interface:** Underfloor heating moves into room climate. The linked room-status alias replaces the calculated comfort value. Announcement, speaker, quiet-time and Bluetooth-location controls are removed from the Symcon interface.
- **Symcon interface:** Underfloor heating moves into room climate. The linked room-status alias replaces the calculated comfort value. Announcement, speaker, quiet-time and Bluetooth-location controls are removed from the Symcon interface.
/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */
varB=globalThis,j=B.ShadowRoot&&(B.ShadyCSS===void0||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"inDocument.prototype&&"replace"inCSSStyleSheet.prototype,Z=Symbol(),ht=newWeakMap,H=class{constructor(t,i,r){if(this._$cssResult$=!0,r!==Z)throwError("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}getstyleSheet(){lett=this.o,i=this.t;if(j&&t===void0){letr=i!==void0&&i.length===1;r&&(t=ht.get(i)),t===void0&&((this.o=t=newCSSStyleSheet).replaceSync(this.cssText),r&&ht.set(i,t))}returnt}toString(){returnthis.cssText}},ct=s=>newH(typeofs=="string"?s:s+"",void0,Z),y=(s,...t)=>{leti=s.length===1?s[0]:t.reduce((r,e,n)=>r+(o=>{if(o._$cssResult$===!0)returno.cssText;if(typeofo=="number")returno;throwError("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+s[n+1],s[0]);returnnewH(i,s,Z)},dt=(s,t)=>{if(j)s.adoptedStyleSheets=t.map(i=>iinstanceofCSSStyleSheet?i:i.styleSheet);elsefor(letioft){letr=document.createElement("style"),e=B.litNonce;e!==void0&&r.setAttribute("nonce",e),r.textContent=i.cssText,s.appendChild(r)}},F=j?s=>s:s=>sinstanceofCSSStyleSheet?(t=>{leti="";for(letroft.cssRules)i+=r.cssText;returnct(i)})(s):s;var{is:Rt,defineProperty:Ht,getOwnPropertyDescriptor:Ot,getOwnPropertyNames:Lt,getOwnPropertySymbols:Nt,getPrototypeOf:Ut}=Object,V=globalThis,pt=V.trustedTypes,Dt=pt?pt.emptyScript:"",It=V.reactiveElementPolyfillSupport,O=(s,t)=>s,K={toAttribute(s,t){switch(t){caseBoolean:s=s?Dt:null;break;caseObject:caseArray:s=s==null?s:JSON.stringify(s)}returns},fromAttribute(s,t){leti=s;switch(t){caseBoolean:i=s!==null;break;caseNumber:i=s===null?null:Number(s);break;caseObject:caseArray:try{i=JSON.parse(s)}catch{i=null}}returni}},ft=(s,t)=>!Rt(s,t),ut={attribute:!0,type:String,converter:K,reflect:!1,useDefault:!1,hasChanged:ft};Symbol.metadata??=Symbol("metadata"),V.litPropertyMetadata??=newWeakMap;var_=classextendsHTMLElement{staticaddInitializer(t){this._$Ei(),(this.l??=[]).push(t)}staticgetobservedAttributes(){returnthis.finalize(),this._$Eh&&[...this._$Eh.keys()]}staticcreateProperty(t,i=ut){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){letr=Symbol(),e=this.getPropertyDescriptor(t,r,i);e!==void0&&Ht(this.prototype,t,e)}}staticgetPropertyDescriptor(t,i,r){let{get:e,set:n}=Ot(this.prototype,t)??{get(){returnthis[i]},set(o){this[i]=o}};return{get:e,set(o){leth=e?.call(this);n?.call(this,o),this.requestUpdate(t,h,r)},configurable:!0,enumerable:!0}}staticgetPropertyOptions(t){returnthis.elementProperties.get(t)??ut}static_$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;lett=Ut(this);t.finalize(),t.l!==void0&&(this.l=[...t.l]),this.elementProperties=newMap(t.elementProperties)}staticfinalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){leti=this.properties,r=[...Lt(i),...Nt(i)];for(leteofr)this.createProperty(e,i[e])}lett=this[Symbol.metadata];if(t!==null){leti=litPropertyMetadata.get(t);if(i!==void0)for(let[r,e]ofi)this.elementProperties.set(r,e)}this._$Eh=newMap;for(let[i,r]ofthis.elementProperties){lete=this._$Eu(i,r);e!==void0&&this._$Eh.set(e,i)}this.elementStyles=this.finalizeStyles(this.styles)}staticfinalizeStyles(t){leti=[];if(Array.isArray(t)){letr=newSet(t.flat(1/0).reverse());for(leteofr)i.unshift(F(e))}elset!==void0&&i.push(F(t));returni}static_$Eu(t,i){letr=i.attribute;returnr===!1?void0:typeofr=="string"?r:typeoft=="string"?t.toLowerCase():void0}constructor(){super(),this._$Ep=void0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=newPromise(t=>this.enableUpdating=t),this._$AL=newMap,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=newSet).add(t),this.renderRoot!==void0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){lett=newMap,i=this.constructor.elementProperties;for(letrofi.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),deletethis[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){lett=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);returndt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,i,r){this._$AK(t,r)}_$ET(t,i){letr=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,r);if(e!==void0&&r.reflect===!0){letn=(r.converter?.toAttribute!==void0?r.converter:K).toAttribute(i,r.type);this._$Em=t,n==null?this.removeAttribute(e):this.setAttribute(e,n),Line truncated
`;varkt={auto:"Automatisch",raw:"Rohdaten",minute:"1 Minute","5minutes":"5 Minuten","15minutes":"15 Minuten",hour:"Stunde",day:"Tag",week:"Woche",month:"Monat",year:"Jahr"};functionMt(s,t){leti=newSet;returnt.flatMap(r=>{lete=String(s?.states[r]?.attributes.symcon_source_entity||r),n=s?.states[e]?.attributes,o=Number(n?.symcon_id);return!o||!n?.symcon_archive||i.has(o)?[]:(i.add(o),[e])})}functionst(s){if(!Number.isFinite(s))return"";lett=newDate(s*1e3);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}T${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}functionTt(s,t,i,r){lete=c=>c.trim()&&Number.isFinite(Number(c.replace(",",".")))?Number(c.replace(",",".")):null,n=e(t),o=e(i),h=n??s.reduce((c,p)=>Math.min(c,p),r||!s.length?0:1/0),a=o??s.reduce((c,p)=>Math.max(c,p),r?0:s.length?-1/0:1);if(h===a&&(n===null&&!r&&(h-=Math.max(1,Math.abs(h)*.05)),o===null&&(a+=Math.max(1,Math.abs(a)*.05))),h>=a)thrownewError("Der untere Wertebereich muss kleiner als der obere sein.");return[h,a]}functionCt(s,t){leti=r=>{lete=String(r??"");return`"${/^[=+@\-\t\r]/.test(e)?"'":""}${e.replaceAll('"','""')}"`};return"\uFEFF"+[["Variable","Zeit","Wert","Minimum","Maximum"].join(";"),...s.flatMap(r=>r.points.map(e=>[t[r.entity_id]||r.entity_id,newDate(e.t*1e3).toISOString(),e.v,e.min??"",e.max??""].map(i).join(";")))].join(`\r
p { white-space:pre-wrap; overflow-wrap:anywhere; margin:16px 0 4px; }
`]};customElements.get("nf-help-popup")||customElements.define("nf-help-popup",ot);var zt=["#4ec9ff","#ffbe69","#ae9bff","#72deb0","#ff87aa","#ebde72"],C=(s,t)=>String(s.states[t]?.attributes.friendly_name||t),Pt=s=>({variable_not_logged:"Die Variable wird nicht mehr geloggt.",trend_range_too_large_for_resolution:"Bitte f\xFCr diesen Zeitraum eine gr\xF6bere Aufl\xF6sung w\xE4hlen.",invalid_trend_range:"Bitte einen g\xFCltigen Zeitraum w\xE4hlen."})[String(s instanceof Error?s.message:s)]||String(s instanceof Error?s.message:s),at=class extends x{static properties={hass:{attribute:!1},ids:{attribute:!1},label:{attribute:!1},from:{state:!0},to:{state:!0},resolution:{state:!0},chartStyle:{state:!0},field:{state:!0},min:{state:!0},max:{state:!0},zero:{state:!0},band:{state:!0},live:{state:!0},series:{state:!0},hiddenSeries:{state:!0},loading:{state:!0},errors:{state:!0},hover:{state:!0},width:{state:!0},page:{state:!0}};request=0;drag=null;timer;observer;constructor(){super(),this.ids=[],this.label="",this.to=Math.floor(Date.now()/1e3),this.from=this.to-86400,this.resolution="auto",this.chartStyle="auto",this.field="v",this.min="",this.max="",this.zero=!1,this.band=!0,this.live=!1,this.series=[],this.hiddenSeries=new Set,this.loading=!1,this.errors=[],this.hover=null,this.width=900,this.page=0}async open(){await this.updateComplete,this.renderRoot.querySelector("dialog").showModal(),this.observer=new ResizeObserver(([t])=>{this.width=Math.max(280,Math.floor(t.contentRect.width))}),this.observer.observe(this.renderRoot.querySelector(".body")),this.timer=setInterval(()=>{if(this.live&&!this.loading){let t=this.to-this.from;this.to=Math.floor(Date.now()/1e3),this.from=this.to-t,this.load()}},3e4),await this.load()}disconnectedCallback(){super.disconnectedCallback(),++this.request,clearInterval(this.timer),this.observer?.disconnect()}async load(){let t=++this.request,i=this.from,r=this.to;if(this.errors=[],this.series=[],this.hover=null,this.page=0,!Number.isSafeInteger(i)||!Number.isSafeInteger(r)||i<1||r<=i){this.errors=["Das Ende muss nach dem Beginn des Zeitraums liegen."],this.loading=!1;return}this.loading=!0;let e=[],n=[];for(let o=0;o<this.ids.length&&t===this.request;o+=3){let h=this.ids.slice(o,o+3);(await Promise.allSettled(h.map(c=>this.hass.callWS({type:"nextfloor/archive/trend",entity_id:c,start:i,end:r,aggregation:this.resolution})))).forEach((c,p)=>c.status==="fulfilled"?e.push(c.value):n.push(`${C(this.hass,h[p])}:${Pt(c.reason)}`))}t!==this.request||!this.isConnected||(this.series=e,this.errors=n,this.loading=!1)}range(t,i){this.from=Math.max(1,Math.floor(t)),this.to=Math.max(this.from+1,Math.floor(i)),this.live=!1,this.load()}zoom(t,i=.5){let r=Math.max(60,Math.min(315576e3,(this.to-this.from)*t)),e=this.from+(this.to-this.from)*i;this.range(e-r*i,e+r*(1-i))}stamp(t){return new Date(t*1e3).toLocaleString(this.hass.language,{dateStyle:"short",timeStyle:"medium"})}number(t){return t.toLocaleString(this.hass.language,{maximumFractionDigits:Math.abs(t)<.01&&t!==0?5:2})}unit(t){return String(this.hass.states[t]?.attributes.unit_of_measurement??"")}selected(){return this.series.filter(t=>!this.hiddenSeries.has(t.entity_id))}value(t){let i=this.field==="v"?t.v:t[this.field]??t.v;return typeof i=="number"&&Number.isFinite(i)?i:null}color(t){return zt[this.ids.indexOf(t)%zt.length]}ratio(t){let i=t.currentTarget.getBoundingClientRect();return Math.max(0,Math.min(1,((t.clientX-i.left)/i.width*this.width-64)/(this.width-80)))}exportCsv(){let t=Object.fromEntries(this.ids.map(e=>[e,String(this.hass.states[e]?.attributes.symcon_path||C(this.hass,e))])),i=URL.createObjectURL(new Blob([Ct(this.selected(),t)],{type:"text/csv;charset=utf-8"})),r=document.createElement("a");r.href=i,r.download="Symcon-Trend.csv",r.click(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}plot(t,i){let r=t.flatMap(l=>l.points.flatMap(f=>{let m=this.value(f);return m===null?[]:this.band&&!l.counter?[m,f.min??m,f.max??m]:[m]}));if(!r.length)return g`<pclass="note">KeinenumerischenArchivwerteindiesemZeitraum.</p>`;lete,n;try{[e,n]=Tt(r,this.min,this.max,this.zero||this.chartStyle==="bar"||t.some(l=>l.type===0)||this.chartStyle==="auto"&&t.some(l=>l.counter&&l.aggregation!=="raw"))}catch(l){returng`<prole="alert">${Pt(l)}</p>`}leto=64,h=this.width-16,a=14,c=220,p=l=>o+(l-this.from)/(this.to-this.from)*(h-o),d=l=>c-(l-e)/(n-e)*(c-a),v=(l,f=this.field)=>Number(f==="v"?l.v:l[f]??l.v),$=(l,f=this.field)=>{letm=l.points.filter(z=>typeofz.v=="number"),b=this.chartStyle==="step"||this.chartStyle==="auto"&&l.type===0;returnm.map((z,lt)=>`${lt?b?`H${p(z.t).toFixed(1)}V`:"L":"M"}${b&<?d(v(z,f)).toFixed(1):`${p(z.t).toFixed(1)},${d(v(z,f)).toFixed(1)}`}`).join("")+(m.length?b?`H${h}`:l.aggregation==="raw"?`L${h},${d(v(m[m.length-1],f)).toFixed(1)}`:"":"")},w=this.width<480?2:5;returng`<sectionclass="chart-group"><h3>${i||"Wert"}</h3><svgclass="plot"viewBox=${`00${this.width}256`}role="img"aria-label=${`Trend${i}`}@wheel=${Line truncated
<nf-help-popup.text=${"Zeitraum und Aufl\xF6sung lesen die originalen Symcon-Archivdaten. Rohdaten zeigen gespeicherte \xC4nderungen; ein zuvor bekannter Wert wird zum Beginn fortgef\xFChrt. Bei Z\xE4hlern sind aggregierte Werte der Verbrauch pro Intervall, bei Messwerten der Mittelwert. Mehrere Variablen werden einzeln dargestellt; unterschiedliche Einheiten erhalten eigene Diagramme. Zoomen: +/\u2212, Mausrad oder im Diagramm einen Zeitraum ziehen. Eigene Y-Grenzen gelten f\xFCr alle Diagramme. Begrenzte Rohdatenabfragen werden gekennzeichnet; w\xE4hle dann einen k\xFCrzeren Zeitraum oder eine Aggregation."}></nf-help-popup>
${this.errors.map(e=>g`<p class="error" role="alert">${e}</p>`)}${this.loading?g`<p class="note" role="status">Archivwerte werden geladen …</p>`:u}
${t.filter(e=>e.truncated).map(e=>g`<p class="error" role="status">${C(this.hass,e.entity_id)}: Die Abfrage ist auf ${(e.limit??1e4).toLocaleString(this.hass.language)} Einträge begrenzt. Bitte Zeitraum verkürzen oder Auflösung ändern.</p>`)}
${t.some(e=>e.counter&&e.aggregation!=="raw")?g`<p class="note">Zähler: Verbrauch pro Intervall</p>`:u}
`]};customElements.get("nf-trend-dialog")||customElements.define("nf-trend-dialog",at);async function ye(s,t,i){let r=Mt(s,t);if(!r.length)return;let e=document.createElement("nf-trend-dialog");Object.assign(e,{hass:s,ids:r,label:i}),document.body.append(e);try{await e.open()}catch(n){throw e.remove(),n}}export{at as NfTrendDialog,ye as openTrend};
consterrorText=(e: unknown)=>({variable_not_logged:"Die Variable wird nicht mehr geloggt.",trend_range_too_large_for_resolution:"Bitte für diesen Zeitraum eine gröbere Auflösung wählen.",invalid_trend_range:"Bitte einen gültigen Zeitraum wählen."}asRecord<string,string>)[String(einstanceofError?e.message : e)]||String(einstanceofError?e.message : e);
/** Lazy, read-only archive viewer, shared by designer and tile iframe. */
if(!Number.isSafeInteger(start)||!Number.isSafeInteger(end)||start<1||end<=start){this.errors=["Das Ende muss nach dem Beginn des Zeitraums liegen."];this.loading=false;return;}
<nf-help-popup.text=${"Zeitraum und Auflösung lesen die originalen Symcon-Archivdaten. Rohdaten zeigen gespeicherte Änderungen; ein zuvor bekannter Wert wird zum Beginn fortgeführt. Bei Zählern sind aggregierte Werte der Verbrauch pro Intervall, bei Messwerten der Mittelwert. Mehrere Variablen werden einzeln dargestellt; unterschiedliche Einheiten erhalten eigene Diagramme. Zoomen: +/−, Mausrad oder im Diagramm einen Zeitraum ziehen. Eigene Y-Grenzen gelten für alle Diagramme. Begrenzte Rohdatenabfragen werden gekennzeichnet; wähle dann einen kürzeren Zeitraum oder eine Aggregation."}></nf-help-popup>
${this.errors.map((e)=>html`<p class="error" role="alert">${e}</p>`)}${this.loading?html`<p class="note" role="status">Archivwerte werden geladen …</p>`:nothing}
${selected.filter((s)=>s.truncated).map((s)=>html`<p class="error" role="status">${entityName(this.hass,s.entity_id)}: Die Abfrage ist auf ${(s.limit??10000).toLocaleString(this.hass.language)} Einträge begrenzt. Bitte Zeitraum verkürzen oder Auflösung ändern.</p>`)}
${selected.some((s)=>s.counter&&s.aggregation!=="raw")?html`<p class="note">Zähler: Verbrauch pro Intervall</p>`:nothing}
${this.readings.filter((r)=>r.kind===kind).map((r)=>html`<div class="reading" title=${`${r.manual?"Stockwerkszähler":"Bereichszähler"}${r.incomplete?" · Err: Mindestens ein Wert fehlt; angezeigt wird die Summe der verfügbaren Werte.":""}\n${r.sources.map((id)=>this.hass.states[id]?.attributes.symcon_path||this.hass.states[id]?.attributes.friendly_name||id).join("\n")}`}>
${this.readings.filter((r)=>r.kind===kind).map((r)=>html`<div class="reading" title=${`${r.manual?"Stockwerkszähler":"Bereichszähler"}${r.incomplete?" · Err: Mindestens ein Wert fehlt; angezeigt wird die Summe der verfügbaren Werte.":""}\n${r.sources.map((id)=>this.hass.states[id]?.attributes.symcon_path||this.hass.states[id]?.attributes.friendly_name||id).join("\n")}`}>
returnnewResponse(JSON.stringify({state_revision:window.bootstrapCalls,building_revision:1,variables,objects,areas:[{area_id:"symcon-category-100",name:"Gebäude / OG / Technik"}]}));
assert.equal(trendAssetRequests,0,"the chart bundle stays lazy until a trend is opened");
assert.equal(awaitpage.evaluate(()=>!!window.climateView.shadowRoot.querySelector(`.live-card[data-room="${window.climateRoomId}"] .live-climate-humidity nf-trend-button`)),false,"unlogged values have no trend icon");
if(ids.length===2)assert.equal(awaitpage.evaluate(()=>document.querySelector("nf-trend-dialog").shadowRoot.querySelectorAll(".chart-group").length),2,"different units have separate axes");
console.log("OK: native climate/HVAC/schedules/weather/presence; explicit area leaf-name adoption; lazy archive trends with time/resolution/Y range, raw/Boolean/string data, CSV, error/empty/limit states, separate units and desktop/mobile dialogs");
/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */
/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */
varx={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",fr:"6312d0f61ebf",hu:"27ba348531dc",it:"1b705e76dd00",nb:"c5ea24fb9ef6",nl:"b64142c67c2e",pl:"8527a4930402",pt:"31857a2d2277",ro:"e3cb5f449f0f",sk:"320611594db0",sl:"8071691ceda3",sv:"711b911ec8da",tr:"7c83ce1c3372",zh:"50518d9f494e"};Array.prototype.at||Object.defineProperty(Array.prototype,"at",{configurable:!0,writable:!0,value:function(e){lett=Math.trunc(e)||0;returnthis[t<0?this.length+t:t]}});typeofglobalThis.structuredClone!="function"&&(globalThis.structuredClone=r=>r===void0?r:JSON.parse(JSON.stringify(r)));varPn=globalThis,In=Pn.ShadowRoot&&(Pn.ShadyCSS===void0||Pn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"inDocument.prototype&&"replace"inCSSStyleSheet.prototype,Qr=Symbol(),Go=newWeakMap,Ut=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==Qr)throwError("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}getstyleSheet(){lete=this.o,t=this.t;if(In&&e===void0){letn=t!==void0&&t.length===1;n&&(e=Go.get(t)),e===void0&&((this.o=e=newCSSStyleSheet).replaceSync(this.cssText),n&&Go.set(t,e))}returne}toString(){returnthis.cssText}},Uo=r=>newUt(typeofr=="string"?r:r+"",void0,Qr),Q=(r,...e)=>{lett=r.length===1?r[0]:e.reduce((n,i,o)=>n+(s=>{if(s._$cssResult$===!0)returns.cssText;if(typeofs=="number")returns;throwError("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1],r[0]);returnnewUt(t,r,Qr)},jo=(r,e)=>{if(In)r.adoptedStyleSheets=e.map(t=>tinstanceofCSSStyleSheet?t:t.styleSheet);elsefor(lettofe){letn=document.createElement("style"),i=Pn.litNonce;i!==void0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},Xr=In?r=>r:r=>rinstanceofCSSStyleSheet?(e=>{lett="";for(letnofe.cssRules)t+=n.cssText;returnUo(t)})(r):r;var{is:Lu,defineProperty:Ou,getOwnPropertyDescriptor:Bu,getOwnPropertyNames:Vu,getOwnPropertySymbols:Ku,getPrototypeOf:Gu}=Object,Cn=globalThis,qo=Cn.trustedTypes,Uu=qo?qo.emptyScript:"",ju=Cn.reactiveElementPolyfillSupport,jt=(r,e)=>r,ei={toAttribute(r,e){switch(e){caseBoolean:r=r?Uu:null;break;caseObject:caseArray:r=r==null?r:JSON.stringify(r)}returnr},fromAttribute(r,e){lett=r;switch(e){caseBoolean:t=r!==null;break;caseNumber:t=r===null?null:Number(r);break;caseObject:caseArray:try{t=JSON.parse(r)}catch{t=null}}returnt}},Yo=(r,e)=>!Lu(r,e),Zo={attribute:!0,type:String,converter:ei,reflect:!1,useDefault:!1,hasChanged:Yo};Symbol.metadata??=Symbol("metadata"),Cn.litPropertyMetadata??=newWeakMap;varze=classextendsHTMLElement{staticaddInitializer(e){this._$Ei(),(this.l??=[]).push(e)}staticgetobservedAttributes(){returnthis.finalize(),this._$Eh&&[...this._$Eh.keys()]}staticcreateProperty(e,t=Zo){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){letn=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void0&&Ou(this.prototype,e,i)}}staticgetPropertyDescriptor(e,t,n){let{get:i,set:o}=Bu(this.prototype,e)??{get(){returnthis[t]},set(s){this[t]=s}};return{get:i,set(s){leta=i?.call(this);o?.call(this,s),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}staticgetPropertyOptions(e){returnthis.elementProperties.get(e)??Zo}static_$Ei(){if(this.hasOwnProperty(jt("elementProperties")))return;lete=Gu(this);e.finalize(),e.l!==void0&&(this.l=[...e.l]),this.elementProperties=newMap(e.elementProperties)}staticfinalize(){if(this.hasOwnProperty(jt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(jt("properties"))){lett=this.properties,n=[...Vu(t),...Ku(t)];for(letiofn)this.createProperty(i,t[i])}lete=this[Symbol.metadata];if(e!==null){lett=litPropertyMetadata.get(e);if(t!==void0)for(let[n,i]oft)this.elementProperties.set(n,i)}this._$Eh=newMap;for(let[t,n]ofthis.elementProperties){leti=this._$Eu(t,n);i!==void0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}staticfinalizeStyles(e){lett=[];if(Array.isArray(e)){letn=newSet(e.flat(1/0).reverse());for(letiofn)t.unshift(Xr(i))}elsee!==void0&&t.push(Xr(e));returnt}static_$Eu(e,t){letn=t.attribute;returnn===!1?void0:typeofn=="string"?n:typeofe=="string"?e.toLowerCase():void0}constructor(){super(),this._$Ep=void0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=newPromise(e=>this.enableUpdating=e),this._$AL=newMap,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=newSet).add(e),this.renderRoot!==void0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){lete=newMap,t=this.constructor.elementProperties;for(letnoft.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),deletethis[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){lete=this.shadLine truncated
varx={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",fr:"6312d0f61ebf",hu:"27ba348531dc",it:"1b705e76dd00",nb:"c5ea24fb9ef6",nl:"b64142c67c2e",pl:"8527a4930402",pt:"31857a2d2277",ro:"e3cb5f449f0f",sk:"320611594db0",sl:"8071691ceda3",sv:"711b911ec8da",tr:"7c83ce1c3372",zh:"50518d9f494e"};Array.prototype.at||Object.defineProperty(Array.prototype,"at",{configurable:!0,writable:!0,value:function(e){lett=Math.trunc(e)||0;returnthis[t<0?this.length+t:t]}});typeofglobalThis.structuredClone!="function"&&(globalThis.structuredClone=r=>r===void0?r:JSON.parse(JSON.stringify(r)));varIn=globalThis,Nn=In.ShadowRoot&&(In.ShadyCSS===void0||In.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"inDocument.prototype&&"replace"inCSSStyleSheet.prototype,ei=Symbol(),Zo=newWeakMap,jt=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==ei)throwError("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}getstyleSheet(){lete=this.o,t=this.t;if(Nn&&e===void0){letn=t!==void0&&t.length===1;n&&(e=Zo.get(t)),e===void0&&((this.o=e=newCSSStyleSheet).replaceSync(this.cssText),n&&Zo.set(t,e))}returne}toString(){returnthis.cssText}},Yo=r=>newjt(typeofr=="string"?r:r+"",void0,ei),X=(r,...e)=>{lett=r.length===1?r[0]:e.reduce((n,i,o)=>n+(s=>{if(s._$cssResult$===!0)returns.cssText;if(typeofs=="number")returns;throwError("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1],r[0]);returnnewjt(t,r,ei)},Jo=(r,e)=>{if(Nn)r.adoptedStyleSheets=e.map(t=>tinstanceofCSSStyleSheet?t:t.styleSheet);elsefor(lettofe){letn=document.createElement("style"),i=In.litNonce;i!==void0&&n.setAttribute("nonce",i),n.textContent=t.cssText,r.appendChild(n)}},ti=Nn?r=>r:r=>rinstanceofCSSStyleSheet?(e=>{lett="";for(letnofe.cssRules)t+=n.cssText;returnYo(t)})(r):r;var{is:Ku,defineProperty:Gu,getOwnPropertyDescriptor:Uu,getOwnPropertyNames:ju,getOwnPropertySymbols:qu,getPrototypeOf:Zu}=Object,Cn=globalThis,Qo=Cn.trustedTypes,Yu=Qo?Qo.emptyScript:"",Ju=Cn.reactiveElementPolyfillSupport,qt=(r,e)=>r,ni={toAttribute(r,e){switch(e){caseBoolean:r=r?Yu:null;break;caseObject:caseArray:r=r==null?r:JSON.stringify(r)}returnr},fromAttribute(r,e){lett=r;switch(e){caseBoolean:t=r!==null;break;caseNumber:t=r===null?null:Number(r);break;caseObject:caseArray:try{t=JSON.parse(r)}catch{t=null}}returnt}},es=(r,e)=>!Ku(r,e),Xo={attribute:!0,type:String,converter:ni,reflect:!1,useDefault:!1,hasChanged:es};Symbol.metadata??=Symbol("metadata"),Cn.litPropertyMetadata??=newWeakMap;varDe=classextendsHTMLElement{staticaddInitializer(e){this._$Ei(),(this.l??=[]).push(e)}staticgetobservedAttributes(){returnthis.finalize(),this._$Eh&&[...this._$Eh.keys()]}staticcreateProperty(e,t=Xo){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){letn=Symbol(),i=this.getPropertyDescriptor(e,n,t);i!==void0&&Gu(this.prototype,e,i)}}staticgetPropertyDescriptor(e,t,n){let{get:i,set:o}=Uu(this.prototype,e)??{get(){returnthis[t]},set(s){this[t]=s}};return{get:i,set(s){leta=i?.call(this);o?.call(this,s),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}staticgetPropertyOptions(e){returnthis.elementProperties.get(e)??Xo}static_$Ei(){if(this.hasOwnProperty(qt("elementProperties")))return;lete=Zu(this);e.finalize(),e.l!==void0&&(this.l=[...e.l]),this.elementProperties=newMap(e.elementProperties)}staticfinalize(){if(this.hasOwnProperty(qt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(qt("properties"))){lett=this.properties,n=[...ju(t),...qu(t)];for(letiofn)this.createProperty(i,t[i])}lete=this[Symbol.metadata];if(e!==null){lett=litPropertyMetadata.get(e);if(t!==void0)for(let[n,i]oft)this.elementProperties.set(n,i)}this._$Eh=newMap;for(let[t,n]ofthis.elementProperties){leti=this._$Eu(t,n);i!==void0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}staticfinalizeStyles(e){lett=[];if(Array.isArray(e)){letn=newSet(e.flat(1/0).reverse());for(letiofn)t.unshift(ti(i))}elsee!==void0&&t.push(ti(e));returnt}static_$Eu(e,t){letn=t.attribute;returnn===!1?void0:typeofn=="string"?n:typeofe=="string"?e.toLowerCase():void0}constructor(){super(),this._$Ep=void0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=newPromise(e=>this.enableUpdating=e),this._$AL=newMap,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=newSet).add(e),this.renderRoot!==void0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){lete=newMap,t=this.constructor.elementProperties;for(letnoft.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),deletethis[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){lete=this.shadLine truncated
{url}`,manual:"Anleitung",manual_more:"Mehr erfahren",feature_text_energy:"Energieteilchen fliegen in B\xF6gen von den Solarfeldern zum Wechselrichter, zwischen Haus, Akku, Netz und Verbrauchern \u2013 schneller und dichter, je mehr Strom flie\xDFt. Die Module funkeln mit ihrer Produktion, eine Glaskarte \xFCber dem Dach zeigt die Bilanz und wie autark das Haus gerade ist.",live_autarky:"autark",live_fold:"Karte verkleinern",live_unfold:"Karte aufklappen",live_day_hint:"Die letzten 24 Stunden: Solar (Fl\xE4che) und Verbrauch (Linie)",live_week_hint:"Die letzten 7 Tage: Sonne {solar} kWh, Verbrauch {use} kWh (gelb: Sonne, hell: Verbrauch)",live_days:"Tage",live_car_away:"Unterwegs",live_car_charging:"L\xE4dt",live_car_plugged:"Eingesteckt",live_car_lock:"Verriegeln",live_car_unlock:"Entriegeln",live_car_unlock_confirm:"{name} wirklich entriegeln?",live_car_climate:"Klimatisierung",live_car_charge:"Laden starten/stoppen",live_media_prev:"Zur\xFCck",live_media_playpause:"Abspielen/Pause",live_media_next:"Weiter",live_media_volume:"Lautst\xE4rke",live_car_device:"Auto (eine Entit\xE4t des Autos)",live_car_device_hint:"Ladestand, Reichweite, Laden, Stecker, Schloss und Klima findet NextFloor selbst am Ger\xE4t des Autos. Ohne Angabe nimmt es den Anwesenheitssensor des Stellplatzes.",live_car_departure_entity:"Abfahrtszeit (optional)",live_car_departure:"Abfahrt {time}",live_car_open:"Offen: {parts}",printer_printing:"druckt",printer_done:"fertig",printer_paused:"pausiert",printer_error:"Fehler",printer_idle:"bereit",printer_done_at:"fertig um {time}",printer_layer:"Schicht",printer_nozzle:"D\xFCse",printer_bed:"Bett",heatpump_heating:"heizt",heatpump_water:"macht Warmwasser",heatpump_cooling:"k\xFChlt",heatpump_defrost:"taut ab",heatpump_idle:"in Ruhe",heatpump_flow_return:"Vor- \u2192 R\xFCcklauf",heatpump_heat:"W\xE4rme",heatpump_power:"Strom",heatpump_outside:"au\xDFen",pack_missing_item:"M\xF6bel aus entferntem Pack",back_to_room:"Zur\xFCck zu {room}",back_to_floor:"Zur\xFCck zur Etage",hint_furniture:"Raum antippen, dann rechts ein M\xF6belst\xFCck w\xE4hlen \xB7 M\xF6bel ziehen, an den Ecken die Gr\xF6\xDFe \xE4ndern",furniture_into:"Neue M\xF6bel kommen in die Mitte von \u201E{room}\u201C.",furniture_pick_room:"Tipp: Erst einen Raum antippen \u2013 dann landen neue M\xF6bel in seiner Mitte.",flows:"Stromfluss",flows_hint:"Energieb\xF6gen zwischen Solarfeldern, Wechselrichter, Akku, Netz und Verbrauchern ein- oder ausblenden",chk_title:"Einrichtung",chk_hint:"Was der Energiefluss braucht. Antippen springt an die Stelle.",chk_solar:"Solarfeld angelegt",chk_solar_add:"Ein Solarfeld aufs Dach legen",chk_meter:"Stromz\xE4hler mit Netzsensor",chk_meter_sensor:"Stromz\xE4hler: Netzsensor (W) fehlt",chk_meter_add:"Stromz\xE4hler anlegen",chk_inverter:"Wechselrichter mit Leistungssensor",chk_inverter_sensor:"Wechselrichter: Leistungssensor fehlt",chk_inverter_add:"Wechselrichter anlegen",chk_battery:"Stromspeicher mit Leistung und Ladestand",chk_battery_sensor:"Stromspeicher: Leistung oder Ladestand fehlt",chk_battery_opt:"Stromspeicher (optional)",chk_grid:"Netzanschluss gesetzt",chk_grid_opt:"Netzanschluss (optional, sonst automatisch)",energy_sign_grid:"Das Haus zeigt Einspeisung, obwohl die Sonne nichts liefert. Der Netzsensor hat wahrscheinlich das umgekehrte Vorzeichen.",energy_sign_battery:"Der Speicher l\xE4dt ohne Sonne und ohne Netzbezug. Sein Sensor hat wahrscheinlich das umgekehrte Vorzeichen.",energy_sign_flip:"Vorzeichen umkehren",help_title:"Hilfe und R\xFCckmeldung",help_hint:"Fehler bitte als Issue auf GitHub, W\xFCnsche als Diskussion \u2013 so geht nichts verloren, und alle sehen den Stand.",help_issue:"Problem melden",help_idea:"Idee vorschlagen",furn_name:"Name (optional)",furn_mirror:"Spiegeln",furn_mirror_hint:"Links und rechts vertauschen \u2013 das L-Sofa andersherum, der Schrank mit der T\xFCr auf der anderen Seite, die K\xFCchenzeile gespiegelt.",hint_opening:"Auf eine Wand tippen, um eine T\xFCr oder ein Fenster einzusetzen \u2013 die Art w\xE4hlst du danach rechts",preset_door:"T\xFCr",preset_door_double:"Doppelt\xFCr",preset_window:"Fenster",preset_window_double:"Fenster 2-fl\xFCgelig",preset_terrace:"Terrassent\xFCr",preset_terrace_double:"Terrassent\xFCr 2-fl\xFCgelig",preset_lift_slide:"Hebe-Schiebet\xFCr",preset_garage:"Garagentor",preset_front:"Haust\xFCr",opening_style:"Stil",sidelight_auto:"automatisch",sidelight_hinge:"Seitenteil an der Anschlagseite",sidelight_hinge_hint:"Das Seitenteil sitzt sonst gegen\xFCber dem Anschlag; mit Haken neben den B\xE4ndern.",sidelight_width:"Breite Seitenteil (m)",sidelight_width_left:"Seitenteil links (m)",sidelight_width_right:"Seitenteil rechts (m)",style_auto:"Automatisch ({style})",style_interior:"Zimmert\xFCr",style_front:"Haust\xFCr",style_front_glass:"Haust\xFCr mit Glasausschnitt",style_sidelight:"Haust\xFCr mit Seitenteil",style_sidelights:"Haust\xFCr mit 2 Seitenteilen",style_glass:"Glast\xFCr",style_sliding:"Schiebet\xFCr",style_p
Line truncated
{url}`,manual:"Anleitung",manual_more:"Mehr erfahren",feature_text_energy:"Energieteilchen fliegen in B\xF6gen von den Solarfeldern zum Wechselrichter, zwischen Haus, Akku, Netz und Verbrauchern \u2013 schneller und dichter, je mehr Strom flie\xDFt. Die Module funkeln mit ihrer Produktion, eine Glaskarte \xFCber dem Dach zeigt die Bilanz und wie autark das Haus gerade ist.",live_autarky:"autark",live_fold:"Karte verkleinern",live_unfold:"Karte aufklappen",live_day_hint:"Die letzten 24 Stunden: Solar (Fl\xE4che) und Verbrauch (Linie)",live_week_hint:"Die letzten 7 Tage: Sonne {solar} kWh, Verbrauch {use} kWh (gelb: Sonne, hell: Verbrauch)",live_days:"Tage",live_car_away:"Unterwegs",live_car_charging:"L\xE4dt",live_car_plugged:"Eingesteckt",live_car_lock:"Verriegeln",live_car_unlock:"Entriegeln",live_car_unlock_confirm:"{name} wirklich entriegeln?",live_car_climate:"Klimatisierung",live_car_charge:"Laden starten/stoppen",live_media_prev:"Zur\xFCck",live_media_playpause:"Abspielen/Pause",live_media_next:"Weiter",live_media_volume:"Lautst\xE4rke",live_car_device:"Auto (eine Entit\xE4t des Autos)",live_car_device_hint:"Ladestand, Reichweite, Laden, Stecker, Schloss und Klima findet NextFloor selbst am Ger\xE4t des Autos. Ohne Angabe nimmt es den Anwesenheitssensor des Stellplatzes.",live_car_departure_entity:"Abfahrtszeit (optional)",live_car_departure:"Abfahrt {time}",live_car_open:"Offen: {parts}",printer_printing:"druckt",printer_done:"fertig",printer_paused:"pausiert",printer_error:"Fehler",printer_idle:"bereit",printer_done_at:"fertig um {time}",printer_layer:"Schicht",printer_nozzle:"D\xFCse",printer_bed:"Bett",heatpump_heating:"heizt",heatpump_water:"macht Warmwasser",heatpump_cooling:"k\xFChlt",heatpump_defrost:"taut ab",heatpump_idle:"in Ruhe",heatpump_flow_return:"Vor- \u2192 R\xFCcklauf",heatpump_heat:"W\xE4rme",heatpump_power:"Strom",heatpump_outside:"au\xDFen",pack_missing_item:"M\xF6bel aus entferntem Pack",back_to_room:"Zur\xFCck zu {room}",back_to_floor:"Zur\xFCck zur Etage",hint_furniture:"Raum antippen, dann rechts ein M\xF6belst\xFCck w\xE4hlen \xB7 M\xF6bel ziehen, an den Ecken die Gr\xF6\xDFe \xE4ndern",furniture_into:"Neue M\xF6bel kommen in die Mitte von \u201E{room}\u201C.",furniture_pick_room:"Tipp: Erst einen Raum antippen \u2013 dann landen neue M\xF6bel in seiner Mitte.",flows:"Stromfluss",flows_hint:"Energieb\xF6gen zwischen Solarfeldern, Wechselrichter, Akku, Netz und Verbrauchern ein- oder ausblenden",chk_title:"Einrichtung",chk_hint:"Was der Energiefluss braucht. Antippen springt an die Stelle.",chk_solar:"Solarfeld angelegt",chk_solar_add:"Ein Solarfeld aufs Dach legen",chk_meter:"Stromz\xE4hler mit Netzsensor",chk_meter_sensor:"Stromz\xE4hler: Netzsensor (W) fehlt",chk_meter_add:"Stromz\xE4hler anlegen",chk_inverter:"Wechselrichter mit Leistungssensor",chk_inverter_sensor:"Wechselrichter: Leistungssensor fehlt",chk_inverter_add:"Wechselrichter anlegen",chk_battery:"Stromspeicher mit Leistung und Ladestand",chk_battery_sensor:"Stromspeicher: Leistung oder Ladestand fehlt",chk_battery_opt:"Stromspeicher (optional)",chk_grid:"Netzanschluss gesetzt",chk_grid_opt:"Netzanschluss (optional, sonst automatisch)",energy_sign_grid:"Das Haus zeigt Einspeisung, obwohl die Sonne nichts liefert. Der Netzsensor hat wahrscheinlich das umgekehrte Vorzeichen.",energy_sign_battery:"Der Speicher l\xE4dt ohne Sonne und ohne Netzbezug. Sein Sensor hat wahrscheinlich das umgekehrte Vorzeichen.",energy_sign_flip:"Vorzeichen umkehren",help_title:"Hilfe und R\xFCckmeldung",help_hint:"Fehler bitte als Issue auf GitHub, W\xFCnsche als Diskussion \u2013 so geht nichts verloren, und alle sehen den Stand.",help_issue:"Problem melden",help_idea:"Idee vorschlagen",furn_name:"Name (optional)",furn_mirror:"Spiegeln",furn_mirror_hint:"Links und rechts vertauschen \u2013 das L-Sofa andersherum, der Schrank mit der T\xFCr auf der anderen Seite, die K\xFCchenzeile gespiegelt.",hint_opening:"Auf eine Wand tippen, um eine T\xFCr oder ein Fenster einzusetzen \u2013 die Art w\xE4hlst du danach rechts",preset_door:"T\xFCr",preset_door_double:"Doppelt\xFCr",preset_window:"Fenster",preset_window_double:"Fenster 2-fl\xFCgelig",preset_terrace:"Terrassent\xFCr",preset_terrace_double:"Terrassent\xFCr 2-fl\xFCgelig",preset_lift_slide:"Hebe-Schiebet\xFCr",preset_garage:"Garagentor",preset_front:"Haust\xFCr",opening_style:"Stil",sidelight_auto:"automatisch",sidelight_hinge:"Seitenteil an der Anschlagseite",sidelight_hinge_hint:"Das Seitenteil sitzt sonst gegen\xFCber dem Anschlag; mit Haken neben den B\xE4ndern.",sidelight_width:"Breite Seitenteil (m)",sidelight_width_left:"Seitenteil links (m)",sidelight_width_right:"Seitenteil rechts (m)",style_auto:"Automatisch ({style})",style_interior:"Zimmert\xFCr",style_front:"Haust\xFCr",style_front_glass:"Haust\xFCr mit Glasausschnitt",style_sidelight:"Haust\xFCr mit Seitenteil",style_sidelights:"Haust\xFCr mit 2 Seitenteilen",style_glass:"Glast\xFCr",style_sliding:"Schiebet\xFCr",style_p
Line truncated
{url}`,manual:"Manual",manual_more:"Learn more",feature_text_energy:"Energy particles fly in arcs from the solar fields to the inverter, between house, battery, grid and consumers \u2013 faster and denser the more power flows. The modules sparkle with their production, a glass card over the roof shows the balance and how self-sufficient the house is right now.",live_autarky:"self-sufficient",live_fold:"Make the card small",live_unfold:"Open the card",live_day_hint:"The last 24 hours: solar (area) and consumption (line)",live_week_hint:"The last 7 days: sun {solar} kWh, use {use} kWh (yellow: sun, light: use)",live_days:"days",live_car_away:"On the road",live_car_charging:"Charging",live_car_plugged:"Plugged in",live_car_lock:"Lock",live_car_unlock:"Unlock",live_car_unlock_confirm:"Really unlock {name}?",live_car_climate:"Climate",live_car_charge:"Start/stop charging",live_media_prev:"Previous",live_media_playpause:"Play/pause",live_media_next:"Next",live_media_volume:"Volume",live_car_device:"Car (any entity of the car)",live_car_device_hint:"Charge, range, charging, plug, lock and climate are found by NextFloor on the car's device. Without one it takes the spot's presence sensor.",live_car_departure_entity:"Departure time (optional)",live_car_departure:"Departs {time}",live_car_open:"Open: {parts}",printer_printing:"printing",printer_done:"done",printer_paused:"paused",printer_error:"error",printer_idle:"idle",printer_done_at:"done at {time}",printer_layer:"Layer",printer_nozzle:"Nozzle",printer_bed:"Bed",heatpump_heating:"heating",heatpump_water:"making hot water",heatpump_cooling:"cooling",heatpump_defrost:"defrosting",heatpump_idle:"resting",heatpump_flow_return:"Flow \u2192 return",heatpump_heat:"Heat",heatpump_power:"Power",heatpump_outside:"outside",pack_missing_item:"Furniture of a removed pack",back_to_room:"Back to {room}",back_to_floor:"Back to the floor",hint_furniture:"Tap a room, then pick an item on the right \xB7 drag items, resize them by their corners",furniture_into:"New items go into the middle of \u201C{room}\u201D.",furniture_pick_room:"Tip: tap a room first \u2013 new items then land in its middle.",flows:"Power flow",flows_hint:"Show or hide the energy arcs between solar fields, inverter, battery, grid and consumers",chk_title:"Setup",chk_hint:"What the energy flow needs. Tap a row to jump there.",chk_solar:"Solar field in place",chk_solar_add:"Put a solar field on the roof",chk_meter:"Meter with grid sensor",chk_meter_sensor:"Meter: grid sensor (W) missing",chk_meter_add:"Add the meter",chk_inverter:"Inverter with power sensor",chk_inverter_sensor:"Inverter: power sensor missing",chk_inverter_add:"Add an inverter",chk_battery:"Home battery with power and charge",chk_battery_sensor:"Home battery: power or charge missing",chk_battery_opt:"Home battery (optional)",chk_grid:"Grid connection set",chk_grid_opt:"Grid connection (optional, else automatic)",energy_sign_grid:"The house shows export while the sun produces nothing. The grid sensor probably has its sign reversed.",energy_sign_battery:"The battery charges with no sun and no grid draw. Its sensor probably has its sign reversed.",energy_sign_flip:"Flip the sign",help_title:"Help and feedback",help_hint:"Please report problems as a GitHub issue and wishes as a discussion \u2013 nothing gets lost, and everyone sees the state.",help_issue:"Report a problem",help_idea:"Propose an idea",furn_name:"Name (optional)",furn_mirror:"Mirror",furn_mirror_hint:"Swap left and right \u2013 the L-sofa the other way round, the cabinet with its door on the other side, the kitchen run mirrored.",hint_opening:"Tap a wall to add a door or window \u2013 choose its kind on the right afterwards",preset_door:"Door",preset_door_double:"Double door",preset_window:"Window",preset_window_double:"Double window",preset_terrace:"Terrace door",preset_terrace_double:"French doors",preset_lift_slide:"Lift-and-slide door",preset_garage:"Garage door",preset_front:"Front door",opening_style:"Style",sidelight_auto:"automatic",sidelight_hinge:"Sidelight on the hinge side",sidelight_hinge_hint:"The sidelight sits opposite the hinge otherwise; ticked, it sits next to the hinges.",sidelight_width:"Sidelight width (m)",sidelight_width_left:"Left sidelight (m)",sidelight_width_right:"Right sidelight (m)",style_auto:"Automatic ({style})",style_interior:"Room door",style_front:"Front door",style_front_glass:"Front door with glass",style_sidelight:"Front door with sidelight",style_sidelights:"Front door with two sidelights",style_glass:"Glass door",style_sliding:"Sliding door",style_passage:"Opening (no door)",style_standard:"Standard",style_bars:"With glazing bars",style_glass_wall:"Glass wall (fixed)",preset_glass_wall:"Glass wall",glass_panes:"Panes",glass_panes_auto:"automatic (about 0.9 m)",glass_panes_hint:"0 = one single pane without mullions, empty = about every 0.9 m",flip_hinge:"Swap hinge side",flip_main_leaf:"Swap main leaf",flip_hinge_hint:"Hinges to the other side"
Line truncated
{url}`,manual:"Manual",manual_more:"Learn more",feature_text_energy:"Energy particles fly in arcs from the solar fields to the inverter, between house, battery, grid and consumers \u2013 faster and denser the more power flows. The modules sparkle with their production, a glass card over the roof shows the balance and how self-sufficient the house is right now.",live_autarky:"self-sufficient",live_fold:"Make the card small",live_unfold:"Open the card",live_day_hint:"The last 24 hours: solar (area) and consumption (line)",live_week_hint:"The last 7 days: sun {solar} kWh, use {use} kWh (yellow: sun, light: use)",live_days:"days",live_car_away:"On the road",live_car_charging:"Charging",live_car_plugged:"Plugged in",live_car_lock:"Lock",live_car_unlock:"Unlock",live_car_unlock_confirm:"Really unlock {name}?",live_car_climate:"Climate",live_car_charge:"Start/stop charging",live_media_prev:"Previous",live_media_playpause:"Play/pause",live_media_next:"Next",live_media_volume:"Volume",live_car_device:"Car (any entity of the car)",live_car_device_hint:"Charge, range, charging, plug, lock and climate are found by NextFloor on the car's device. Without one it takes the spot's presence sensor.",live_car_departure_entity:"Departure time (optional)",live_car_departure:"Departs {time}",live_car_open:"Open: {parts}",printer_printing:"printing",printer_done:"done",printer_paused:"paused",printer_error:"error",printer_idle:"idle",printer_done_at:"done at {time}",printer_layer:"Layer",printer_nozzle:"Nozzle",printer_bed:"Bed",heatpump_heating:"heating",heatpump_water:"making hot water",heatpump_cooling:"cooling",heatpump_defrost:"defrosting",heatpump_idle:"resting",heatpump_flow_return:"Flow \u2192 return",heatpump_heat:"Heat",heatpump_power:"Power",heatpump_outside:"outside",pack_missing_item:"Furniture of a removed pack",back_to_room:"Back to {room}",back_to_floor:"Back to the floor",hint_furniture:"Tap a room, then pick an item on the right \xB7 drag items, resize them by their corners",furniture_into:"New items go into the middle of \u201C{room}\u201D.",furniture_pick_room:"Tip: tap a room first \u2013 new items then land in its middle.",flows:"Power flow",flows_hint:"Show or hide the energy arcs between solar fields, inverter, battery, grid and consumers",chk_title:"Setup",chk_hint:"What the energy flow needs. Tap a row to jump there.",chk_solar:"Solar field in place",chk_solar_add:"Put a solar field on the roof",chk_meter:"Meter with grid sensor",chk_meter_sensor:"Meter: grid sensor (W) missing",chk_meter_add:"Add the meter",chk_inverter:"Inverter with power sensor",chk_inverter_sensor:"Inverter: power sensor missing",chk_inverter_add:"Add an inverter",chk_battery:"Home battery with power and charge",chk_battery_sensor:"Home battery: power or charge missing",chk_battery_opt:"Home battery (optional)",chk_grid:"Grid connection set",chk_grid_opt:"Grid connection (optional, else automatic)",energy_sign_grid:"The house shows export while the sun produces nothing. The grid sensor probably has its sign reversed.",energy_sign_battery:"The battery charges with no sun and no grid draw. Its sensor probably has its sign reversed.",energy_sign_flip:"Flip the sign",help_title:"Help and feedback",help_hint:"Please report problems as a GitHub issue and wishes as a discussion \u2013 nothing gets lost, and everyone sees the state.",help_issue:"Report a problem",help_idea:"Propose an idea",furn_name:"Name (optional)",furn_mirror:"Mirror",furn_mirror_hint:"Swap left and right \u2013 the L-sofa the other way round, the cabinet with its door on the other side, the kitchen run mirrored.",hint_opening:"Tap a wall to add a door or window \u2013 choose its kind on the right afterwards",preset_door:"Door",preset_door_double:"Double door",preset_window:"Window",preset_window_double:"Double window",preset_terrace:"Terrace door",preset_terrace_double:"French doors",preset_lift_slide:"Lift-and-slide door",preset_garage:"Garage door",preset_front:"Front door",opening_style:"Style",sidelight_auto:"automatic",sidelight_hinge:"Sidelight on the hinge side",sidelight_hinge_hint:"The sidelight sits opposite the hinge otherwise; ticked, it sits next to the hinges.",sidelight_width:"Sidelight width (m)",sidelight_width_left:"Left sidelight (m)",sidelight_width_right:"Right sidelight (m)",style_auto:"Automatic ({style})",style_interior:"Room door",style_front:"Front door",style_front_glass:"Front door with glass",style_sidelight:"Front door with sidelight",style_sidelights:"Front door with two sidelights",style_glass:"Glass door",style_sliding:"Sliding door",style_passage:"Opening (no door)",style_standard:"Standard",style_bars:"With glazing bars",style_glass_wall:"Glass wall (fixed)",preset_glass_wall:"Glass wall",glass_panes:"Panes",glass_panes_auto:"automatic (about 0.9 m)",glass_panes_hint:"0 = one single pane without mullions, empty = about every 0.9 m",flip_hinge:"Swap hinge side",flip_main_leaf:"Swap main leaf",flip_hinge_hint:"Hinges to the other side"
Line truncated
:host{
:host{
--nf-text:var(--primary-text-color,#e1e1e1);
--nf-text:var(--primary-text-color,#e1e1e1);
--nf-muted:var(--secondary-text-color,#9b9b9b);
--nf-muted:var(--secondary-text-color,#9b9b9b);
@@ -35,7 +35,7 @@ A plugin runs with the same rights as NextFloor in your browser. The file has be
`]};customElements.get("nf-room-hvac")||customElements.define("nf-room-hvac",Vi);var Gi={electricity:"Strom",water:"Wasser",gas:"Gas",heating:"Heizen",cooling:"K\xFChlen"},Za={electricity:"\u26A1",water:"\u{1F4A7}",gas:"\u{1F525}",heating:"\u2668",cooling:"\u2744"},Ui=r=>r.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/ß/g,"ss").replace(/[^a-z0-9]+/g," ").trim(),Dh="{485D0419-BE97-4548-AA9C-C083EB82E61E}",Fh=r=>r.object_type!==0&&!(r.object_type===1&&r.module_id?.toUpperCase()===Dh)?null:{elektro:"electricity",strom:"electricity","elektro strom":"electricity","strom elektro":"electricity",wasser:"water",gas:"gas",heizen:"heating",heizung:"heating",warme:"heating",waerme:"heating",kuhlen:"cooling",kuehlen:"cooling",kuhlung:"cooling",kuehlung:"cooling",kalte:"cooling",kaelte:"cooling"}[Ui(r.name)]??null,Ua=r=>/^symcon-category-(\d+)$/.exec(r??"")?.[1],Ya=r=>/\b(heute|tag|tagesverbrauch|today|daily)\b/.test(r)?"day":/monat|month/.test(r)?"month":/jahr|year/.test(r)?"year":"total",ji=(r,e)=>String(r.states[e]?.attributes.symcon_source_entity||e);function Ja(r){let e=String(r?.attributes.unit_of_measurement??"").trim(),t=e.replace(/[³]/g,"3").replace(/[²]/g,"2").replace(/\s+/g,"").toLowerCase();return["w","kw","mw"].includes(t)?{metric:"power",unit:"W",factor:e==="mW"?.001:t==="kw"?1e3:t==="mw"?1e6:1}:["wh","kwh","mwh","j","kj","mj","gj"].includes(t)?{metric:"energy",unit:"kWh",factor:{wh:.001,kwh:1,mwh:1e3,j:1/36e5,kj:1/3600,mj:1/3.6,gj:1e3/3.6}[t]}:["m3/h","m3h","m3/min","m3/s","l/h","l/min","l/s","liter/h","liter/min"].includes(t)?{metric:"power",unit:"m\xB3/h",factor:{"m3/h":1,m3h:1,"m3/min":60,"m3/s":3600,"l/h":.001,"l/min":.06,"l/s":3.6,"liter/h":.001,"liter/min":.06}[t]}:["m3","l","liter"].includes(t)?{metric:"energy",unit:"m\xB3",factor:t==="m3"?1:.001}:null}function Hh(r,e){if(!e.entity_id||e.object_type!==2&&e.object_type!==6)return null;let t=ji(r,e.entity_id),n=r.states[t];if(!n||![1,2].includes(Number(n.attributes.symcon_variable_type)))return null;let i=Ui(e.name),o=Ja(n),s=/^(leistung|wirkleistung|gesamtleistung|aktuelle leistung|durchfluss|volumenstrom)(\b|$)/.test(i),a=/^(verbrauch|energie|energieverbrauch|gesamtverbrauch|gesamtenergie|zahlerstand|zaehlerstand|arbeit)(\b|$)/.test(i),l=o?.metric??(s?"power":a?"energy":null);if(!l)return null;let c=l==="power"?/^(leistung|wirkleistung|gesamtleistung|durchfluss|volumenstrom)$/.test(i):/^(verbrauch|energie|energieverbrauch|gesamtverbrauch|gesamtenergie|zahlerstand|zaehlerstand|arbeit)$/.test(i),u=l==="energy"?Ya(i):"total";return{metric:l,source:t,period:u,group:`${l}|${o?.unit??String(n.attributes.unit_of_measurement??"")}|${u}`,score:/^gesamt(leistung|verbrauch|energie)$/.test(i)?110:c?100:(l==="power"?s:a)?70:20}}var ja=new WeakMap,qa=new WeakMap;function Ph(r){let e=ja.get(r);if(e)return e;let t={nodes:new Map(r.map(n=>[n.object_id,n])),children:new Map};for(let n of r){let i=t.children.get(n.parent_id)??[];i.push(n),t.children.set(n.parent_id,i)}return ja.set(r,t),t}function qi(r,e,t){if(!G(r))return[];let n=[e.area_id,...e.sub_areas??[]].map(Ua).filter(m=>!!m);if(!n.length)return[];let i=new Set(t.filter(m=>m.id!==e.id).flatMap(m=>[m.area_id,...m.sub_areas??[]]).map(Ua).filter(m=>!!m&&!n.includes(m))),o=`${n.join(",")}|${[...i].sort().join(",")}`,s=qa.get(r)??new Map;qa.set(r,s);let a=s.get(o);if(a)return a;let l=Ph(r.symconObjects),c=[],u=new Set,d=(m,h,g)=>{if(u.has(m)||i.has(String(m)))return;u.add(m);let _=l.nodes.get(m);if(!_)return;let b=Fh(_),v=b??h,k=new Set(b&&b!==h?[]:g),S=l.children.get(m)??[];if(v){let $=S.map(z=>Hh(r,z)).filter(z=>z!==null);for(let z of new Set($.map(R=>R.group))){if(k.has(z))continue;let R=$.filter(E=>E.group===z),F=Math.max(...R.map(E=>E.score)),T=R.filter(E=>E.score===F);for(let E of F>=100?T.slice(0,1):T)c.push({kind:v,metric:E.metric,id:E.source,period:E.period});k.add(z)}}for(let $ of S)($.object_type===0||$.object_type===1)&&d($.object_id,v,k)};for(let m of n)d(Number(m),null,new Set);return s.set(o,c),c}function Qa(r,e,t=!1){let n=new Map,i=new Set;for(let o of e){let s=ji(r,o.id),a=`${o.kind}|${o.metric}|${s}`;if(i.has(a))continue;i.add(a);let l=r.states[s],c=Ja(l),u=c?.metric===o.metric?c.unit:String(l?.attributes.unit_of_measurement??"").trim(),d=`${o.kind}|${o.metric}|${u}|${o.period}`,m=n.get(d)??{kind:o.kind,metric:o.metric,unit:u,value:null,period:o.period,sources:[],manual:t,incomplete:!1},h=Pe(l);h===null?m.incomplete=!0:m.value=(m.value??0)+h*(c?.metric===o.metric?c.factor:1),m.sources.push(s),n.set(d,m)}return[...n.values()]}function Dt(r,e,t=[]){return Qa(r,qi(r,e,t))}function Ki(r,e,t,n){let i=e.utility_meters?.[t],o=i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:t==="electricity"&&n==="power"?e.power_entity:null;return o&&o!=="none"?ji(r,o):null}function un(r,e,t=e.rooms){let n=e.rooms.flatMap(o=>qi(r,o,t)),i=[];for(let o of en)for(let s of["power","energy"]){let a=Ki(r,e,o,s);i.push(...Qa(r,a?[{kind:o,metric:s,id:a,period:s==="energy"?Ya(Ui(String(r.states[a]
Line truncated
`]};customElements.get("nf-room-hvac")||customElements.define("nf-room-hvac",ji);var xr={electricity:"Strom",water:"Wasser",gas:"Gas",heating:"Heizen",cooling:"K\xFChlen"},el={electricity:"\u26A1",water:"\u{1F4A7}",gas:"\u{1F525}",heating:"\u2668",cooling:"\u2744"},Zi=r=>r.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/ß/g,"ss").replace(/[^a-z0-9]+/g," ").trim(),Ih="{485D0419-BE97-4548-AA9C-C083EB82E61E}",Nh=r=>r.object_type!==0&&!(r.object_type===1&&r.module_id?.toUpperCase()===Ih)?null:{elektro:"electricity",strom:"electricity","elektro strom":"electricity","strom elektro":"electricity",wasser:"water",gas:"gas",heizen:"heating",heizung:"heating",warme:"heating",waerme:"heating",kuhlen:"cooling",kuehlen:"cooling",kuhlung:"cooling",kuehlung:"cooling",kalte:"cooling",kaelte:"cooling"}[Zi(r.name)]??null,Ja=r=>/^symcon-category-(\d+)$/.exec(r??"")?.[1],tl=r=>/\b(heute|tag|tagesverbrauch|today|daily)\b/.test(r)?"day":/monat|month/.test(r)?"month":/jahr|year/.test(r)?"year":"total",Yi=(r,e)=>String(r.states[e]?.attributes.symcon_source_entity||e);function nl(r){let e=String(r?.attributes.unit_of_measurement??"").trim(),t=e.replace(/[³]/g,"3").replace(/[²]/g,"2").replace(/\s+/g,"").toLowerCase();return["w","kw","mw"].includes(t)?{metric:"power",unit:"W",factor:e==="mW"?.001:t==="kw"?1e3:t==="mw"?1e6:1}:["wh","kwh","mwh","j","kj","mj","gj"].includes(t)?{metric:"energy",unit:"kWh",factor:{wh:.001,kwh:1,mwh:1e3,j:1/36e5,kj:1/3600,mj:1/3.6,gj:1e3/3.6}[t]}:["m3/h","m3h","m3/min","m3/s","l/h","l/min","l/s","liter/h","liter/min"].includes(t)?{metric:"power",unit:"m\xB3/h",factor:{"m3/h":1,m3h:1,"m3/min":60,"m3/s":3600,"l/h":.001,"l/min":.06,"l/s":3.6,"liter/h":.001,"liter/min":.06}[t]}:["m3","l","liter"].includes(t)?{metric:"energy",unit:"m\xB3",factor:t==="m3"?1:.001}:null}function Ch(r,e){if(!e.entity_id||e.object_type!==2&&e.object_type!==6)return null;let t=Yi(r,e.entity_id),n=r.states[t];if(!n||![1,2].includes(Number(n.attributes.symcon_variable_type)))return null;let i=Zi(e.name),o=nl(n),s=/^(leistung|wirkleistung|gesamtleistung|aktuelle leistung|durchfluss|volumenstrom)(\b|$)/.test(i),a=/^(verbrauch|energie|energieverbrauch|gesamtverbrauch|gesamtenergie|zahlerstand|zaehlerstand|arbeit)(\b|$)/.test(i),l=o?.metric??(s?"power":a?"energy":null);if(!l)return null;let c=l==="power"?/^(leistung|wirkleistung|gesamtleistung|durchfluss|volumenstrom)$/.test(i):/^(verbrauch|energie|energieverbrauch|gesamtverbrauch|gesamtenergie|zahlerstand|zaehlerstand|arbeit)$/.test(i),u=l==="energy"?tl(i):"total";return{metric:l,source:t,period:u,group:`${l}|${o?.unit??String(n.attributes.unit_of_measurement??"")}|${u}`,score:/^gesamt(leistung|verbrauch|energie)$/.test(i)?110:c?100:(l==="power"?s:a)?70:20}}var Qa=new WeakMap,Xa=new WeakMap;function Wh(r){let e=Qa.get(r);if(e)return e;let t={nodes:new Map(r.map(n=>[n.object_id,n])),children:new Map};for(let n of r){let i=t.children.get(n.parent_id)??[];i.push(n),t.children.set(n.parent_id,i)}return Qa.set(r,t),t}function Ji(r,e,t){if(!G(r))return[];let n=[e.area_id,...e.sub_areas??[]].map(Ja).filter(m=>!!m);if(!n.length)return[];let i=new Set(t.filter(m=>m.id!==e.id).flatMap(m=>[m.area_id,...m.sub_areas??[]]).map(Ja).filter(m=>!!m&&!n.includes(m))),o=`${n.join(",")}|${[...i].sort().join(",")}`,s=Xa.get(r)??new Map;Xa.set(r,s);let a=s.get(o);if(a)return a;let l=Wh(r.symconObjects),c=[],u=new Set,d=(m,h,g)=>{if(u.has(m)||i.has(String(m)))return;u.add(m);let _=l.nodes.get(m);if(!_)return;let b=Nh(_),v=b??h,S=new Set(b&&b!==h?[]:g),k=l.children.get(m)??[];if(v){let M=k.map(z=>Ch(r,z)).filter(z=>z!==null);for(let z of new Set(M.map(R=>R.group))){if(S.has(z))continue;let R=M.filter(E=>E.group===z),F=Math.max(...R.map(E=>E.score)),T=R.filter(E=>E.score===F);for(let E of F>=100?T.slice(0,1):T)c.push({kind:v,metric:E.metric,id:E.source,period:E.period});S.add(z)}}for(let M of k)(M.object_type===0||M.object_type===1)&&d(M.object_id,v,S)};for(let m of n)d(Number(m),null,new Set);return s.set(o,c),c}function rl(r,e,t=!1){let n=new Map,i=new Set;for(let o of e){let s=Yi(r,o.id),a=`${o.kind}|${o.metric}|${s}`;if(i.has(a))continue;i.add(a);let l=r.states[s],c=nl(l),u=c?.metric===o.metric?c.unit:String(l?.attributes.unit_of_measurement??"").trim(),d=`${o.kind}|${o.metric}|${u}|${o.period}`,m=n.get(d)??{kind:o.kind,metric:o.metric,unit:u,value:null,period:o.period,sources:[],manual:t,incomplete:!1},h=Ne(l);h===null?m.incomplete=!0:m.value=(m.value??0)+h*(c?.metric===o.metric?c.factor:1),m.sources.push(s),n.set(d,m)}return[...n.values()]}function Ft(r,e,t=[]){return rl(r,Ji(r,e,t))}function qi(r,e,t,n){let i=e.utility_meters?.[t],o=i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:t==="electricity"&&n==="power"?e.power_entity:null;return o&&o!=="none"?Yi(r,o):null}function dn(r,e,t=e.rooms){let n=e.rooms.flatMap(o=>Ji(r,o,t)),i=[];for(let o of tn)for(let s of["power","energy"]){let a=qi(r,e,o,s);i.push(...rl(r,a?[{kind:o,metric:s,id:a,period:s==="energy"?tl(Zi(String(r.states[a]
Line truncated
<h4>${Za[e]}${Gi[e]}</h4>
<h4>${el[e]}${xr[e]}</h4>
${this.readings.filter(t=>t.kind===e).map(t=>p`<div class="reading" title=${`${t.manual?"Stockwerksz\xE4hler":"Bereichsz\xE4hler"}${t.incomplete?" \xB7 Err: Mindestens ein Wert fehlt; angezeigt wird die Summe der verf\xFCgbaren Werte.":""}
${this.readings.filter(t=>t.kind===e).map(t=>p`<div class="reading" title=${`${t.manual?"Stockwerksz\xE4hler":"Bereichsz\xE4hler"}${t.incomplete?" \xB7 Err: Mindestens ein Wert fehlt; angezeigt wird die Summe der verf\xFCgbaren Werte.":""}
`]};customElements.get("nf-room-panel")||customElements.define("nf-room-panel",io);function Gl(r){if(!r)return"";let e=Math.min(.8,Math.max(0,r.dim??.35)),t=r.image&&/^(https:\/\/|\/local\/|\/api\/)[^"'()\\\s]+$/.test(r.image)?r.image:null,n=r.color&&/^#[0-9a-f]{6}$/i.test(r.color)?r.color:null;return t?`;background:linear-gradient(rgba(0,0,0,${e}),rgba(0,0,0,${e})),center/coverno-repeaturl("${t}")${n?`${n}`:""}`:n?`;background:${n}`:""}var zm=[[/spotify/i,[30,215,96]],[/netflix/i,[229,9,20]],[/youtube/i,[255,0,51]],[/prime|amazon/i,[0,168,225]],[/disney/i,[17,60,207]],[/apple ?music|itunes/i,[250,45,72]],[/apple ?tv/i,[200,200,210]],[/plex/i,[229,160,13]],[/tidal/i,[0,255,255]],[/deezer/i,[162,56,255]],[/radio|tunein/i,[255,140,60]]],Ul=[34,211,238];function oo(r){return r?zm.find(([e])=>e.test(r))?.[1]??Ul:Ul}function so(r){if(r.state==="playing"||r.state==="paused")return!0;let e=t=>typeof r.attributes[t]=="string"&&r.attributes[t]!=="";return r.state==="on"&&(e("media_title")||e("media_channel")||e("source")||e("app_name"))}var ao=r=>r.state==="playing"||r.state==="on"&&so(r);function jl(r,e){let t=[],n=new Set;for(let i of e){if(!i.entity.startsWith("media_player.")||n.has(i.entity))continue;n.add(i.entity);let o=r.states[i.entity];if(!o)continue;let s=o.attributes,a=u=>typeof s[u]=="string"?s[u]:"",l=a("app_name")||a("source")||a("app_id")||null,c=typeof s.volume_level=="number"?s.volume_level:null;t.push({entity:i.entity,name:i.name,at:i.at,playing:ao(o),title:a("media_title")||a("media_channel")||l||"",artist:a("media_artist")||a("media_album_name")||a("media_series_title"),picture:a("entity_picture")||null,volume:c,color:oo(l),app:l,group:Array.isArray(s.group_members)?s.group_members.filter(u=>typeof u=="string"&&u!==i.entity):[],rings:i.rings??1})}return t}function ql(r){let e=new Map(r.filter(i=>i.playing).map(i=>[i.entity,i])),t=[],n=new Set;for(let i of e.values())for(let o of i.group){let s=e.get(o),a=[i.entity,o].sort().join("|");s&&!n.has(a)&&(n.add(a),t.push([i,s]))}return t}var Tm=3;function Zl(r,e,t){let n=[];for(let i of e.floors)for(let o of i.furniture){if(!o.type.endsWith(":sprinkler"))continue;let s=t?.get(o.id)?.entity??null;!s||!ee(r.states[s])||n.push({id:o.id,at:{floorId:i.id,x:o.x,y:de(i,o)+o.h,z:o.z},reach:Math.min(15,Math.max(.5,o.spray??Tm))})}return n}var Rr=r=>r&&r!=="none"?r:null,Yl=r=>Math.min(1,Math.max(0,r));function Jl(r,e){let t=new Map;for(let n of e.settings.roof?.windows??[]){let i=Fe(r,{cover:Rr(n.cover),contact:Rr(n.contact),tilt:Rr(n.tilt)},"window"),o=Rr(n.window),s=o?r.states[o]:void 0,a=i.open;if(s&&!C(s)){let l=s.attributes.current_position;a=typeof l=="number"?Yl(l/100):s.state==="open"||s.state==="opening"?1:0}t.set(n.id,{open:a,tilt:i.tilt,cover:i.cover??0})}return t}function Dm(r,e){let t=i=>Math.hypot(i.x-e.x,i.z-e.z);return r.placements.filter(i=>i.entity_id.startsWith("media_player.")&&t(i)<Math.max(2,e.w)).sort((i,o)=>t(i)-t(o))[0]?.entity_id??null}var Xe=(r,e)=>typeof r[e]=="string"?r[e]:"";function Ql(r,e,t){let n=[];for(let i of e.floors)for(let o of i.furniture){if(!lr(o.type))continue;let s=t?.get(o.id)?.entity??null,a=s?.startsWith("media_player.")?s:Dm(i,o),l=a?r.states[a]:void 0;if(!l||!so(l))continue;let c=l.attributes,u=Xe(c,"app_name")||Xe(c,"source")||null;n.push({id:o.id,furnitureId:o.id,floorId:i.id,color:oo(u),title:Xe(c,"media_title")||Xe(c,"media_channel")||u||"",subtitle:Xe(c,"media_artist")||Xe(c,"media_series_title")||Xe(c,"media_album_name"),app:u,picture:Xe(c,"entity_picture")||null,playing:ao(l),ambilight:o.ambilight??1})}return n}function Xl(r){let e=r.states["sun.sun"]?.attributes;return typeof e?.elevation=="number"&&typeof e.azimuth=="number"?{elevation:e.elevation,azimuth:e.azimuth}:null}function ec(r,e){return(r===null?0:Yl((r+4)/16))*(1-.45*e)}function et(r,e){return r.states["weather.nextfloor_symcon"]?"weather.nextfloor_symcon":e&&r.states[e]?e:Object.keys(r.states).filter(t=>t.startsWith("weather.")).sort()[0]??null}var zr=new Set(["contact_lost","unlocked_night","own"]);function Fm(r,e){let t=r.states[e.entity];if(!t||["unavailable","unknown"].includes(t.state))return!1;let n=(e.state??"on").trim(),i=/^([<>])\s*(-?\d+(?:[.,]\d+)?)$/.exec(n);if(i){let o=Number(t.state),s=Number(i[2].replace(",","."));return Number.isFinite(o)&&(i[1]==="<"?o<s:o>s)}return n.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean).includes(String(t.state).toLowerCase())}var Hm=600*1e3,Pm=new Set(["rainy","pouring","lightning-rainy","hail","snowy-rainy"]),Im=new Map([["smoke","smoke"],["gas","gas"],["carbon_monoxide","co"],["moisture","water"]]),tc=(r,e)=>{if(e.startsWith("binary_sensor."))return Im.get(String(r.states[e]?.attributes.device_class))};function Cm(r,e){let t=new Set,n=[];for(let i of r.floors)for(let o of i.openings){let s=e.get(o.id);for(let a of s?[s.contact,s.contact2,s.tilt,s.tilt2]:[])!a||t.has(a)||(t.add(a),n.push({floorId:i.id,roomId:o.room_id,entity:a}))}return n}function nc(r,e,t,n){let i=[];for(let a o
Line truncated
`]};customElements.get("nf-room-panel")||customElements.define("nf-room-panel",lo);function Zl(r){if(!r)return"";let e=Math.min(.8,Math.max(0,r.dim??.35)),t=r.image&&/^(https:\/\/|\/local\/|\/api\/)[^"'()\\\s]+$/.test(r.image)?r.image:null,n=r.color&&/^#[0-9a-f]{6}$/i.test(r.color)?r.color:null;return t?`;background:linear-gradient(rgba(0,0,0,${e}),rgba(0,0,0,${e})),center/coverno-repeaturl("${t}")${n?`${n}`:""}`:n?`;background:${n}`:""}var Hm=[[/spotify/i,[30,215,96]],[/netflix/i,[229,9,20]],[/youtube/i,[255,0,51]],[/prime|amazon/i,[0,168,225]],[/disney/i,[17,60,207]],[/apple ?music|itunes/i,[250,45,72]],[/apple ?tv/i,[200,200,210]],[/plex/i,[229,160,13]],[/tidal/i,[0,255,255]],[/deezer/i,[162,56,255]],[/radio|tunein/i,[255,140,60]]],Yl=[34,211,238];function co(r){return r?Hm.find(([e])=>e.test(r))?.[1]??Yl:Yl}function uo(r){if(r.state==="playing"||r.state==="paused")return!0;let e=t=>typeof r.attributes[t]=="string"&&r.attributes[t]!=="";return r.state==="on"&&(e("media_title")||e("media_channel")||e("source")||e("app_name"))}var ho=r=>r.state==="playing"||r.state==="on"&&uo(r);function Jl(r,e){let t=[],n=new Set;for(let i of e){if(!i.entity.startsWith("media_player.")||n.has(i.entity))continue;n.add(i.entity);let o=r.states[i.entity];if(!o)continue;let s=o.attributes,a=u=>typeof s[u]=="string"?s[u]:"",l=a("app_name")||a("source")||a("app_id")||null,c=typeof s.volume_level=="number"?s.volume_level:null;t.push({entity:i.entity,name:i.name,at:i.at,playing:ho(o),title:a("media_title")||a("media_channel")||l||"",artist:a("media_artist")||a("media_album_name")||a("media_series_title"),picture:a("entity_picture")||null,volume:c,color:co(l),app:l,group:Array.isArray(s.group_members)?s.group_members.filter(u=>typeof u=="string"&&u!==i.entity):[],rings:i.rings??1})}return t}function Ql(r){let e=new Map(r.filter(i=>i.playing).map(i=>[i.entity,i])),t=[],n=new Set;for(let i of e.values())for(let o of i.group){let s=e.get(o),a=[i.entity,o].sort().join("|");s&&!n.has(a)&&(n.add(a),t.push([i,s]))}return t}var Pm=3;function Xl(r,e,t){let n=[];for(let i of e.floors)for(let o of i.furniture){if(!o.type.endsWith(":sprinkler"))continue;let s=t?.get(o.id)?.entity??null;!s||!te(r.states[s])||n.push({id:o.id,at:{floorId:i.id,x:o.x,y:he(i,o)+o.h,z:o.z},reach:Math.min(15,Math.max(.5,o.spray??Pm))})}return n}var Tr=r=>r&&r!=="none"?r:null,ec=r=>Math.min(1,Math.max(0,r));function tc(r,e){let t=new Map;for(let n of e.settings.roof?.windows??[]){let i=Pe(r,{cover:Tr(n.cover),contact:Tr(n.contact),tilt:Tr(n.tilt)},"window"),o=Tr(n.window),s=o?r.states[o]:void 0,a=i.open;if(s&&!N(s)){let l=s.attributes.current_position;a=typeof l=="number"?ec(l/100):s.state==="open"||s.state==="opening"?1:0}t.set(n.id,{open:a,tilt:i.tilt,cover:i.cover??0})}return t}function Im(r,e){let t=i=>Math.hypot(i.x-e.x,i.z-e.z);return r.placements.filter(i=>i.entity_id.startsWith("media_player.")&&t(i)<Math.max(2,e.w)).sort((i,o)=>t(i)-t(o))[0]?.entity_id??null}var et=(r,e)=>typeof r[e]=="string"?r[e]:"";function nc(r,e,t){let n=[];for(let i of e.floors)for(let o of i.furniture){if(!cr(o.type))continue;let s=t?.get(o.id)?.entity??null,a=s?.startsWith("media_player.")?s:Im(i,o),l=a?r.states[a]:void 0;if(!l||!uo(l))continue;let c=l.attributes,u=et(c,"app_name")||et(c,"source")||null;n.push({id:o.id,furnitureId:o.id,floorId:i.id,color:co(u),title:et(c,"media_title")||et(c,"media_channel")||u||"",subtitle:et(c,"media_artist")||et(c,"media_series_title")||et(c,"media_album_name"),app:u,picture:et(c,"entity_picture")||null,playing:ho(l),ambilight:o.ambilight??1})}return n}function rc(r){let e=r.states["sun.sun"]?.attributes;return typeof e?.elevation=="number"&&typeof e.azimuth=="number"?{elevation:e.elevation,azimuth:e.azimuth}:null}function ic(r,e){return(r===null?0:ec((r+4)/16))*(1-.45*e)}function tt(r,e){return r.states["weather.nextfloor_symcon"]?"weather.nextfloor_symcon":e&&r.states[e]?e:Object.keys(r.states).filter(t=>t.startsWith("weather.")).sort()[0]??null}var Dr=new Set(["contact_lost","unlocked_night","own"]);function Nm(r,e){let t=r.states[e.entity];if(!t||["unavailable","unknown"].includes(t.state))return!1;let n=(e.state??"on").trim(),i=/^([<>])\s*(-?\d+(?:[.,]\d+)?)$/.exec(n);if(i){let o=Number(t.state),s=Number(i[2].replace(",","."));return Number.isFinite(o)&&(i[1]==="<"?o<s:o>s)}return n.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean).includes(String(t.state).toLowerCase())}var Cm=600*1e3,Wm=new Set(["rainy","pouring","lightning-rainy","hail","snowy-rainy"]),Lm=new Map([["smoke","smoke"],["gas","gas"],["carbon_monoxide","co"],["moisture","water"]]),oc=(r,e)=>{if(e.startsWith("binary_sensor."))return Lm.get(String(r.states[e]?.attributes.device_class))};function Om(r,e){let t=new Set,n=[];for(let i of r.floors)for(let o of i.openings){let s=e.get(o.id);for(let a of s?[s.contact,s.contact2,s.tilt,s.tilt2]:[])!a||t.has(a)||(t.add(a),n.push({floorId:i.id,roomId:o.room_id,entity:a}))}return n}function sc(r,e,t,n){let i=[];for(let a o
Line truncated
</div>`}syncDevices(e){let t=this.viewer,n=this.building;if(!t||!n||!this.hass)return;let i=this._travel,o=i&&!i.loading?It(this.hass,i.history,i.t):this.hass;if((e||!this.openingLinks||this.linkedRegistry!==o.entities)&&(this.openingLinks=De(o,n.floors),this.furnitureLinks=dt(o,n.floors),this.linkedRegistry=o.entities,this.findIndex=null,this.alertSrc=this.alerts?nc(o,n,this.weatherEntityId,this.openingLinks):null,this.watched=cc({hass:o,building:n,openingLinks:this.openingLinks,furnitureLinks:this.furnitureLinks,needsRoomSensors:this.heatMode!=="none"||this.roomLabels,alertSources:this.alertSrc,weatherEntityId:this.weatherEntityId}),e=!0),!(e||this.watched.some(y=>this.shownStates.get(y)!==o.states[y])))return;Do(o,n).join(",")!==this.shownFor?.key&&t.setBuilding(this.shownBuilding(o)),this.shownStates=new Map(this.watched.map(y=>[y,o.states[y]])),this.refreshToday(n),this.refreshForecast(n);let a=pn(o,n),l=Da(o,n.floors.some(y=>y.layer&&this.hiddenLayers.has(y.id))?this.shownBuilding(o):n);this.placementInfo=new Map(l.map(y=>[y.id,{floorId:y.floorId,roomId:y.roomId,x:y.x,z:y.z,y:y.y,rotation:y.rotation??0}]));let c=this.furnitureMarkers(o,n,new Set(l.map(y=>y.id)),new Set(a.map(y=>y.powerEntity)));a.push(...c.consumers);let u=fn(o,n,a,Ne(n,y=>this.furnitureLinks?.get(y.id)?.power??null)),d=new Map(a.filter(y=>y.id!==y.powerEntity).map(y=>[y.id,y.power]));this.confirmSet=ht(o,n.floors);let m=new Set(this.liveCardsOn?this._liveCards.flatMap(y=>y.kind==="media"?[y.media.entity]:y.kind==="car"?[y.spot]:[]):[]);for(let y of n.floors)for(let w of y.outdoor??[]){if(!w.area_id&&!w.temp_entity&&!w.pump_entity)continue;let B=w.temp_entity?o.states[w.temp_entity]:void 0,D=w.pump_entity?o.states[w.pump_entity]:void 0,[O,me]=$e(w.points),nt=B&&Number.isFinite(Number(B.state))?`${W(o,se(o,rr(Number(B.state),B.attributes.unit_of_measurement)),1)} ${ne(o)}`:"",bt=!!D&&ee(D);l.push({id:w.area_id?`outdoor:${w.id}`:w.pump_entity??w.temp_entity,floorId:y.id,roomId:null,x:O,z:me,y:Jn(y,w,O,me)+.7,icon:Me(w.type==="pool"?"pool":w.type==="terrace"?"table-chair":"tree-outline"),name:w.area_id&&o.areas?.[w.area_id]?.name||A(o,`out_${w.type}`),text:[nt,bt?A(o,"pool_pump_on"):""].filter(Boolean).join(" \xB7 "),active:bt,unavailable:!1,glow:null,show:"always"})}let h=new Map;for(let y of n.floors){for(let w of y.placements)w.pin_offset&&h.set(`${y.id}:${w.entity_id}`,w.pin_offset);for(let w of y.furniture)w.pin_offset&&h.set(`f:${w.id}`,w.pin_offset)}let g=y=>{let w=y.lamp?void 0:(y.furnitureId?h.get(`f:${y.furnitureId}`):void 0)??h.get(`${y.floorId}:${y.id}`);return w?{...y,x:y.x+(w.x??0),z:y.z+(w.z??0),y:y.y+(w.y??0)}:y};t.setDevices([...[...l,...c.markers].map(g).map(y=>{let w=y.show==="no_power"||"energyDevice"in y&&y.energyDevice?null:d.get(y.id)??null,B={...y,power:w,powerText:w===null?void 0:ce(o,w),effect:this.dimmed?void 0:y.effect,text:this.subMeterText(o,n,u,y.furnitureId)??y.text},D=y.ownName&&(y.showName||this.markerNames)?y.ownName:"",O=m.has(y.id)||!!y.furnitureId&&m.has(y.furnitureId);return{...B,pin:this.showPin(B)&&!O,full:y.show==="always",caption:D}})]),t.setPickTargets(c.targets,this.openingTargets(),this.secondBlinds()),t.setScreens(c.screens),t.setFridgeDoors(ma(o,n.floors)),t.setCovers(Sa(o,n)),t.setRobots(this.robotInfos(o,n));let _=new Map;for(let y of n.floors)for(let w of y.furniture)!Y(w.type)?.pet||!w.room_sensor||w.room_sensor==="none"||_.set(w.id,Di(o,y.rooms.filter(B=>B.points.length>=3),null,w.room_sensor)?.id??null);_.size&&t.setPetRooms(_),t.setRoofWindows(Jl(o,n)),t.setParked(ho(o,n)),t.setGateStates(fc(o,n));let b=new Map(n.floors.flatMap(y=>y.openings.map(w=>[w.id,w.type]))),v=new Map([...this.openingLinks].map(([y,w])=>[y,Fe(o,w,b.get(y))]));t.setOpeningStates(v),this.setAlerts(this.alertSrc?lo(o,n,this.alertSrc,this.openingLinks):[]),this.watchLostContacts(o);let k=[...l,...c.markers].map(y=>`${y.id}:${y.glow?`${y.glow.level.toFixed(1)}/${y.glow.color.map(w=>w.toFixed(1)).join("/")}`:0}`).join(";")+"|"+[...v].map(([y,w])=>`${y}:${w.open}:${w.cover===null?"-":w.cover.toFixed(1)}`).join(";");if(k!==this.thumbSig){lety=this.thumbSig==="";this.thumbSig=k,y||this.scheduleThumbs(1500)}letS=Rc(o,n,a,n.energy.advanced?y=>this.furnitureLinks?.get(y.id)?.power??null:void0),$=this.liveCars(o,n);for(letyof$){if(!y.car.home||!y.car.charging&&!y.car.plugged)continue;letw=n.floors.flatMap(O=>O.furniture.filter(me=>me.type==="wallbox").map(me=>({floorId:O.id,x:me.x,z:me.z,y:1}))).sort((O,me)=>Math.hypot(O.x-y.at.x,O.z-y.at.z)-Math.hypot(me.x-y.at.x,me.z-y.at.z))[0],B=w&&w.floorId===y.at.floorId&&Math.hypot(w.x-y.at.x,w.z-y.at.z)<9,D=w??Mn(n);!D||!y.car.charging&&!B||S.arcs.push({key:`car:${y.spot}`,from:D,to:{...y.at,y:.8},power:y.car.charging?y.car.chargingW??7e3:0,color:[80,175,255],...B?{via:[{...D,y:.35},{floorId:y.at.floorId,x:(D.x+y.at.x)/2,z:(D.z+y.at.z)/2,y:.08},{...y.at,y:.5}],cable:!0}:{}})}letz=Mn(n);for(letyofthis.liveHeatPumps(n)){letw=y.pump.heat??(y.pump.mode==="heating"||y.pLine truncated
</div>`}syncDevices(e){let t=this.viewer,n=this.building;if(!t||!n||!this.hass)return;let i=this._travel,o=i&&!i.loading?Nt(this.hass,i.history,i.t):this.hass;if((e||!this.openingLinks||this.linkedRegistry!==o.entities)&&(this.openingLinks=He(o,n.floors),this.furnitureLinks=ht(o,n.floors),this.linkedRegistry=o.entities,this.findIndex=null,this.alertSrc=this.alerts?sc(o,n,this.weatherEntityId,this.openingLinks):null,this.watched=mc({hass:o,building:n,openingLinks:this.openingLinks,furnitureLinks:this.furnitureLinks,needsRoomSensors:this.heatMode!=="none"||this.roomLabels,alertSources:this.alertSrc,weatherEntityId:this.weatherEntityId}),e=!0),!(e||this.watched.some(y=>this.shownStates.get(y)!==o.states[y])))return;Io(o,n).join(",")!==this.shownFor?.key&&t.setBuilding(this.shownBuilding(o)),this.shownStates=new Map(this.watched.map(y=>[y,o.states[y]])),this.refreshToday(n),this.refreshForecast(n);let a=fn(o,n),l=Ia(o,n.floors.some(y=>y.layer&&this.hiddenLayers.has(y.id))?this.shownBuilding(o):n);this.placementInfo=new Map(l.map(y=>[y.id,{floorId:y.floorId,roomId:y.roomId,x:y.x,z:y.z,y:y.y,rotation:y.rotation??0}]));let c=this.furnitureMarkers(o,n,new Set(l.map(y=>y.id)),new Set(a.map(y=>y.powerEntity)));a.push(...c.consumers);let u=gn(o,n,a,Le(n,y=>this.furnitureLinks?.get(y.id)?.power??null)),d=new Map(a.filter(y=>y.id!==y.powerEntity).map(y=>[y.id,y.power]));this.confirmSet=mt(o,n.floors);let m=new Set(this.liveCardsOn?this._liveCards.flatMap(y=>y.kind==="media"?[y.media.entity]:y.kind==="car"?[y.spot]:[]):[]);for(let y of n.floors)for(let w of y.outdoor??[]){if(!w.area_id&&!w.temp_entity&&!w.pump_entity)continue;let B=w.temp_entity?o.states[w.temp_entity]:void 0,D=w.pump_entity?o.states[w.pump_entity]:void 0,[O,pe]=Ae(w.points),rt=B&&Number.isFinite(Number(B.state))?`${W(o,ae(o,ir(Number(B.state),B.attributes.unit_of_measurement)),1)} ${re(o)}`:"",vt=!!D&&te(D);l.push({id:w.area_id?`outdoor:${w.id}`:w.pump_entity??w.temp_entity,floorId:y.id,roomId:null,x:O,z:pe,y:Qn(y,w,O,pe)+.7,icon:Ee(w.type==="pool"?"pool":w.type==="terrace"?"table-chair":"tree-outline"),name:w.area_id&&o.areas?.[w.area_id]?.name||$(o,`out_${w.type}`),text:[rt,vt?$(o,"pool_pump_on"):""].filter(Boolean).join(" \xB7 "),active:vt,unavailable:!1,glow:null,show:"always"})}let h=new Map;for(let y of n.floors){for(let w of y.placements)w.pin_offset&&h.set(`${y.id}:${w.entity_id}`,w.pin_offset);for(let w of y.furniture)w.pin_offset&&h.set(`f:${w.id}`,w.pin_offset)}let g=y=>{let w=y.lamp?void 0:(y.furnitureId?h.get(`f:${y.furnitureId}`):void 0)??h.get(`${y.floorId}:${y.id}`);return w?{...y,x:y.x+(w.x??0),z:y.z+(w.z??0),y:y.y+(w.y??0)}:y};t.setDevices([...[...l,...c.markers].map(g).map(y=>{let w=y.show==="no_power"||"energyDevice"in y&&y.energyDevice?null:d.get(y.id)??null,B={...y,power:w,powerText:w===null?void 0:ue(o,w),effect:this.dimmed?void 0:y.effect,text:this.subMeterText(o,n,u,y.furnitureId)??y.text},D=y.ownName&&(y.showName||this.markerNames)?y.ownName:"",O=m.has(y.id)||!!y.furnitureId&&m.has(y.furnitureId);return{...B,pin:this.showPin(B)&&!O,full:y.show==="always",caption:D}})]),t.setPickTargets(c.targets,this.openingTargets(),this.secondBlinds()),t.setScreens(c.screens),t.setFridgeDoors(_a(o,n.floors)),t.setCovers(Ea(o,n)),t.setRobots(this.robotInfos(o,n));let _=new Map;for(let y of n.floors)for(let w of y.furniture)!J(w.type)?.pet||!w.room_sensor||w.room_sensor==="none"||_.set(w.id,Hi(o,y.rooms.filter(B=>B.points.length>=3),null,w.room_sensor)?.id??null);_.size&&t.setPetRooms(_),t.setRoofWindows(tc(o,n)),t.setParked(go(o,n)),t.setGateStates(vc(o,n));let b=new Map(n.floors.flatMap(y=>y.openings.map(w=>[w.id,w.type]))),v=new Map([...this.openingLinks].map(([y,w])=>[y,Pe(o,w,b.get(y))]));t.setOpeningStates(v),this.setAlerts(this.alertSrc?mo(o,n,this.alertSrc,this.openingLinks):[]),this.watchLostContacts(o);let S=[...l,...c.markers].map(y=>`${y.id}:${y.glow?`${y.glow.level.toFixed(1)}/${y.glow.color.map(w=>w.toFixed(1)).join("/")}`:0}`).join(";")+"|"+[...v].map(([y,w])=>`${y}:${w.open}:${w.cover===null?"-":w.cover.toFixed(1)}`).join(";");if(S!==this.thumbSig){lety=this.thumbSig==="";this.thumbSig=S,y||this.scheduleThumbs(1500)}letk=Fc(o,n,a,n.energy.advanced?y=>this.furnitureLinks?.get(y.id)?.power??null:void0),M=this.liveCars(o,n);for(letyofM){if(!y.car.home||!y.car.charging&&!y.car.plugged)continue;letw=n.floors.flatMap(O=>O.furniture.filter(pe=>pe.type==="wallbox").map(pe=>({floorId:O.id,x:pe.x,z:pe.z,y:1}))).sort((O,pe)=>Math.hypot(O.x-y.at.x,O.z-y.at.z)-Math.hypot(pe.x-y.at.x,pe.z-y.at.z))[0],B=w&&w.floorId===y.at.floorId&&Math.hypot(w.x-y.at.x,w.z-y.at.z)<9,D=w??An(n);!D||!y.car.charging&&!B||k.arcs.push({key:`car:${y.spot}`,from:D,to:{...y.at,y:.8},power:y.car.charging?y.car.chargingW??7e3:0,color:[80,175,255],...B?{via:[{...D,y:.35},{floorId:y.at.floorId,x:(D.x+y.at.x)/2,z:(D.z+y.at.z)/2,y:.08},{...y.at,y:.5}],cable:!0}:{}})}letz=An(n);for(letyofthis.liveHeatPumps(n)){letw=y.pump.heat??(y.pump.mode==="heating"||y.pLine truncated
/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */
varB=globalThis,j=B.ShadowRoot&&(B.ShadyCSS===void0||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"inDocument.prototype&&"replace"inCSSStyleSheet.prototype,Z=Symbol(),ht=newWeakMap,H=class{constructor(t,i,r){if(this._$cssResult$=!0,r!==Z)throwError("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=i}getstyleSheet(){lett=this.o,i=this.t;if(j&&t===void0){letr=i!==void0&&i.length===1;r&&(t=ht.get(i)),t===void0&&((this.o=t=newCSSStyleSheet).replaceSync(this.cssText),r&&ht.set(i,t))}returnt}toString(){returnthis.cssText}},ct=s=>newH(typeofs=="string"?s:s+"",void0,Z),y=(s,...t)=>{leti=s.length===1?s[0]:t.reduce((r,e,n)=>r+(o=>{if(o._$cssResult$===!0)returno.cssText;if(typeofo=="number")returno;throwError("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(e)+s[n+1],s[0]);returnnewH(i,s,Z)},dt=(s,t)=>{if(j)s.adoptedStyleSheets=t.map(i=>iinstanceofCSSStyleSheet?i:i.styleSheet);elsefor(letioft){letr=document.createElement("style"),e=B.litNonce;e!==void0&&r.setAttribute("nonce",e),r.textContent=i.cssText,s.appendChild(r)}},F=j?s=>s:s=>sinstanceofCSSStyleSheet?(t=>{leti="";for(letroft.cssRules)i+=r.cssText;returnct(i)})(s):s;var{is:Rt,defineProperty:Ht,getOwnPropertyDescriptor:Ot,getOwnPropertyNames:Lt,getOwnPropertySymbols:Nt,getPrototypeOf:Ut}=Object,V=globalThis,pt=V.trustedTypes,Dt=pt?pt.emptyScript:"",It=V.reactiveElementPolyfillSupport,O=(s,t)=>s,K={toAttribute(s,t){switch(t){caseBoolean:s=s?Dt:null;break;caseObject:caseArray:s=s==null?s:JSON.stringify(s)}returns},fromAttribute(s,t){leti=s;switch(t){caseBoolean:i=s!==null;break;caseNumber:i=s===null?null:Number(s);break;caseObject:caseArray:try{i=JSON.parse(s)}catch{i=null}}returni}},ft=(s,t)=>!Rt(s,t),ut={attribute:!0,type:String,converter:K,reflect:!1,useDefault:!1,hasChanged:ft};Symbol.metadata??=Symbol("metadata"),V.litPropertyMetadata??=newWeakMap;var_=classextendsHTMLElement{staticaddInitializer(t){this._$Ei(),(this.l??=[]).push(t)}staticgetobservedAttributes(){returnthis.finalize(),this._$Eh&&[...this._$Eh.keys()]}staticcreateProperty(t,i=ut){if(i.state&&(i.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((i=Object.create(i)).wrapped=!0),this.elementProperties.set(t,i),!i.noAccessor){letr=Symbol(),e=this.getPropertyDescriptor(t,r,i);e!==void0&&Ht(this.prototype,t,e)}}staticgetPropertyDescriptor(t,i,r){let{get:e,set:n}=Ot(this.prototype,t)??{get(){returnthis[i]},set(o){this[i]=o}};return{get:e,set(o){leth=e?.call(this);n?.call(this,o),this.requestUpdate(t,h,r)},configurable:!0,enumerable:!0}}staticgetPropertyOptions(t){returnthis.elementProperties.get(t)??ut}static_$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;lett=Ut(this);t.finalize(),t.l!==void0&&(this.l=[...t.l]),this.elementProperties=newMap(t.elementProperties)}staticfinalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){leti=this.properties,r=[...Lt(i),...Nt(i)];for(leteofr)this.createProperty(e,i[e])}lett=this[Symbol.metadata];if(t!==null){leti=litPropertyMetadata.get(t);if(i!==void0)for(let[r,e]ofi)this.elementProperties.set(r,e)}this._$Eh=newMap;for(let[i,r]ofthis.elementProperties){lete=this._$Eu(i,r);e!==void0&&this._$Eh.set(e,i)}this.elementStyles=this.finalizeStyles(this.styles)}staticfinalizeStyles(t){leti=[];if(Array.isArray(t)){letr=newSet(t.flat(1/0).reverse());for(leteofr)i.unshift(F(e))}elset!==void0&&i.push(F(t));returni}static_$Eu(t,i){letr=i.attribute;returnr===!1?void0:typeofr=="string"?r:typeoft=="string"?t.toLowerCase():void0}constructor(){super(),this._$Ep=void0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=newPromise(t=>this.enableUpdating=t),this._$AL=newMap,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=newSet).add(t),this.renderRoot!==void0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){lett=newMap,i=this.constructor.elementProperties;for(letrofi.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),deletethis[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){lett=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);returndt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,i,r){this._$AK(t,r)}_$ET(t,i){letr=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,r);if(e!==void0&&r.reflect===!0){letn=(r.converter?.toAttribute!==void0?r.converter:K).toAttribute(i,r.type);this._$Em=t,n==null?this.removeAttribute(e):this.setAttribute(e,n),Line truncated
`]};customElements.get("nf-help-popup")||customElements.define("nf-help-popup",ot);var zt=["#4ec9ff","#ffbe69","#ae9bff","#72deb0","#ff87aa","#ebde72"],C=(s,t)=>String(s.states[t]?.attributes.friendly_name||t),Pt=s=>({variable_not_logged:"Die Variable wird nicht mehr geloggt.",trend_range_too_large_for_resolution:"Bitte f\xFCr diesen Zeitraum eine gr\xF6bere Aufl\xF6sung w\xE4hlen.",invalid_trend_range:"Bitte einen g\xFCltigen Zeitraum w\xE4hlen."})[String(s instanceof Error?s.message:s)]||String(s instanceof Error?s.message:s),at=class extends x{static properties={hass:{attribute:!1},ids:{attribute:!1},label:{attribute:!1},from:{state:!0},to:{state:!0},resolution:{state:!0},chartStyle:{state:!0},field:{state:!0},min:{state:!0},max:{state:!0},zero:{state:!0},band:{state:!0},live:{state:!0},series:{state:!0},hiddenSeries:{state:!0},loading:{state:!0},errors:{state:!0},hover:{state:!0},width:{state:!0},page:{state:!0}};request=0;drag=null;timer;observer;constructor(){super(),this.ids=[],this.label="",this.to=Math.floor(Date.now()/1e3),this.from=this.to-86400,this.resolution="auto",this.chartStyle="auto",this.field="v",this.min="",this.max="",this.zero=!1,this.band=!0,this.live=!1,this.series=[],this.hiddenSeries=new Set,this.loading=!1,this.errors=[],this.hover=null,this.width=900,this.page=0}async open(){await this.updateComplete,this.renderRoot.querySelector("dialog").showModal(),this.observer=new ResizeObserver(([t])=>{this.width=Math.max(280,Math.floor(t.contentRect.width))}),this.observer.observe(this.renderRoot.querySelector(".body")),this.timer=setInterval(()=>{if(this.live&&!this.loading){let t=this.to-this.from;this.to=Math.floor(Date.now()/1e3),this.from=this.to-t,this.load()}},3e4),await this.load()}disconnectedCallback(){super.disconnectedCallback(),++this.request,clearInterval(this.timer),this.observer?.disconnect()}async load(){let t=++this.request,i=this.from,r=this.to;if(this.errors=[],this.series=[],this.hover=null,this.page=0,!Number.isSafeInteger(i)||!Number.isSafeInteger(r)||i<1||r<=i){this.errors=["Das Ende muss nach dem Beginn des Zeitraums liegen."],this.loading=!1;return}this.loading=!0;let e=[],n=[];for(let o=0;o<this.ids.length&&t===this.request;o+=3){let h=this.ids.slice(o,o+3);(await Promise.allSettled(h.map(c=>this.hass.callWS({type:"nextfloor/archive/trend",entity_id:c,start:i,end:r,aggregation:this.resolution})))).forEach((c,p)=>c.status==="fulfilled"?e.push(c.value):n.push(`${C(this.hass,h[p])}:${Pt(c.reason)}`))}t!==this.request||!this.isConnected||(this.series=e,this.errors=n,this.loading=!1)}range(t,i){this.from=Math.max(1,Math.floor(t)),this.to=Math.max(this.from+1,Math.floor(i)),this.live=!1,this.load()}zoom(t,i=.5){let r=Math.max(60,Math.min(315576e3,(this.to-this.from)*t)),e=this.from+(this.to-this.from)*i;this.range(e-r*i,e+r*(1-i))}stamp(t){return new Date(t*1e3).toLocaleString(this.hass.language,{dateStyle:"short",timeStyle:"medium"})}number(t){return t.toLocaleString(this.hass.language,{maximumFractionDigits:Math.abs(t)<.01&&t!==0?5:2})}unit(t){return String(this.hass.states[t]?.attributes.unit_of_measurement??"")}selected(){return this.series.filter(t=>!this.hiddenSeries.has(t.entity_id))}value(t){let i=this.field==="v"?t.v:t[this.field]??t.v;return typeof i=="number"&&Number.isFinite(i)?i:null}color(t){return zt[this.ids.indexOf(t)%zt.length]}ratio(t){let i=t.currentTarget.getBoundingClientRect();return Math.max(0,Math.min(1,((t.clientX-i.left)/i.width*this.width-64)/(this.width-80)))}exportCsv(){let t=Object.fromEntries(this.ids.map(e=>[e,String(this.hass.states[e]?.attributes.symcon_path||C(this.hass,e))])),i=URL.createObjectURL(new Blob([Ct(this.selected(),t)],{type:"text/csv;charset=utf-8"})),r=document.createElement("a");r.href=i,r.download="Symcon-Trend.csv",r.click(),setTimeout(()=>URL.revokeObjectURL(i),1e3)}plot(t,i){let r=t.flatMap(l=>l.points.flatMap(f=>{let m=this.value(f);return m===null?[]:this.band&&!l.counter?[m,f.min??m,f.max??m]:[m]}));if(!r.length)return g`<pclass="note">KeinenumerischenArchivwerteindiesemZeitraum.</p>`;lete,n;try{[e,n]=Tt(r,this.min,this.max,this.zero||this.chartStyle==="bar"||t.some(l=>l.type===0)||this.chartStyle==="auto"&&t.some(l=>l.counter&&l.aggregation!=="raw"))}catch(l){returng`<prole="alert">${Pt(l)}</p>`}leto=64,h=this.width-16,a=14,c=220,p=l=>o+(l-this.from)/(this.to-this.from)*(h-o),d=l=>c-(l-e)/(n-e)*(c-a),v=(l,f=this.field)=>Number(f==="v"?l.v:l[f]??l.v),$=(l,f=this.field)=>{letm=l.points.filter(z=>typeofz.v=="number"),b=this.chartStyle==="step"||this.chartStyle==="auto"&&l.type===0;returnm.map((z,lt)=>`${lt?b?`H${p(z.t).toFixed(1)}V`:"L":"M"}${b&<?d(v(z,f)).toFixed(1):`${p(z.t).toFixed(1)},${d(v(z,f)).toFixed(1)}`}`).join("")+(m.length?b?`H${h}`:l.aggregation==="raw"?`L${h},${d(v(m[m.length-1],f)).toFixed(1)}`:"":"")},w=this.width<480?2:5;returng`<sectionclass="chart-group"><h3>${i||"Wert"}</h3><svgclass="plot"viewBox=${`00${this.width}256`}role="img"aria-label=${`Trend${i}`}@wheel=${Line truncated
<nf-help-popup.text=${"Zeitraum und Aufl\xF6sung lesen die originalen Symcon-Archivdaten. Rohdaten zeigen gespeicherte \xC4nderungen; ein zuvor bekannter Wert wird zum Beginn fortgef\xFChrt. Bei Z\xE4hlern sind aggregierte Werte der Verbrauch pro Intervall, bei Messwerten der Mittelwert. Mehrere Variablen werden einzeln dargestellt; unterschiedliche Einheiten erhalten eigene Diagramme. Zoomen: +/\u2212, Mausrad oder im Diagramm einen Zeitraum ziehen. Eigene Y-Grenzen gelten f\xFCr alle Diagramme. Begrenzte Rohdatenabfragen werden gekennzeichnet; w\xE4hle dann einen k\xFCrzeren Zeitraum oder eine Aggregation."}></nf-help-popup>
${this.errors.map(e=>g`<p class="error" role="alert">${e}</p>`)}${this.loading?g`<p class="note" role="status">Archivwerte werden geladen …</p>`:u}
${t.filter(e=>e.truncated).map(e=>g`<p class="error" role="status">${C(this.hass,e.entity_id)}: Die Abfrage ist auf ${(e.limit??1e4).toLocaleString(this.hass.language)} Einträge begrenzt. Bitte Zeitraum verkürzen oder Auflösung ändern.</p>`)}
${t.some(e=>e.counter&&e.aggregation!=="raw")?g`<p class="note">Zähler: Verbrauch pro Intervall</p>`:u}
`]};customElements.get("nf-trend-dialog")||customElements.define("nf-trend-dialog",at);async function ye(s,t,i){let r=Mt(s,t);if(!r.length)return;let e=document.createElement("nf-trend-dialog");Object.assign(e,{hass:s,ids:r,label:i}),document.body.append(e);try{await e.open()}catch(n){throw e.remove(),n}}export{at as NfTrendDialog,ye as openTrend};
check($counter['counter']&&$counter['points'][1]['v']===2.5&&$counter['points'][1]['min']===1.0,'Use native counter deltas and native min/max, without differentiating a counter twice');
check(end($calls)[2]===1,'Daily aggregation uses the native level 1');
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.