/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */ var w={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){let t=Math.trunc(e)||0;return this[t<0?this.length+t:t]}});typeof globalThis.structuredClone!="function"&&(globalThis.structuredClone=n=>n===void 0?n:JSON.parse(JSON.stringify(n)));var Zn=globalThis,Yn=Zn.ShadowRoot&&(Zn.ShadyCSS===void 0||Zn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vi=Symbol(),ys=new WeakMap,sn=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==vi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Yn&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=ys.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&ys.set(t,e))}return e}toString(){return this.cssText}},vs=n=>new sn(typeof n=="string"?n:n+"",void 0,vi),Q=(n,...e)=>{let t=n.length===1?n[0]:e.reduce((r,i,o)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("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)+n[o+1],n[0]);return new sn(t,n,vi)},ws=(n,e)=>{if(Yn)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),i=Zn.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=t.cssText,n.appendChild(r)}},wi=Yn?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return vs(t)})(n):n;var{is:xd,defineProperty:kd,getOwnPropertyDescriptor:Sd,getOwnPropertyNames:$d,getOwnPropertySymbols:Md,getPrototypeOf:Ad}=Object,Jn=globalThis,xs=Jn.trustedTypes,Ed=xs?xs.emptyScript:"",Rd=Jn.reactiveElementPolyfillSupport,an=(n,e)=>n,xi={toAttribute(n,e){switch(e){case Boolean:n=n?Ed:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ss=(n,e)=>!xd(n,e),ks={attribute:!0,type:String,converter:xi,reflect:!1,useDefault:!1,hasChanged:Ss};Symbol.metadata??=Symbol("metadata"),Jn.litPropertyMetadata??=new WeakMap;var Oe=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=ks){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){let r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&kd(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:o}=Sd(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s}};return{get:i,set(s){let a=i?.call(this);o?.call(this,s),this.requestUpdate(e,a,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ks}static _$Ei(){if(this.hasOwnProperty(an("elementProperties")))return;let e=Ad(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(an("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(an("properties"))){let t=this.properties,r=[...$d(t),...Md(t)];for(let i of r)this.createProperty(i,t[i])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let i of r)t.unshift(wi(i))}else e!==void 0&&t.push(wi(e));return t}static _$Eu(e,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ws(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:xi).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(e,t){let r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:xi;this._$Em=i;let a=s.fromAttribute(t,o.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(e,t,r,i=!1,o){if(e!==void 0){let s=this.constructor;if(i===!1&&(o=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??Ss)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r){let{wrapped:s}=o,a=this[i];s!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,o,a)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};Oe.elementStyles=[],Oe.shadowRootOptions={mode:"open"},Oe[an("elementProperties")]=new Map,Oe[an("finalized")]=new Map,Rd?.({ReactiveElement:Oe}),(Jn.reactiveElementVersions??=[]).push("2.1.2");var Ri=globalThis,$s=n=>n,Qn=Ri.trustedTypes,Ms=Qn?Qn.createPolicy("lit-html",{createHTML:n=>n}):void 0,Fs="$lit$",nt=`lit$${Math.random().toFixed(9).slice(2)}$`,Ds="?"+nt,zd=`<${Ds}>`,pt=document,cn=()=>pt.createComment(""),un=n=>n===null||typeof n!="object"&&typeof n!="function",zi=Array.isArray,Td=n=>zi(n)||typeof n?.[Symbol.iterator]=="function",ki=`[ \f\r]`,ln=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,As=/-->/g,Es=/>/g,ht=RegExp(`>|${ki}(?:([^\\s"'>=/]+)(${ki}*=${ki}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),Rs=/'/g,zs=/"/g,Hs=/^(?:script|style|textarea|title)$/i,Ti=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),p=Ti(1),re=Ti(2),Mg=Ti(3),ft=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),Ts=new WeakMap,mt=pt.createTreeWalker(pt,129);function Ps(n,e){if(!zi(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ms!==void 0?Ms.createHTML(e):e}var Fd=(n,e)=>{let t=n.length-1,r=[],i,o=e===2?"":e===3?"":"",s=ln;for(let a=0;a"?(s=i??ln,h=-1):u[1]===void 0?h=-2:(h=s.lastIndex-u[2].length,c=u[1],s=u[3]===void 0?ht:u[3]==='"'?zs:Rs):s===zs||s===Rs?s=ht:s===As||s===Es?s=ln:(s=ht,i=void 0);let d=s===ht&&n[a+1].startsWith("/>")?" ":"";o+=s===ln?l+zd:h>=0?(r.push(c),l.slice(0,h)+Fs+l.slice(h)+nt+d):l+nt+(h===-2?a:d)}return[Ps(n,o+(n[t]||"")+(e===2?"":e===3?"":"")),r]},dn=class n{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let o=0,s=0,a=e.length-1,l=this.parts,[c,u]=Fd(e,t);if(this.el=n.createElement(c,r),mt.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=mt.nextNode())!==null&&l.length0){i.textContent=Qn?Qn.emptyScript:"";for(let d=0;d2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=f}_$AI(e,t=this,r,i){let o=this.strings,s=!1;if(o===void 0)e=Et(this,e,t,0),s=!un(e)||e!==this._$AH&&e!==ft,s&&(this._$AH=e);else{let a=e,l,c;for(e=o[0],l=0;l{let r=t?.renderBefore??e,i=r._$litPart$;if(i===void 0){let o=t?.renderBefore??null;r._$litPart$=i=new hn(e.insertBefore(cn(),o),o,void 0,t??{})}return i._$AI(n),i};var Fi=globalThis,X=class extends Oe{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Is(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ft}};X._$litElement$=!0,X.finalized=!0,Fi.litElementHydrateSupport?.({LitElement:X});var Hd=Fi.litElementPolyfillSupport;Hd?.({LitElement:X});(Fi.litElementVersions??=[]).push("4.2.2");var gt=Math.PI/180;function _t(n,e,t){let r=n.getTime()/864e5-10957.5,i=(357.529+.98560028*r)*gt,s=(280.459+.98564736*r+1.915*Math.sin(i)+.02*Math.sin(2*i))*gt,a=(23.439-36e-8*r)*gt,l=Math.atan2(Math.cos(a)*Math.sin(s),Math.cos(s)),c=Math.asin(Math.sin(a)*Math.sin(s)),h=(((18.697374558+24.06570982441908*r)%24+24)%24*15+t)*gt-l,m=e*gt,d=Math.asin(Math.sin(m)*Math.sin(c)+Math.cos(m)*Math.cos(c)*Math.cos(h)),g=Math.atan2(Math.sin(h),Math.cos(h)*Math.sin(m)-Math.tan(c)*Math.cos(m))/gt+180;return{elevation:d/gt,azimuth:(g%360+360)%360}}function Di(n,e){let t=Object.fromEntries(new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}).formatToParts(new Date(n)).map(r=>[r.type,Number(r.value)]));return Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second)}function zt(n,e,t=new Date){let[r,i]=[Math.floor(n),Math.round(n%1*60)];if(e)try{let s=new Date(Di(t.getTime(),e)),a=Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate(),r,i),l=a-(Di(a,e)-a);return l=a-(Di(l,e)-l),new Date(l)}catch{}let o=new Date(t);return o.setHours(r,i,0,0),o}var Cs;function Xn(){let n=new URL("./nextfloor-card-editor.js?v=8f259dd60440",new URL(import.meta.url)).href;return Cs??=import(n),Cs}var er=(n,e,t={})=>n.callWS({type:`nextfloor/${e}`,...t}),Ns=n=>er(n,"building/get");async function Ls(n,e){return(await er(n,"building/save",{building:e})).revision}function Os(n,e){return n.connection.subscribeMessage(t=>e(t.revision),{type:"nextfloor/building/subscribe"})}async function Ws(n,e){return(await er(n,"image/get",{image_id:e})).data}async function Bs(n){return(await er(n,"packs/list")).packs}var Pd=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function Vs(n){let e=n instanceof Uint8Array?n:new Uint8Array(n),t=e.length*8,r=new Uint8Array(e.length+9+63>>6<<6);r.set(e),r[e.length]=128;let i=new DataView(r.buffer);i.setUint32(r.length-8,Math.floor(t/4294967296)),i.setUint32(r.length-4,t>>>0);let o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),s=new Uint32Array(64),a=(l,c)=>l>>>c|l<<32-c;for(let l=0;l>>3,S=a(s[y-2],17)^a(s[y-2],19)^s[y-2]>>>10;s[y]=s[y-16]+$+s[y-7]+S>>>0}let[c,u,h,m,d,g,_,b]=o;for(let y=0;y<64;y++){let $=b+(a(d,6)^a(d,11)^a(d,25))+(d&g^~d&_)+Pd[y]+s[y]>>>0,S=(a(c,2)^a(c,13)^a(c,22))+(c&u^c&h^u&h)>>>0;[b,_,g,d,m,h,u,c]=[_,g,d,m+$>>>0,h,u,c,$+S>>>0]}o[0]+=c,o[1]+=u,o[2]+=h,o[3]+=m,o[4]+=d,o[5]+=g,o[6]+=_,o[7]+=b}return[...o].map(l=>l.toString(16).padStart(8,"0")).join("")}var Ks=n=>n.trim().replace(/^\/local\/www\//i,"/local/"),Gs=n=>/^(https:\/\/|\/local\/|\/hacsfiles\/)\S+\.m?js(\?\S*)?$/i.test(n.trim());var Id=globalThis,Us=Id.__nextfloorPluginStore??={plugins:new Map,listeners:new Set},rr=Us.plugins,Hi=Us.listeners,Cd=new Set(["none","rainbow","pulse","flicker"]),Nd=5;function Tt(n,e){n.errors.lengthHi.delete(n)}function Pi(n,e=""){if(!n||typeof n!="object")throw new Error("register() needs a plugin object");if(typeof n.id!="string"||!/^[a-z0-9][a-z0-9._-]{0,63}$/i.test(n.id))throw new Error("plugin id must be 1\u201364 letters, digits, '.', '_' or '-'");if(n.apiVersion!==1)throw new Error(`plugin "${n.id}" wants API ${String(n.apiVersion)}, NextFloor offers ${1}`);for(let t of Object.keys(n.lightAnimations??{})){if(Cd.has(t))throw new Error(`plugin "${n.id}": light animation "${t}" is built in`);if(typeof n.lightAnimations?.[t]!="function")throw new Error(`plugin "${n.id}": light animation "${t}" is not a function`)}for(let t of n.devices??[]){if(typeof t?.match!="function")throw new Error(`plugin "${n.id}": every device extension needs match()`);for(let r of["floorWedge","tap","watch"])if(t[r]!==void 0&&typeof t[r]!="function")throw new Error(`plugin "${n.id}": ${r} must be a function`);for(let r of t.settings??[]){if(!r||typeof r.key!="string"||!/^\w{1,32}$/.test(r.key))throw new Error(`plugin "${n.id}": a setting needs a key of 1\u201332 letters, digits or "_"`);if(!["number","select","boolean"].includes(r.type))throw new Error(`plugin "${n.id}": setting "${r.key}" has an unknown type`)}}for(let t of n.roomSections??[])if(typeof t?.render!="function"||typeof t.id!="string")throw new Error(`plugin "${n.id}": every room section needs id and render()`);rr.set(n.id,{plugin:n,status:{id:n.id,name:n.name||n.id,version:n.version||"",source:e,errors:[]}}),Ld()}function Od(n){for(let{plugin:e,status:t}of rr.values()){let r=e.lightAnimations?.[n];if(r)return{fn:r,status:t}}return null}var js=n=>Od(n)!==null;function*mn(n,e){for(let{plugin:t,status:r}of rr.values())for(let i of t.devices??[]){let o=!1;try{o=i.match(n,e)}catch(s){Tt(r,s)}o&&(yield{device:i,status:r})}}function Dt(n,e){for(let{device:t}of mn(n,e))return t.kind??"sensor";return null}function qs(n){let e=null;for(let{device:t,status:r}of mn(n.entityId,n.state))if(t.marker)try{let i=t.marker(n);if(!i)continue;e={...e??{}},typeof i.icon=="string"&&i.icon&&(e.icon=i.icon),typeof i.text=="string"&&(e.text=i.text.slice(0,60)),typeof i.active=="boolean"&&(e.active=i.active)}catch(i){Tt(r,i)}return e}function Zs(n){let e=[];for(let{device:t,status:r}of mn(n.entityId,n.state))if(t.watch)try{let i=t.watch(n);Array.isArray(i)&&e.push(...i.filter(o=>typeof o=="string").slice(0,20))}catch(i){Tt(r,i)}return e}function Ys(n,e){let t={};for(let r of n??[]){let i=e?.[r.key],o=r.type==="number"?typeof i=="number"&&Number.isFinite(i):r.type==="boolean"?typeof i=="boolean":typeof i=="string"&&(r.options??[]).some(([s])=>s===i);t[r.key]=o?i:r.default}return t}var Wd=n=>{let e=typeof n=="string"?/^#([0-9a-f]{6})$/i.exec(n.trim()):null;if(!e)return null;let t=Number.parseInt(e[1],16);return[(t>>16&255)/255,(t>>8&255)/255,(t&255)/255]},tr=(n,e,t,r)=>typeof n=="number"&&Number.isFinite(n)?Math.min(r,Math.max(t,n)):e;function Js(n,e,t){for(let{device:r,status:i}of mn(n.entityId,n.state))if(r.floorWedge)try{let o=r.floorWedge({...n,placement:e,settings:Ys(r.settings,t?.[i.id])});if(!o)continue;let s=tr(o.reach,0,0,30);if(s<=0)continue;return{angle:tr(o.angle,90,1,360),reach:s,near:tr(o.near,0,0,s),color:Wd(o.color)??[.04,.22,.28],opacity:tr(o.opacity,.6,0,1),through:o.tapThrough===!0}}catch(o){Tt(i,o)}return null}function Qs(n,e,t,r){for(let{device:i,status:o}of mn(n.entityId,n.state))if(i.tap)try{if(i.tap({...n,...r,placement:e,settings:Ys(i.settings,t?.[o.id])})===!0)return!0}catch(s){Tt(o,s)}return!1}function Xs(n){let e=[];for(let{plugin:t,status:r}of rr.values())for(let i of t.roomSections??[])try{let o=i.render(n);if(o==null||o===""||typeof o!="string"&&!(o instanceof Node))continue;e.push({key:`${t.id}/${i.id}`,title:r.name,content:o})}catch(o){Tt(r,o)}return e}var Ii=new Map,Ci="";function Ni(){let n=globalThis;if(n.NextFloor)return;n.NextFloor={apiVersion:1,register:t=>Pi(t,Ci)};let e=n.__nextfloorPlugins??[];n.__nextfloorPlugins=[];for(let t of e)try{Pi(t)}catch(r){console.warn("NextFloor: plugin rejected",r)}}var Bd=n=>[...new Uint8Array(n)].map(e=>e.toString(16).padStart(2,"0")).join("");async function Vd(n,e=(...t)=>fetch(...t)){if(!n.sha256)return{url:n.url};let t=globalThis.crypto?.subtle,r=await e(n.url,{cache:"no-store"});if(!r.ok)throw new Error(`HTTP ${r.status}`);let i=await r.arrayBuffer();if((t?Bd(await t.digest("SHA-256",i)):Vs(i))!==n.sha256.toLowerCase())throw new Error("checksum mismatch: the file is not the one that was reviewed");let s=URL.createObjectURL(new Blob([i],{type:"text/javascript"}));return{url:s,revoke:()=>URL.revokeObjectURL(s)}}async function Li(n,e=r=>import(r),t){Ni();for(let r of n??[]){if(!r.enabled||Ii.has(r.url))continue;if(!Gs(r.url)){Ii.set(r.url,{url:r.url,state:"error",error:"not allowed: use /local/\u2026, /hacsfiles/\u2026 or https://\u2026"});continue}let i={url:r.url,state:"loading"};Ii.set(r.url,i);let o;try{o=await Vd({...r,url:Ks(r.url)},t),Ci=r.url,await e(o.url),i.state="loaded"}catch(s){i.state="error",i.error=s instanceof Error?s.message:String(s),console.warn(`NextFloor: plugin ${r.url} failed to load`,s)}finally{Ci="",o?.revoke?.()}}}var ea=[],ir=new Map,ta=0,na=(n,e)=>`pack:${n}:${e}`,Oi=n=>n.startsWith("pack:");function ra(n){ea=n,ir=new Map;for(let e of n)for(let t of e.items)ir.set(na(e.id,t.id),t);ta+=1}var Wi=()=>ea,or=()=>ta,Kd={};function ee(n){if(!Oi(n))return;let e=ir.get(n);if(e)return e;let[,t,...r]=n.split(":"),i=Kd[t];return i?ir.get(na(i,r.join(":"))):void 0}var sr=n=>!!n?.parts.some(e=>e.move);function ia(n,e){if(e===null)return Math.min(1,Math.max(0,n.cover_rest??1));let t=Math.min(1,Math.max(0,e/100));return n.cover==="extends"?t:1-t}var oa=n=>ee(n)?.parts.find(e=>e.screen);var sa=n=>!!ee(n)?.climate;function aa(n,e){return n.name[e.split("-")[0]]??n.name.en??Object.values(n.name)[0]??n.id}function se(n,e){return e.mount_y!=null?e.mount_y:Ud(n,e)+(Gd(e)?0:lr(n,e.x,e.z))}var Gd=n=>n.type==="led_strip"||ee(n.type)?.mount==="ceiling";function Ud(n,e){if(e.type==="lamp_wall")return la;if(e.type==="led_strip")return Math.max(0,ke(n,e.x,e.z)-.04-Math.max(.02,e.h));let t=ee(e.type);if(!t)return ca(e);switch(t.mount){case"surface":return ur(n,e.x,e.z);case"wall":return t.wall_y??1;case"ceiling":return Math.max(0,cr(n,e)-e.h);default:return 0}}function ar(n){if(n==="plant")return"plant";let e=ee(n);return e?e.household?e.household:/monstera|plant|herb_garden|flower_pots|bonsai|ficus|cactus|kaktus/.test(e.id)?"plant":null:null}var We=["electricity","water","gas","heating","cooling"];var qd={lawn:.012,terrace:.12,path:.02,driveway:.02,pavers:.025,stepping_stones:.025,natural_stone:.03,street:.02,sidewalk:.12,gravel:.018,river:.008,stream:.006,pool:-.25,bed:.15,wild:.03,hedge:1.2,fence:1,pergola:2.2};function Zd(n){return n==="hedge"||n==="fence"||n==="pergola"}function Yd(n,e,t){let r=n.slope??0;if(!r||n.type==="pool")return 0;let i=n.slope_dir??"x",o=(c,u)=>i==="x"?c:i==="-x"?-c:i==="z"?u:-u,s=1/0,a=-1/0;for(let[c,u]of n.points){let h=o(c,u);s=Math.min(s,h),a=Math.max(a,h)}if(a-s<1e-6)return 0;let l=Math.min(1,Math.max(0,(o(e,t)-s)/(a-s)));return r*l}function dr(n,e,t,r){return hr(n)+(e.offset??0)+qd[e.type]-Yd(e,t,r)}function hr(n){return n.elevation>.3?0:-.2}function pn(n,e,t){let r=(n.outdoor??[]).filter(o=>!Zd(o.type)&&o.type!=="pool"&&H([e,t],o.points)),i=[...r].reverse().find(o=>o.cut)??r[0];return i?dr(n,i,e,t):hr(n)}var Jd={meter:null,grid:null,grid_invert:!1,solar:null,battery:null,battery_invert:!1,battery_soc:null,consumption:null,tariff:null};var ha={type:"none",pitch:35,overhang:.4};var Qd={wall_exterior:.24,wall_interior:.12,grid:.05,north:0,roof:{...ha}};function Xd(n,e,t){return{id:n,name:e,elevation:t,height:2.5,cut_height:1.15,rooms:[],openings:[],furniture:[],placements:[],background:null,outdoor:[],walls:[],ha_floor:null}}var ma=new Set(["lamp_ceiling","lamp_downlight","lamp_spot","lamp_panel","lamp_pendant","ceiling_fan","lamp_floor","lamp_uplight","lamp_table","lamp_wall","led_strip","lamp_bollard","lamp_garden"]),la=1.75;function pa(n){return th.has(n.type)||["stairwell","parking"].includes(n.type)?!1:ee(n.type)?.mount!=="ceiling"}function mr(n){return ma.has(n)||!!ee(n)?.light}var eh=new Set(["table","table_round","coffee_table","desk","nightstand","sideboard","dresser","kitchen","island","worktop","tv_board","dishwasher","washer","dryer"]);function fa(n,e,t,r=0){let i=ih(n.points),o=i.x1-i.x0-2*r,s=i.z1-i.z0-2*r,a=[];for(let l=0;ln?.floor_offset&&Number.isFinite(n.floor_offset)?n.floor_offset:0;function lr(n,e,t){let r=n.rooms.find(i=>i.points.length>=3&&i.floor_offset&&H([e,t],i.points));return nh(r)}function ke(n,e,t){let r=n.rooms.find(i=>i.points.length>=3&&H([e,t],i.points));return r?.ceiling!=null&&r.ceiling>0?r.ceiling:n.height}var cr=(n,e)=>e.ceiling_y!=null&&e.ceiling_y>0?e.ceiling_y:ke(n,e.x,e.z);function ur(n,e,t){let r=0;for(let i of n.furniture)!(eh.has(i.type)||ee(i.type)?.surface)||!H([e,t],pr(i))||(r=Math.max(r,i.h));return r}var jd=new Set([...ma,"radiator","robot_vacuum","inverter","home_battery","wallbox","meter","tv_board","tv_wall","desk","fridge","fridge_smart","stove","kitchen_tall","dishwasher","washer","dryer","kitchen","island","sink"]),ua={sofa:[2.2,.9,.82],armchair:[.85,.85,.8],table:[1.6,.9,.75],chair:[.46,.5,.9],bed:[1.6,2.05,.9],nightstand:[.45,.4,.5],wardrobe:[1.8,.6,2.1],shelf:[.9,.35,1.9],kitchen:[2.4,.62,.92],worktop:[1.2,.62,.91],inverter:[.5,.2,.65],home_battery:[.6,.25,1.1],wallbox:[.3,.15,.42],heating_manifold:[1.5,.35,1.1],buffer_tank:[.85,.85,1.85],freshwater_station:[.65,.28,.9],meter:[.55,.21,1.1],grid_point:[.4,.22,.6],fridge:[.6,.65,1.8],fridge_smart:[.91,.73,1.78],stairwell:[1,2.6,.02],stove:[.6,.62,.92],sink:[.9,.62,.92],bathtub:[1.7,.75,.58],shower:[.9,.9,2],wc:[.38,.6,.8],washbasin:[.6,.46,.85],desk:[1.4,.7,.75],tv_board:[1.8,.42,.5],plant:[.45,.45,1.1],rug:[2,1.4,.01],stairs:[1,3.2,2.75],stool:[.55,.55,.42],lamp_ceiling:[.4,.4,.08],lamp_downlight:[.1,.1,.02],lamp_spot:[.1,.1,.14],lamp_panel:[.6,.6,.03],lamp_uplight:[.35,.35,1.8],lamp_bollard:[.16,.16,.8],lamp_garden:[.12,.12,.3],radiator:[1,.1,.6],robot_vacuum:[.36,.5,.1],parking:[2.6,5.2,.02],lamp_pendant:[.4,.4,.8],ceiling_fan:[1.32,1.32,.32],lamp_floor:[.4,.4,1.7],lamp_table:[.28,.28,.45],lamp_wall:[.22,.12,.2],led_strip:[2,.04,.03],coffee_table:[1.1,.6,.42],tv_wall:[1.3,.08,.75],sideboard:[1.6,.45,.8],table_round:[1.1,1.1,.75],bench:[1.4,.45,.85],corner_bench:[2,1.6,.9],bar_stool:[.42,.42,.75],kitchen_wall:[.8,.35,.7],kitchen_tall:[.6,.62,2.1],island:[1.8,.9,.92],dishwasher:[.6,.62,.92],bunk_bed:[1,2.05,1.65],dresser:[1,.5,.9],washer:[.6,.6,.85],dryer:[.6,.6,.85],office_chair:[.65,.65,1.1],tall_cabinet:[.6,.6,2.1],coat_rack:[1,.35,1.9]};function Bi(n){n.energy={...Jd,...n.energy??{}},n.presence=n.presence??[],n.version=1,n.settings={...Qd,...n.settings,roof:{...ha,...n.settings?.roof??{}}},n.floors.forEach((e,t)=>{let r=Xd(e.id,e.name??`Floor ${t+1}`,e.elevation??t*2.8);for(let i of Object.keys(r))e[i]===void 0&&(e[i]=r[i])});for(let e of n.floors){e.outdoor=e.outdoor??[],e.walls=e.walls??[],e.rooms=e.rooms.map(r=>({...r,name:r.name??"",area_id:r.area_id??null,floor_material:r.floor_material??"wood",panel:r.panel??[]})),e.ha_floor=e.ha_floor??null,e.placements=e.placements.map(r=>({...r,mount:r.mount??null,rotation:r.rotation??0})),e.furniture=e.furniture.map(r=>({...r,entity:r.entity??null,power:r.power??null}));let t=e.placements.filter(r=>r.entity_id.startsWith("light."));if(t.length){let r={ceiling:"lamp_ceiling",floor:"lamp_floor",table:"lamp_table",wall:"lamp_wall"};for(let i of t){let o=r[i.mount??"ceiling"],[s,a,l]=ua[o],c=`lamp_${i.entity_id.slice(6).replace(/[^A-Za-z0-9_\-.]/g,"_")}`.slice(0,54),u=c,h=1;for(;e.furniture.some(m=>m.id===u);)u=`${c}_${h++}`;e.furniture.push({id:u,type:o,x:i.x,z:i.z,rotation:0,w:s,d:a,h:l,variant:null,entity:i.entity_id,power:null,animations_enabled:i.animations_enabled,effect_animations:structuredClone(i.effect_animations)})}e.placements=e.placements.filter(i=>!i.entity_id.startsWith("light."))}e.openings=e.openings.map(r=>({...r,type:["door","window","garage"].includes(r.type)?r.type:"door",edge:Number.isInteger(r.edge)?r.edge:0,offset:Number.isFinite(r.offset)?r.offset:.5,width:Number.isFinite(r.width)&&r.width>0?r.width:r.type==="garage"?2.5:r.type==="window"?1.2:.9,height:Number.isFinite(r.height)&&r.height>0?r.height:r.type==="window"?1.3:r.type==="garage"?2.1:2.05,sill:Number.isFinite(r.sill)?r.sill:r.type==="window"?.9:0,hinge:r.hinge??"left",leaves:r.leaves??1,swing:r.swing??"in",style:r.style??null,cover:r.cover??null,contact:r.contact??null,contact2:r.contact2??null,tilt:r.tilt??null}))}return rh(n),n}function rh(n){let e=(t,r)=>{let i=new Set;for(let o of t)(typeof o.id!="string"||!o.id||i.has(o.id))&&(o.id=da(r)),i.add(o.id)};e(n.floors,"floor");for(let t of n.floors){for(let r of t.rooms)(typeof r.id!="string"||!r.id)&&(r.id=da("room"));e(t.openings,"op"),e(t.furniture,"furn"),e(t.outdoor,"out")}}function da(n){return`${n}_${Math.random().toString(36).slice(2,10)}`}function bt(n){let e=0;for(let t=0;to+s[0],0)/i,n.reduce((o,s)=>o+s[1],0)/i]}let t=0,r=0;for(let i=0;i[n.x+s*t-a*r,n.z+s*r+a*t])}function H(n,e){let t=!1;for(let r=0,i=e.length-1;rn[1]!=l>n[1]&&n[0]<(a-o)*(n[1]-s)/(l-s)+o&&(t=!t)}return t}var ga={lamp_ceiling:"ceiling",lamp_downlight:"downlight",lamp_spot:"spot",lamp_panel:"panel",lamp_uplight:"uplight",lamp_bollard:"bollard",lamp_garden:"garden",lamp_pendant:"pendant",ceiling_fan:"fan",lamp_floor:"floor",lamp_table:"table",lamp_wall:"wall",led_strip:"strip"};var B=n=>n?.symconObjects!==void 0;function _a(n,e,t=[0,1,2,3]){let r=n?.states[e]?.attributes;return!!r?.symcon_id&&!r.symcon_source_entity&&t.includes(Number(r.symcon_variable_type))}function ge(n){return!n||n.state==="unknown"||n.state==="unavailable"?null:n.attributes.symcon_value??n.attributes.symcon_numeric_value??n.state}function _e(n){let e=ge(n);if(e===null||typeof e=="boolean"||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function ce(n){let e=ge(n);if(e===null)return null;if(typeof e=="boolean")return e;if(typeof e=="number")return e>0;let t=String(e).trim().toLowerCase();if(["on","true","1","home","open","an","ein","ja","regen","rain","wet","nass"].includes(t))return!0;if(["off","false","0","not_home","closed","aus","nein","trocken","dry"].includes(t))return!1;let r=Number(t);return t!==""&&Number.isFinite(r)?r>0:null}function De(n){return ge(n)===null?"\u2013":String(n?.attributes.symcon_formatted??ge(n))}var oh=700,Ki="nextfloor.unsaved",Ht="0.3.1";function sh(){try{let n=localStorage.getItem(Ki);return n?JSON.parse(n):null}catch{return null}}function Vi(n){try{n?localStorage.setItem(Ki,JSON.stringify(n)):localStorage.removeItem(Ki)}catch{}}var ba=n=>n&&typeof n=="object"&&"message"in n?String(n.message):String(n);function ah(n,e){let t=o=>o.split(/[.-]/).map(s=>Number.parseInt(s,10)||0),[r,i]=[t(n),t(e)];for(let o=0;othis.host.requestUpdate()),this.hass&&this.start()}hostDisconnected(){this.connected=!1,this.stopPlugins?.(),this.stopPlugins=null,this.flush(),this.stopListening?.(),this.stopListening=null}edit(e){this.hass&&B(this.hass)&&!this.hass.user?.is_admin||(this.building=e,Li(e.settings.plugins),this.waiting=e,clearTimeout(this.timer),this.timer=setTimeout(()=>{this.flush()},oh),this.host.requestUpdate())}get frontendVersion(){return Ht}get versionGap(){let e=this.backendVersion;return!e||Ht==="dev"||e===Ht?null:ah(e,Ht)>0?"frontend":"backend"}get needsRestart(){return this.saveError&&/extra keys not allowed/i.test(this.saveError)?!0:!!this.backendVersion&&Ht!=="dev"&&this.backendVersion!==Ht}restoreDraft(){let e=this.draft;this.draft=null,e&&this.edit(Bi(e.building))}discardDraft(){this.draft=null,Vi(null),this.host.requestUpdate()}async flush(){clearTimeout(this.timer),this.inFlight&&await this.inFlight;let e=this.waiting,t=this.hass;!e||!t||(this.waiting=null,this.saveState="saving",this.host.requestUpdate(),this.inFlight=this.send(t,e),await this.inFlight,this.inFlight=null)}async send(e,t){try{let r=await Ls(e,t);this.ownRevisions.add(r),this.revision=r,this.saveState=this.waiting?"saving":"saved",this.saveError=null,Vi(null)}catch(r){this.saveState="error",this.saveError=ba(r),B(e)||Vi({building:t,savedAt:Date.now()})}this.host.requestUpdate()}async start(){let e=this.hass;if(e&&(await Promise.all([this.reloadPacks(),this.reload()]),!(this.stopListening||!this.connected)))try{this.stopListening=await Os(e,t=>{let r=this.ownRevisions.has(t)||t===this.revision,i=this.waiting!==null||this.inFlight!==null;!r&&!i&&this.reload()})}catch{}}async reloadPacks(){if(this.hass){try{this.packs=await Bs(this.hass)}catch{this.packs=[]}ra(this.packs),this.host.requestUpdate()}}async reload(){if(this.hass){try{let e=await Ns(this.hass);this.building=Bi(e.building),Li(this.building.settings.plugins),this.backendVersion=e.version??null,this.revision=e.revision,this.error=null,!B(this.hass)&&this.draft===null&&!this.waiting&&(this.draft=sh())}catch(e){this.error=ba(e)}this.host.requestUpdate()}}};function W(n,e){return!n||n.symconObjects===void 0?!0:!!n.states[e]&&n.states[e].attributes.symcon_can_control!==!1&&n.states[e].attributes.symcon_has_action!==!1}var Gi=n=>n.slice(0,n.indexOf(".")),lh={light:"light",switch:"switch",input_boolean:"switch",valve:"switch",fan:"fan",cover:"cover",climate:"climate",media_player:"media",lock:"lock",sensor:"sensor",binary_sensor:"binary",event:"sensor",scene:"scene",script:"script"},P=n=>lh[Gi(n)]??null,Ui=["light","cover","climate","media","switch","fan","lock","binary","sensor","scene","script"];function ya(n,e=!1){if(e||n.startsWith("lamp:"))return"light";if(n.startsWith("tap:"))return"tap";if(n.startsWith("gang:"))return"switch";if(n==="grid")return"sensor";let t=P(n);return t&&t!=="scene"&&t!=="script"?t:"other"}var va=new Set(["light","switch","fan"]),wa=n=>n!==null&&n!=="scene"&&n!=="script",C=n=>!n||n.state==="unavailable"||n.state==="unknown"&&!n.entity_id.startsWith("event."),ch=new Set(["motion","occupancy","presence","moving"]),xa=(n,e)=>e.startsWith("binary_sensor.")&&ch.has(String(n?.states[e]?.attributes.device_class??"")),gn=n=>!!n&&n.entity_id.startsWith("cover.")&&n.state==="unknown"&&n.attributes.assumed_state===!0,fr=(n,e)=>n.filter(t=>(!C(t)||gn(t))&&!e?.has(t.entity_id)).map(t=>t.entity_id);function O(n,e,t){let r=String(n?.states[e]?.attributes.friendly_name??n?.entities?.[e]?.name??e);if(!t||r.length<=t.length+1||!r.toLowerCase().startsWith(`${t.toLowerCase()} `))return r;let i=r.slice(t.length+1);return i[0].toUpperCase()+i.slice(1)}var uh=new Set(["running","printing","prepare","preparing","slicing","heating","busy","working","active","washing","rinsing","spinning","drying","cleaning","in_progress","in progress","on"]),gr=n=>!!n&&n.entity_id.startsWith("sensor.")&&n.attributes.device_class==="enum";function ne(n){if(!n)return!1;if(n.entity_id.startsWith("vacuum."))return["cleaning","returning"].includes(n.state);if(n.entity_id.startsWith("valve."))return n.state==="open"||n.state==="opening";let e=P(n.entity_id);return e==="light"||e==="switch"||e==="fan"||e==="binary"?n.state==="on":e==="cover"?n.state==="open"||n.state==="opening":e==="climate"?["heating","cooling"].includes(String(n.attributes.hvac_action)):e==="media"?n.state==="playing":e==="lock"?n.state==="unlocked"||n.state==="open":e==="sensor"?gr(n)&&uh.has(n.state.toLowerCase()):!1}var ka=n=>Math.min(1,Math.max(0,n));function dh(n){let e=ka((n-2200)/4300),t=[1,.66,.26],r=[.78,.9,1];return[0,1,2].map(i=>t[i]+(r[i]-t[i])*e)}function Be(n,e){if(!n||n.state!=="on")return null;let t=e&&!["unavailable","unknown"].includes(e.state)?e.attributes:n.attributes,r=typeof t.brightness=="number"?.2+.8*Math.sqrt(ka(t.brightness/255)):1,i=t.rgb_color;return i&&!["color_temp","brightness","onoff"].includes(String(t.color_mode))?{color:[i[0]/255,i[1]/255,i[2]/255],level:r}:typeof t.color_temp_kelvin=="number"?{color:dh(t.color_temp_kelvin),level:r}:{color:[1,.71,.28],level:r}}function Sa(n,e,t){let r=Be(n,t);if(r)return r;for(let i of e){let o=Be(i);if(o)return{color:o.color,level:o.level*.6}}return null}function It(n,e,t=null){if(n==="light"&&t==="floor")return 1.95;if(n==="light"&&t==="table")return 1.25;if(n==="light"&&t==="wall")return 1.95;switch(n){case"light":return Math.max(.5,e-.25);case"cover":return Math.min(2,e-.3);case"climate":return .6;case"media":return .9;case"binary":case"sensor":return 1.4;default:return 1.05}}var ie=n=>n.config?.unit_system?.temperature==="\xB0F"?"\xB0F":"\xB0C";function _r(n,e){let t=String(e??"").replace(/\s/g,"").toLowerCase();return t==="\xB0f"||t==="\u2109"?(n-32)*5/9:t==="k"?n-273.15:n}var ue=(n,e)=>ie(n)==="\xB0F"?e*9/5+32:e;var hh=new Set(["temperature","humidity","power","carbon_dioxide","energy","gas","water","volume","volume_storage","volume_flow_rate","illuminance","pressure","atmospheric_pressure","pm1","pm25","pm10","volatile_organic_compounds","volatile_organic_compounds_parts","carbon_monoxide","nitrogen_dioxide","moisture","sound_pressure"]),mh=new Set(["m\xB3","m3","L","l","kWh","Wh","MWh","lx"]),ph=new Set(["door","window","opening","garage_door","motion","occupancy","presence","smoke","moisture","gas","carbon_monoxide"]),fh=new Set(["battery","signal_strength","timestamp","date","duration","data_rate","data_size","frequency","enum"]);function rt(n,e){let t=n.entities?.[e];return t&&(t.area_id||(t.device_id?n.devices?.[t.device_id]?.area_id:null))||null}var Ma=(n,e)=>{let t=n.entities?.[e];return!!(t?.hidden||t?.entity_category)},gh=(n,e)=>P(e)??Dt(e,n.states[e]);function $a(n,e){let t=n.states[e];if(!t||Ma(n,e))return!1;if(Dt(e,t)!==null)return!0;let r=P(e);if(!r)return!1;let i=t.attributes.device_class;return e.startsWith("event.")?!i||i==="button"||i==="doorbell":r==="sensor"?i?hh.has(i):mh.has(String(t.attributes.unit_of_measurement??"")):r==="binary"?i?ph.has(i):!!n.entities?.[e]?.area_id:!0}function _h(n,e){let t=n.states[e];return P(e)!=="sensor"||!t?.attributes.unit_of_measurement||Ma(n,e)||fh.has(String(t.attributes.device_class??""))?!1:Number.isFinite(Number(t.state))||C(t)}var yr=(n,e)=>e.startsWith("sensor.")&&n.states[e]?.attributes.device_class==="power",ji=null;Ft(()=>ji=null);function qi(n,e){let t=n.get(e);return t||n.set(e,t=[]),t}function bh(n){let e=new Map,t=new Map,r=new Map,i=new Map,o=[],s=u=>{($a(n,u)||_h(n,u))&&wa(gh(n,u))&&o.push(u)};for(let[u,h]of Object.entries(n.entities??{})){let m=h.device_id;m&&h.area_id&&(i.get(m)??i.set(m,new Set).get(m)).add(h.area_id),m&&yr(n,u)&&qi(t,m).push(u),m&&!h.hidden&&!h.entity_category&&(r.get(m)??r.set(m,new Set).get(m)).add(Gi(u));let d=rt(n,u);d===null?s(u):$a(n,u)&&qi(e,d).push(u)}if(n.entities)for(let u of Object.keys(n.states))n.entities[u]||s(u);let a=Ui.indexOf("binary")-.5,l=u=>{let h=P(u),m=h?Ui.indexOf(h):a;return m>a&&Dt(u,n.states[u])!==null?a:m};o.sort((u,h)=>l(u)-l(h)||O(n,u).localeCompare(O(n,h)));for(let[u,h]of e){let m=n.areas?.[u]?.name;h.sort((d,g)=>l(d)-l(g)||O(n,d,m).localeCompare(O(n,g,m)))}let c=new Set;for(let[u,h]of i)h.size>1&&c.add(u);return{entities:n.entities,devices:n.devices,states:n.states,stateCount:Object.keys(n.states).length,byArea:e,powerByDevice:t,withoutArea:o,domainsByDevice:r,hubs:c}}function vr(n){let e=ji;return e&&e.entities===n.entities&&e.devices===n.devices&&(e.states===n.states||(e.states=n.states,Object.keys(n.states).length===e.stateCount))?e:ji=bh(n)}function j(n,e){let t=br(n,e.area_id);return e.sub_areas?.length?[...new Set([...t,...e.sub_areas.flatMap(r=>br(n,r))])]:t}function br(n,e){return!e||!n.entities?[]:vr(n).byArea.get(e)??[]}var Zi=(n,e)=>!!n.entities&&vr(n).hubs.has(e),wr=(n,e)=>n.entities?vr(n).powerByDevice.get(e)??[]:[];function Yi(n,e){let t=new Map;for(let i of e)qi(t,n.entities?.[i]?.device_id??`entity:${i}`).push(i);let r=new Map(e.map((i,o)=>[i,o]));return[...t.values()].map(i=>{let o=i.find(s=>!n.entities?.[s]?.name)??i[0];return{primary:o,others:i.filter(s=>s!==o)}}).sort((i,o)=>r.get(i.primary)-r.get(o.primary))}var yt=(n,e)=>Yi(n,e).map(t=>t.primary),yh={temperature:"temperature",humidity:"humidity",co2:"carbon_dioxide",illuminance:"illuminance"};function vh(n,e,t,r=!1){let i=n.states[e]?.attributes;if(!i)return!1;let o=(i.symcon_variable_type===1||i.symcon_variable_type===2)&&typeof i.symcon_id=="number";if(typeof i.symcon_id=="number"&&!o||!o&&!/^(sensor|input_number|number)\./.test(e))return!1;if(r&&o)return!0;let s=String(i.unit_of_measurement??"").replace(/\s/g,"").toLowerCase();return t==="temperature"&&["\xB0c","\xB0f","\u2103","\u2109","k"].includes(s)||t==="humidity"&&!i.device_class&&["%","%rh","%r.h.","%rf","%r.f."].includes(s)||t==="co2"&&s==="ppm"&&/co[₂2]/i.test(String(i.friendly_name??""))||t==="illuminance"&&["lx","lux"].includes(s)?!0:i.device_class===yh[t]}var wh=new Set(["climate","water_heater","switch","button","camera","media_player","vacuum","light","fan","lawn_mower"]),xh=["vorlauf","r(\xFC|ue)cklauf","flow","return","d(\xFC|ue)se","nozzle","hotend","extruder","druckbett","heatbed","(^|[^a-z])bed($|[^a-z])","chamber","cpu","gpu","chip","soc","akku","batter","wasser","water","kessel","boiler","au(\xDF|ss)en","outdoor","outside","abgas","exhaust","sole","brine","verdampfer","kondensat","verdichter","compressor","motor","k(\xFC|ue)hl","freezer","fridge","gefrier"],kh=new RegExp(`(${xh.join("|")})`,"i");function Sh(n,e){let t=n.entities?.[e]?.device_id,r=t&&!Zi(n,t)?vr(n).domainsByDevice.get(t):void 0;return r&&[...r].some(i=>wh.has(i))?!1:!kh.test(`${e} ${n.states[e]?.attributes.friendly_name??""}`)}function ye(n,e,t,r){let i=t.climate?.[r];if(i==="none")return[];if(i)return[i].flat().filter(c=>n.states[c]);let o=(e?.placements??[]).filter(c=>c.entity_id.startsWith("sensor.")),s=o.filter(c=>H([c.x,c.z],t.points)).map(c=>c.entity_id),a=new Set(o.filter(c=>!H([c.x,c.z],t.points)).map(c=>c.entity_id));return[...new Set([...j(n,t).filter(c=>!a.has(c)),...s])].filter(c=>c.startsWith("sensor.")&&vh(n,c,r)&&Sh(n,c))}function Y(n,e,t,r){let i=ye(n,e,t,r).map(a=>{let l=n.states[a];if(!l||C(l)||!l.state.trim()&&l.attributes.symcon_numeric_value===void 0)return NaN;let c=Number(l?.attributes.symcon_numeric_value??l?.state);return r==="temperature"?_r(c,n.states[a]?.attributes.unit_of_measurement):c}).filter(Number.isFinite);if(i.length)return i.reduce((a,l)=>a+l,0)/i.length;if(t.climate?.[r]||r!=="temperature"&&r!=="humidity"||t.climate?.[r]==="none")return null;let o=r==="temperature"?"current_temperature":"current_humidity",s=j(n,t).filter(a=>a.startsWith("climate.")).map(a=>n.states[a]?.attributes[o]).filter(a=>typeof a=="number"&&Number.isFinite(a));return s.length?s.reduce((a,l)=>a+l,0)/s.length:null}function Ji(n){let e=n.attributes;if(typeof e.symcon_numeric_value!="number")return null;let t=typeof e.symcon_min=="number"?e.symcon_min:0,r=typeof e.symcon_max=="number"&&e.symcon_max>t?e.symcon_max:100;return Math.max(0,Math.min(100,(e.symcon_numeric_value-t)/(r-t)*100))}function Aa(n,e){let t=n.attributes.symcon_id;if(e==="light"&&n.attributes.symcon_variable_type===0&&typeof t=="number"){let i=n.attributes.symcon_value;return{...n,entity_id:`light.${t}`,state:n.state==="unavailable"||n.state==="unknown"?n.state:(typeof i=="boolean"?i:n.state==="on")?"on":"off",attributes:{...n.attributes,color_mode:"onoff",supported_color_modes:["onoff"],...n.entity_id!==`light.${t}`?{symcon_source_entity:n.entity_id}:{}}}}let r=Ji(n);return r===null||typeof t!="number"?null:{...n,entity_id:`${e}.${t}`,state:e==="light"?r>0?"on":"off":r>0?"open":"closed",attributes:{...n.attributes,...e==="light"?{brightness:Math.round(r*2.55),color_mode:"brightness",supported_color_modes:["brightness"]}:{current_position:r,supported_features:4},...n.entity_id!==`${e}.${t}`?{symcon_source_entity:n.entity_id}:{}}}}function Ct(n,e){let t=e?n.states[e]:void 0;if(!t||C(t))return null;let r=t.attributes;if(r.nf_cover_control&&typeof r.current_position=="number")return r.current_position;let i=Ji(t);if(i!==null)return i;if(typeof r.current_position=="number")return Math.max(0,Math.min(100,r.current_position));if(!t.state.trim())return null;let o=Number(t.state);if(!Number.isFinite(o))return null;let s=r.unit_of_measurement==="%"||o>1||o<0?o:o*100;return Math.max(0,Math.min(100,s))}var $h=new Set([void 0,"shutter","blind","awning","shade","curtain","window"]),Mh=new Set(["garage","gate"]),Ah=new Set(["window","opening"]);function _n(n,e,t=!1){let r=new Map;return n.forEach((i,o)=>{let s=t&&e.length===1?e[0]:e[o];s&&r.set(i.id,s)}),r}var Ea=(n,e)=>n==="none"?null:n??e??null,it=n=>n&&n!=="none"?n:null;function Ve(n,e){let t=new Map;for(let r of e)for(let i of r.rooms){let o=r.openings.filter(_=>_.room_id===i.id).sort((_,b)=>_.edge-b.edge||_.offset-b.offset);if(o.length===0)continue;let s=j(n,i),a=_=>n.states[_]?.attributes.device_class,l=_=>s.filter(b=>P(b)==="binary"&&_(a(b)??"")),c=_=>o.filter(b=>b.type===_),u=_n(c("window"),s.filter(_=>P(_)==="cover"&&$h.has(a(_))),!0),h=_n(c("window"),l(_=>Ah.has(_))),m=_n(c("door"),l(_=>_==="door")),d=_n(c("garage"),s.filter(_=>P(_)==="cover"&&Mh.has(a(_)??""))),g=_n(c("garage"),l(_=>_==="garage_door"));for(let _ of o){let b=_.type==="window"?u:_.type==="garage"?d:null,y=_.type==="window"?h:_.type==="garage"?g:m,$=_.leaves===2;t.set(_.id,{cover:Ea(_.cover,b?.get(_.id)),contact:_.sensor==="handle"&&_.contact==null?null:Ea(_.contact,y.get(_.id)),tilt:_.tilt==="none"?null:_.tilt,contact2:$?it(_.contact2):null,tilt2:$?it(_.tilt2):null,position:it(_.position),positionInverted:!!_.position_inverted,tiltAngle:it(_.tilt_angle),tiltMax:_.tilt_max??null,tiltOffset:_.tilt_offset??null,tiltInvert:!!_.tilt_invert,shut:!!_.shut,angled:_.type==="door"&&!!_.open_angle,lock:_.type==="door"?it(_.lock):null,cover2:_.type==="garage"?null:it(_.cover2),coverTilt:it(_.cover_tilt),cover2Tilt:it(_.cover2_tilt),coverInverted:!!_.cover_inverted,coverTiltInverted:!!_.cover_tilt_inverted,cover2Inverted:!!_.cover2_inverted,cover2TiltInverted:!!_.cover2_tilt_inverted})}}return t}var Eh=[[/^(tilted|tilt|gekippt|kipp)/i,"tilted"],[/^(open|opened|offen|geöffnet|on)$/i,"open"],[/^(closed|close|geschlossen|zu|off)$/i,"closed"]];function Rh(n){if(!n||C(n))return null;let e=n.attributes.window_state;for(let t of[typeof e=="string"?e:"",n.state]){let r=t.trim(),i=r&&Eh.find(([o])=>o.test(r));if(i)return i[1]}return null}var zh=.5;function za(n,e){let t=Ct(n,e);return t===null?null:t/100}function Ta(n,e,t=!1){let r=e?n.states[e]:void 0;if(!r||C(r))return e?0:null;let i=r.attributes.current_position;if(typeof i=="number"){let o=1-Math.min(100,Math.max(0,i))/100;return t?1-o:o}return r.state==="closed"?t?0:1:r.state==="open"?t?1:0:r.state==="opening"||r.state==="closing"?.5:0}function Ra(n,e,t,r=!1){let i=n.states[e||""],o=!!i?.attributes.nf_cover_control,s=o?i.attributes:n.states[t||e||""]?.attributes,a=s?.current_tilt_position??(!o&&t?s?.current_position:void 0),l=typeof a=="number"?Math.min(100,Math.max(0,a)):t?Ct(n,t):null;return l===null?null:(r?100-l:l)/100}function Th(n,e){let t=za(n,e.position);if(t!==null){let i=e.positionInverted?t:1-t;return e.coverInverted?1-i:i}let r=e.cover?n.states[e.cover]:void 0;return r&&!C(r)?typeof r.attributes.current_position=="number"?Ta(n,e.cover,e.coverInverted):r.state==="closed"?e.coverInverted?0:1:r.state==="open"?e.coverInverted?1:0:r.state==="opening"||r.state==="closing"?.5:0:e.cover?0:null}function Qi(n,e){let t=e?n.states[e]?.state:void 0;return t==="unlocked"||t==="open"||t==="opening"}function Ke(n,e,t="window"){let r=g=>!!g&&n.states[g]?.state==="on",i=g=>!!g&&!!n.states[g]&&!C(n.states[g]),o=g=>g?Rh(n.states[g]):null,s=Th(n,e),a=Ra(n,e.cover,e.coverTilt,e.coverTiltInverted),l=Ra(n,e.cover2,e.cover2Tilt,e.cover2TiltInverted),c={...e.cover2?{cover2:Ta(n,e.cover2,e.cover2Inverted)}:{},...a!==null?{slats:a}:{},...l!==null?{slats2:l}:{}};if(t==="door"){let g=o(e.contact);return{open:g===null?e.shut?0:e.angled?1:zh:g==="closed"?0:1,open2:o(e.contact2)==="open"?1:0,tilt:0,tilt2:0,cover:s,...c,sensed:g!==null||s!==null,unlocked:Qi(n,e.lock),assumed:g===null}}if(t==="garage"){let g=s!==null||i(e.contact),_=za(n,e.position)!==null||i(e.cover),b=i(e.contact)?r(e.contact)?0:1:null;return{open:0,open2:0,tilt:0,tilt2:0,cover:(_?s:b??s)??1,sensed:g}}let u=r(e.tilt2)||o(e.tilt2)==="tilted"||o(e.contact2)==="tilted",h=r(e.tilt)||o(e.tilt)==="tilted"||o(e.contact)==="tilted",m=h?1:0,d=e.tiltAngle?Number(n.states[e.tiltAngle]?.state):NaN;if(Number.isFinite(d)){let g=(d-(e.tiltOffset??0))*(e.tiltInvert?-1:1);m=Math.min(1,Math.max(0,g/(e.tiltMax||15))),m<.08&&(m=0),h=m>0}return{open:o(e.contact)==="open"&&!h?1:0,open2:o(e.contact2)==="open"&&!u?1:0,tilt:m,tilt2:u?1:0,cover:s,sensed:i(e.contact)||i(e.tilt)||Number.isFinite(d),...c}}var Fa=/\b(tv|fernseh|television|fire ?tv|apple ?tv|chromecast|shield)/i,Da=/(kühl|fridge|gefrier|freezer)/i,Ha=/(spülmaschine|geschirrspül|dishwasher)/i,Fh=/(kochfeld|herd|induktion|cooktop)/i,Dh={robot_vacuum:/(saug|vacuum|robo|roomba|roborock|dreame|ecovacs|deebot)/i,tv_board:Fa,tv_wall:Fa,desk:/\b(pc|computer|rechner|desktop|monitor|workstation)/i,fridge:Da,fridge_smart:Da,stove:/(herd|kochfeld|cooktop|stove|induktion)/i,kitchen_tall:/(backofen|oven|ofen)/i,dishwasher:Ha,washer:/(waschmaschine|washer|washing)/i,dryer:/(trockner|dryer)/i,kitchen:/(kaffee|coffee|wasserkocher|kettle)/i,island:Fh,sink:Ha,radiator:/(heiz|radiator|thermostat|climate|hk|trv)/i},Pa={lamp_ceiling:/(decke|ceiling|haupt|main)/i,lamp_downlight:/(spot|strahler|downlight|einbau)/i,lamp_spot:/(spot|strahler)/i,lamp_panel:/(panel|decke|ceiling)/i,lamp_uplight:/(fluter|uplight|steh)/i,lamp_bollard:/(weg|garten|garden|path|poller|außen|aussen|outdoor)/i,lamp_garden:/(garten|garden|spot|außen|aussen|outdoor|baum|tree)/i,lamp_pendant:/(pendel|pendant|hänge|esstisch|dining)/i,ceiling_fan:/(ventilator|fan)/i,lamp_floor:/(steh|floor)/i,lamp_table:/(tisch|nacht|table|bedside|lese|reading)/i,lamp_wall:/(wand|wall)/i,led_strip:/(led|strip|streifen|leiste|band)/i},Ca=new Set(["tv_board","tv_wall"]);var Na=n=>Ca.has(n)||!!oa(n),Ia=n=>!!ee(n)?.electric&&/speaker|multiroom|soundbar/.test(n.split(":").pop()??n),xr=n=>Na(n)||n==="desk"||n==="fridge_smart",Nt=n=>!!n&&n!=="none";function Hh(n,e){if(yr(n,e))return e;let t=n.entities?.[e]?.device_id;return t?wr(n,t).find(r=>r!==e)??null:null}var Ph=(n,e,t)=>n.rooms.find(r=>r.points.length>=3&&H([e,t],r.points));function bn(n,e,t,r){return n.find(i=>e?.test(t(i)))??(r?n[0]??null:null)}function Ge(n,e){let t=new Map;for(let r of e){let i=new Set([...r.furniture.flatMap(o=>[o.entity,o.power,o.fan_entity]),...r.placements.map(o=>o.entity_id)].filter(Nt));for(let o of r.furniture){let s=o.type in Pa,a=sa(o.type),l=s?Pa[o.type]:Dh[o.type];if(!l&&!a&&!Ia(o.type)&&o.entity==null&&o.power==null)continue;let c=Ph(r,o.x,o.z),u=(c?yt(n,j(n,c)):[]).filter(b=>!i.has(b)),h=b=>`${b} ${O(n,b)}`,m=b=>u.filter(y=>P(y)===b),d=o.entity==="none"?null:o.entity??null;if(o.entity==null){if(o.type==="ceiling_fan"){let b=(c?j(n,c):[]).filter($=>!i.has($)),y=new Set(b.filter($=>P($)==="fan").map($=>n.entities?.[$]?.device_id).filter(Boolean));d=b.find($=>P($)==="light"&&y.has(n.entities?.[$]?.device_id))??bn(m("light"),l,h,!1)}else if(s)d=bn(m("light"),l,h,!0);else if(o.type==="robot_vacuum"){let b=c?.area_id??null;d=Object.keys(n.entities??{}).find(y=>y.startsWith("vacuum.")&&!i.has(y)&&rt(n,y)===b)??null}else if(o.type==="radiator"||a)d=bn(m("climate"),l,h,!0);else if(Na(o.type)){let b=m("media");d=b.find(y=>n.states[y]?.attributes.device_class==="tv")??bn(b,l,h,Ca.has(o.type))}else if(Ia(o.type)){let b=m("media").filter(y=>n.states[y]?.attributes.device_class!=="tv");d=bn(b,l,h,!1)??(b.length===1?b[0]:null)}else l&&(d=u.find(b=>["switch","media","fan"].includes(P(b)??"")&&l.test(h(b)))??null);d&&i.add(d)}let g=o.power==="none"?null:o.power??null;o.power==null&&(g=d?Hh(n,d):null,!g&&l&&c&&!s&&(g=j(n,c).find(b=>yr(n,b)&&!i.has(b)&&l.test(h(b)))??null),g&&i.add(g));let _=null;if(o.type==="ceiling_fan"&&(_=o.fan_entity==="none"?null:o.fan_entity??null,o.fan_entity==null)){let b=(c?j(n,c):[]).filter($=>P($)==="fan"&&!i.has($)),y=d?n.entities?.[d]?.device_id:void 0;_=(y?b.find($=>n.entities?.[$]?.device_id===y):void 0)??b[0]??null,_&&i.add(_)}(d||g||_)&&t.set(o.id,{entity:d,power:g,...o.type==="ceiling_fan"?{fan:_}:{}})}}return t}function vt(n,e){let t=new Set,r=Ge(n,e),i=e.some(o=>o.openings.some(s=>s.confirm))?Ve(n,e):null;for(let o of e){for(let s of o.placements)s.confirm&&t.add(s.entity_id);for(let s of o.openings){let a=s.confirm?i?.get(s.id)?.cover:null;Nt(a)&&t.add(a)}for(let s of o.furniture){let a=s.confirm?r.get(s.id)?.entity:null;Nt(a)&&t.add(a)}}return t}var Xi=n=>n==="fridge"||n==="fridge_smart"||/(fridge|freezer|kuehl|gefrier|chest_freezer)/.test(n.slice(n.lastIndexOf(":")+1)),Ih=8,Ch=-12;function La(n,e,t){let r=a=>{if(!Nt(a))return null;let l=n.states[a],c=l?Number(l.state):NaN;return Number.isFinite(c)?l.attributes.unit_of_measurement==="\xB0F"?(c-32)*5/9:c:null},i=r(e.temp_entity),o=r(e.temp_entity2);return i===null&&o===null?null:{text:[i,o].filter(a=>a!==null).map(t).join(" \xB7 "),warm:i!==null&&i>Ih||o!==null&&o>Ch}}var Oa=60;function Wa(n,e){if(!Nt(e))return null;let t=n.states[e],r=t?Number(t.state):NaN;return Number.isFinite(r)?t.attributes.unit_of_measurement==="\xB0F"?(r-32)*5/9:r:null}function Ba(n,e){let t=i=>Nt(i)&&["on","open"].includes(n.states[i]?.state??""),r=new Map;for(let i of e.flatMap(o=>o.furniture))i.type==="fridge_smart"&&r.set(i.id,{left:t(i.door_left),right:t(i.door_right)});return r}function Va(n,e,t){let r=(u,h)=>H([u,h],t.points),i=Ge(n,[e]),o=Ve(n,[e]),s=new Set(t.hidden??[]),a=[...e.placements.filter(u=>!u.outside&&r(u.x,u.z)).map(u=>u.entity_id),...e.furniture.filter(u=>r(u.x,u.z)).flatMap(u=>[i.get(u.id)?.entity,i.get(u.id)?.power]),...e.openings.filter(u=>u.room_id===t.id).flatMap(u=>{let h=o.get(u.id);return h?[h.cover,h.cover2,h.contact,h.tilt,h.contact2]:[]}),...t.panel??[]],l=[...new Set(a.filter(u=>!!u&&!!n.states[u]))].filter(u=>!s.has(u)),c=new Set(l);return{shown:l,more:j(n,t).filter(u=>!c.has(u)&&!s.has(u))}}function yn(n,e,t=[]){let r=[];for(let i of e){let o=(a,l)=>i.rooms.some(c=>c.points.length>=3&&H([a,l],c.points)),s=Ge(n,[i]);r.push(...i.placements.filter(a=>a.outside||!o(a.x,a.z)).map(a=>a.entity_id)),r.push(...i.furniture.filter(a=>!o(a.x,a.z)).flatMap(a=>[s.get(a.id)?.entity,s.get(a.id)?.power]));for(let a of i.outdoor??[])a.area_id&&r.push(...yt(n,br(n,a.area_id))),r.push(a.pump_entity,a.temp_entity)}return[...new Set(r.filter(i=>!!i&&!!n.states[i]&&!t.includes(i)))]}var Nh={soc:/(^|_)(soc|state_of_charge|battery_level|battery|ladestand|ladezustand|akku)($|_)/,range:/(^|_)(range|reichweite|remaining_range)($|_)/,charging:/(charging|charge_power|ladeleistung|laden|charger_power|lade)/,plugged:/(plug|cable|connected|stecker|kabel|angeschlossen)/,lock:/(lock|verriegel|schloss)/,climate:/(climat|preheat|precondition|hvac|heiz|klima|standheizung)/,tracker:/./},Lh=/^k?W$/,Ue=n=>n&&n!=="none"?n:null;function Oh(n,e){let t=e.car??{},r=Ue(t.device)??Ue(e.entity),i=r?n.entities?.[r]?.device_id:null,o=i&&n.entities?Object.values(n.entities).filter(m=>m.device_id===i).map(m=>m.entity_id):[],s=(m,d)=>String(n.states[m]?.attributes[d]??""),a=m=>`${m} ${s(m,"friendly_name")} ${n.entities?.[m]?.translation_key??""}`.toLowerCase().replace(/[\s-]+/g,"_"),l=(m,d,g=()=>!0)=>o.find(_=>d.includes(_.split(".")[0])&&Nh[m].test(a(_))&&g(_))??null,c=(m,d)=>o.find(g=>g.startsWith(`${m}.`)&&s(g,"device_class")===d)??null,u=m=>o.find(d=>d.startsWith(`${m}.`))??null,h=m=>s(m,"unit_of_measurement");return{soc:Ue(t.soc)??c("sensor","battery")??l("soc",["sensor"],m=>h(m)==="%"),range:Ue(t.range)??l("range",["sensor"],m=>/km|mi/.test(h(m)))??l("range",["sensor"]),charging:Ue(t.charging)??l("charging",["sensor"],m=>Lh.test(h(m)))??l("charging",["binary_sensor","switch"]),plugged:Ue(t.plugged)??c("binary_sensor","plug")??l("plugged",["binary_sensor"]),lock:Ue(t.lock)??u("lock")??l("lock",["binary_sensor"]),climate:Ue(t.climate)??u("climate")??l("climate",["switch","binary_sensor"]),tracker:Ue(t.tracker)??u("device_tracker")}}function Ka(n,e){return e.flatMap(r=>r.furniture).filter(r=>r.type==="parking"&&r.car).flatMap(r=>Object.values(Oh(n,r))).filter(r=>!!r)}var Ga=/(^|_)(current_room|current_segment|aktueller_raum|current_area)($|_)/;function kr(n,e,t){if(t==="none")return null;if(t)return t;let r=e?n.entities?.[e]?.device_id:null;return!r||!n.entities?null:Object.values(n.entities).find(o=>o.device_id===r&&o.entity_id.startsWith("sensor.")&&(Ga.test(o.translation_key??"")||Ga.test(o.entity_id.split(".")[1])))?.entity_id??null}function Ua(n){return n.toLowerCase().replace(/ä/g,"a").replace(/ö/g,"o").replace(/ü/g,"u").replace(/ß/g,"ss").replace(/ae/g,"a").replace(/oe/g,"o").replace(/ue/g,"u").normalize("NFD").replace(/[^a-z0-9]/g,"")}function eo(n,e,t,r){let i=r?n.states[r]?.state:t?n.states[t]?.attributes.current_room:void 0;if(typeof i!="string"||["","unknown","unavailable"].includes(i))return null;let o=Ua(i);if(!o)return null;let s=l=>[l.name,l.area_id??"",l.area_id&&n.areas?.[l.area_id]?.name||""].map(Ua).filter(Boolean);return e.find(l=>s(l).includes(o))??e.find(l=>s(l).some(c=>c.length>=3&&(c.includes(o)||o.includes(c))))??null}var Wh=new Set(["garage","gate","door"]);function to(n,e){let t=new Set,r=new Set,i=o=>{if(!o||o==="none"||!n.states[o])return;let s=P(o);s==="light"&&t.add(o),s==="cover"&&!Wh.has(String(n.states[o].attributes.device_class??""))&&r.add(o)};for(let o of e.rooms){let s=new Set(o.hidden??[]);yt(n,j(n,o)).filter(a=>!s.has(a)).forEach(i)}return e.placements.forEach(o=>i(o.entity_id)),e.furniture.forEach(o=>i(o.entity)),{lights:[...t],covers:[...r]}}function ja(n){let e=n.split(".")[0];switch(e){case"scene":case"script":return[e,"turn_on"];case"automation":return[e,"trigger"];case"button":case"input_button":return[e,"press"];default:return["homeassistant","toggle"]}}function no(n,e,t){let r=t.target?.trim()??"",i=(o,s)=>e.dispatchEvent(new CustomEvent(o,{detail:s,bubbles:!0,composed:!0}));switch(t.action){case"navigate":if(!r)return;history.pushState(null,"",r),window.dispatchEvent(new CustomEvent("location-changed",{detail:{replace:!1}}));return;case"more_info":r&&i("hass-more-info",{entityId:r});return;case"service":{if(!r.includes("."))return;let[o,s]=r.split(".",2);n.callService(o,s,t.data??{});return}case"fire_dom_event":i("ll-custom",t.data??{});return}}function qa(n,e){let t=e.data?.entity_id,r=e.state_entity||(e.action==="more_info"?e.target:null)||(e.action==="service"&&typeof t=="string"?t:null),i=r?n?.states[r]:void 0;return!!i&&["on","open","playing","home","heat","cool","unlocked"].includes(i.state)}var Bh=[.25,.9,.45],Vh=[1,.82,.55];function Kh(n,e){let t=n.states[e],r=Number(t?.attributes.current_power_w??t?.attributes.power??NaN);return Number.isFinite(r)?r:null}function Za(n,e,t){let r=[];return e.forEach((i,o)=>{if(!i||i==="none")return;let s=n.states[i];if(!s||C(s))return;if(P(i)==="light"){let c=Be(s);c&&r.push({gang:o,color:c.color,level:c.level});return}if(!ne(s)&&s.state!=="on")return;let a=t?Kh(n,i):null,l=a===null?.8:Math.min(1,.45+Math.sqrt(Math.max(0,a))/40);r.push({gang:o,color:t?Bh:Vh,level:l})}),r}var ro=(n,e)=>(n??[]).slice(0,e).filter(t=>!!t&&t!=="none");var Gh=864e5,io=n=>{let e=new Date(n);return e.setHours(0,0,0,0),e.getTime()};function Uh(n,e){let t=/(\d{4})-(\d{2})-(\d{2})/.exec(n);if(t)return new Date(Number(t[1]),Number(t[2])-1,Number(t[3])).getTime();if(t=/(\d{1,2})\.(\d{1,2})\.(\d{4}|\d{2})?/.exec(n),t){let r=t[3]?t[3].length===2?2e3+Number(t[3]):Number(t[3]):new Date(e).getFullYear(),i=new Date(r,Number(t[2])-1,Number(t[1])).getTime();return!t[3]&&it)return Math.ceil((c-t)/6e4);continue}let s=/^(\d+):(\d{2})(?::(\d{2}))?$/.exec(i.state.trim());if(s){let c=s[3]!==void 0?Number(s[1])*60+Number(s[2])+Number(s[3])/60:Number(s[1])*60+Number(s[2]);if(c>0)return Math.ceil(c);continue}let a=Number(i.state);if(!Number.isFinite(a)||a<=0)continue;let l=String(o.unit_of_measurement??"min").toLowerCase();return Math.ceil(l==="h"?a*60:l==="s"?a/60:a)}return null}function vn(n,e){let t=e?n.entities?.[e]?.device_id:null;return t&&n.entities?Object.values(n.entities).filter(r=>r.device_id===t).map(r=>r.entity_id):[]}var Qa=n=>n<60?`${n} min`:`${Math.floor(n/60)} h ${String(n%60).padStart(2,"0")} min`;function $r(n,e,t){for(let r of e)for(let i of r.placements)if(i.entity_id===t&&i.cover_tilt&&i.cover_tilt!=="none")return i.cover_tilt;for(let r of Ve(n,e).values()){if(r.cover===t&&r.coverTilt)return r.coverTilt;if(r.cover2===t&&r.cover2Tilt)return r.cover2Tilt}return null}function Mr(n,e,t){if(e.attributes.nf_cover_control||!t)return e;let r=n.states[t]?.attributes,i=r?.current_tilt_position??r?.current_position;return typeof i!="number"?e:{...e,attributes:{...e.attributes,current_tilt_position:i,supported_features:Number(e.attributes.supported_features??0)|128}}}function qh(n,e){let t=e?n.states[e]:void 0;if(!t||C(t))return null;let r=t.attributes.current_position;return typeof r=="number"?Math.min(100,Math.max(0,r)):t.state==="open"?100:t.state==="closed"?0:t.state==="opening"||t.state==="closing"?50:null}function Xa(n,e){let t=new Map;for(let r of e.floors.flatMap(i=>i.furniture)){let i=ee(r.type);if(!i||!sr(i))continue;let o=r.cover_entity?qh(n,r.cover_entity):null;t.set(r.id,ia(i,o!==null&&r.cover_inverted?100-o:o))}return t}var Zh={view:"3D",editor:"Editor",all_floors:"Alle Etagen",outside_area:"Au\xDFen",outside_area_hint:"Alle Ger\xE4te drau\xDFen auf einen Blick: im Garten, au\xDFerhalb der R\xE4ume, und was zu Au\xDFen geh\xF6rt (etwa die Wetterstation auf dem Dach).",device_outside:"Geh\xF6rt zu Au\xDFen",device_outside_hint:"Das Ger\xE4t z\xE4hlt nicht zum Raum darunter (eine Wetterstation auf dem Dach) und steht im Au\xDFen-Panel.",no_building:"Noch kein Grundriss vorhanden.",no_building_admin:"Noch kein Grundriss vorhanden. Im Editor zeichnest du deine erste Etage.",no_rooms_admin:"Die Etagen sind angelegt, aber es gibt noch keinen Raum. W\xE4nde allein reichen nicht: Zeichne im Editor mit \u201ERechteck\u201C oder \u201EFreie Form\u201C mindestens einen Raum.",open_editor:"Editor \xF6ffnen",loading:"L\xE4dt \u2026",load_error:"Laden fehlgeschlagen",saving:"Speichert \u2026",saved:"Gespeichert",save_error:"Speichern fehlgeschlagen",save_failed_detail:"Speichern fehlgeschlagen: {error}. Deine \xC4nderungen bleiben in diesem Browser erhalten.",needs_restart:"Eine neue Version von NextFloor ({frontend}) ist installiert, aber Home Assistant l\xE4uft noch mit {version}. Bitte Home Assistant neu starten \u2013 bis dahin kann das Speichern fehlschlagen.",needs_reload:"Diese Seite zeigt noch NextFloor {frontend}, Home Assistant hat schon {backend}. Bitte die Seite neu laden; in der Companion-App: Einstellungen \u2192 Companion-App \u2192 Frontend-Cache zur\xFCcksetzen.",reload_page:"Neu laden",symcon_variables_reload:"Variablen neu laden",symcon_cover_position:"Position (Behang)",climate_card:"Raumklima als schwebende Karte",climate_card_hint:"Zeigt Temperatur, Luftfeuchtigkeit und CO\u2082 \xFCber diesem Raum. In der 3D-Ansicht lassen sie sich \xFCber \u201EKarten\u201C ein- und ausblenden.",climate_card_missing:"Keine aktuellen Messwerte",furniture_power_card:"Leistung als 3D-Kachel",furniture_power_card_hint:"Zeigt den Leistungswert \xFCber diesem M\xF6belst\xFCck, auch ohne verkn\xFCpfte Schaltvariable. Die Kachel bleibt bei 0 W sichtbar. Bei archivierten Variablen \xF6ffnet das Trendsymbol den Verlauf. Der Schalter \u201EKarten\u201C blendet die schwebenden Kacheln gemeinsam ein und aus.",climate_illuminance:"Helligkeit",device_values:"Zus\xE4tzliche Werte",device_value:"Datenpunkt",device_value_add:"Wert hinzuf\xFCgen",device_value_remove:"Wert entfernen",device_value_icon:"Symbol",device_value_label:"Bezeichnung (optional)",device_values_hint:"\xDCber + weitere Datenpunkte ausw\xE4hlen, zum Beispiel mehrere Temperaturen oder andere Messwerte. Als Symbol eignen sich Emojis oder kurze Zeichen wie \u{1F321}, \u{1F4A7}, \u2601 oder \u26A1. Die Werte erscheinen am Ger\xE4t und im Raumfenster.",cover_tilt_entity:"Lamellenposition",cover_direction_invert:"Behang in 3D umkehren",cover_tilt_direction_invert:"Lamellen in 3D umkehren",cover2_direction_invert:"Zweiten Behang in 3D umkehren",cover2_tilt_direction_invert:"Lamellen des zweiten Behangs in 3D umkehren",cover_direction_hint:"Die Umkehrung betrifft nur die 3D-Darstellung. Zahlenwerte, Regler und Steuerbefehle bleiben unver\xE4ndert: Ein empfangener Wert von 0 wird weiterhin als 0 angezeigt und ein eingestellter Wert von 0 als 0 gesendet.",cover2_tilt_entity:"Lamellenposition (zweiter Behang)",symcon_variables_loading:"Variablen werden geladen \u2026",symcon_variables_loaded:"Variablen und Objektbaum wurden neu geladen.",symcon_variables_error:"Variablen konnten nicht neu geladen werden: {error}",needs_restart_old:"Eine neue Version von NextFloor ist installiert, aber Home Assistant l\xE4uft noch mit einer \xE4lteren. Bitte Home Assistant neu starten \u2013 bis dahin schl\xE4gt das Speichern fehl.",draft_found:"Nicht gespeicherte \xC4nderungen vom {time} gefunden.",draft_restore:"\xDCbernehmen und speichern",draft_discard:"Verwerfen",walls_auto:"W\xE4nde hoch",walls_cut:"Schnitt",walls_slope:"Schr\xE4g",walls_slope_hint:"W\xE4nde schr\xE4g abgeschnitten: vorne halbhoch, hinten voll \u2013 wie ein Puppenhaus, dreht mit der Kamera",walls_solid:"Massiv",walls_solid_hint:"Massive W\xE4nde in ihren Farben statt Glas (Farben: Editor \u2192 Einstellungen, pro Raum im Raum)",wall_paint_outside:"Wandfarbe au\xDFen",wall_paint_inside:"Wandfarbe innen",furn_color_body:"M\xF6belfarbe Korpus",furn_color_wood:"M\xF6belfarbe Holz",furn_color_fabric:"M\xF6belfarbe Stoff",furn_color_white:"M\xF6belfarbe Wei\xDF",furn_color_metal:"M\xF6belfarbe Metall",furn_color_dark:"M\xF6belfarbe Dunkel",furn_color_hint:"Die M\xF6bel sind aus wenigen Materialien gebaut, auch die aus dem M\xF6belbauer und den Paketen. Hier bekommt jedes Material eine Farbe f\xFCr das ganze Haus; eine Karte kann eigene Farben setzen. Am st\xE4rksten sieht man sie im Look Neon, Tag und Blaupause f\xE4rben sie nur leicht.",wall_paint_room:"Wandfarbe innen (dieser Raum)",wall_paint_floor:"Wandfarbe au\xDFen (diese Etage)",wall_paint_hint:"Gilt in der 3D-Ansicht \u201EMassiv\u201C.",wall_paint_default:"Standard",card_solid_walls:"Massive W\xE4nde (in ihren Farben)",reset_view:"\xDCbersicht",back:"Zur\xFCck",floor:"Etage",floors:"Etagen",add_floor:"Etage hinzuf\xFCgen",floor_from_ha:"Etagen aus Home Assistant:",floor_empty:"Leere Etage",level:"Ebene {n}",ha_floor:"Etage in Home Assistant",floor_layer:"Ebene (ein- und ausblendbar)",floor_power:"Etagen-Z\xE4hler (Leistung)",floor_power_hint:"Ein Leistungssensor nur f\xFCr diese Etage (ein Unterz\xE4hler, eine Wohnung). Sein Wert steht auf dem Etagen-Schild und in der Ansicht dieser Etage auf der Haus-Karte, mit seinem Anteil am Verbrauch des Hauses.",floor_power_share:"{n} % vom Haus",living_area:"Wohnfl\xE4che {living}",room_living:"Z\xE4hlt zur Wohnfl\xE4che",living_area_none:"Keine Wohnfl\xE4che \xB7 Grundfl\xE4che {floor}",living_area_low:"Wohnfl\xE4che {living} (Grundfl\xE4che {floor}, davon {low} unter 2 m H\xF6he)",living_area_hint:"Gerechnet wie die Wohnfl\xE4chenverordnung: die Fl\xE4che innerhalb der W\xE4nde, voll ab 2 m lichter H\xF6he, zur H\xE4lfte zwischen 1 und 2 m (unter Schr\xE4gen), unter 1 m gar nicht. Ein Richtwert, kein Aufma\xDF.",living_area_floor:"Wohnfl\xE4che: {floor}",living_area_floor_house:"Wohnfl\xE4che dieser Etage: {floor} \xB7 ganzes Haus: {house}",print_plan:"Plan drucken / PDF",print_plan_hint:"Jede Etage als sauberer Plan mit Ma\xDFen und Fl\xE4chen, dazu eine Fl\xE4chentabelle \u2013 zum Drucken oder im Druckdialog als PDF speichern.",print_title:"Grundriss",print_room:"Raum",print_floor_area:"Grundfl\xE4che",print_living:"Wohnfl\xE4che",print_low:"unter 2 m",print_total:"Summe",print_blocked:"Das Druckfenster wurde blockiert \u2013 bitte Pop-ups f\xFCr Home Assistant erlauben.",check_open:"Plan pr\xFCfen",note:"Notiz",note_add:"Notiz hier",note_text:"Text",note_placeholder:"z. B. \u201EFilter wechseln\u201C oder \u201ESicherung 12\u201C",note_due:"F\xE4llig am",note_height:"H\xF6he \xFCber dem Boden (m)",note_height_hint:"Wo der Pin in der 3D-Ansicht schwebt: 1,3 m ist Augenh\xF6he, mehr f\xFCr etwas unter der Decke (ein Absperrventil, eine Klappe).",note_photo_upload:"Foto hinzuf\xFCgen",note_photo_hint:"Das Foto erscheint, wenn man die Notiz in der 3D-Ansicht antippt, z. B. wie das Ventil aussieht.",note_due_hint:"Ab diesem Tag wird der Pin orange.",note_is_due:"Diese Notiz ist f\xE4llig.",keys_title:"Tasten im Editor",keys_undo:"R\xFCckg\xE4ngig",keys_redo:"Wiederholen",keys_duplicate:"Raum verdoppeln",keys_delete:"Auswahl l\xF6schen",keys_nudge:"Auswahl um einen Rasterschritt verschieben",keys_nudge_10:"\u2026 um 10 cm",keys_nudge_1:"\u2026 um 1 cm",keys_rotate:"M\xF6bel um 90\xB0 drehen (Shift: zur\xFCck)",keys_lock:"M\xF6bel, Ger\xE4t oder Dachteil festsetzen / l\xF6sen",keys_close_shape:"Freie Form schlie\xDFen",keys_escape:"Abbrechen, Werkzeug verlassen, Auswahl aufheben",keys_straight:"Beim Zeichnen: gerade Linien",keys_sheet:"Diese \xDCbersicht",tour_title:"Erste Schritte",tour_1_title:"R\xE4ume zeichnen",tour_1:"Mit \u201E{rect}\u201C oder \u201E{free}\u201C zeichnest du die R\xE4ume; die W\xE4nde entstehen von selbst. Ordne jedem Raum seinen Home-Assistant-Bereich zu \u2013 dann findet NextFloor seine Ger\xE4te. Hast du schon Bereiche, legt \u201E{rooms}\u201C im Etagenformular sie auf einmal an.",tour_2_title:"T\xFCren und Fenster",tour_2:"\u201E{opening}\u201C setzt sie auf eine Wand. Verkn\xFCpfe ihren Kontakt oder Rollladen \u2013 in 3D gehen sie dann mit auf und zu, und offene Fenster melden sich.",tour_3_title:"M\xF6bel und Ger\xE4te",tour_3:"\u201E{furniture}\u201C \xF6ffnet die Bibliothek \u2013 oder baue eigene St\xFCcke in der \u{1F6E0}\uFE0F M\xF6bel-Werkstatt. W\xE4hlst du einen Raum, stehen darunter die Ger\xE4te seines Bereichs zum Platzieren bereit; Lampen leuchten dann in der Farbe ihres Lichts.",tour_4_title:"Ansehen und pr\xFCfen",tour_4:"\u201E{split}\u201C zeigt dein Haus beim Zeichnen; oben wechselst du in die 3D-Ansicht. \u201E{check}\u201C listet, was noch fehlt \u2013 und mit ? siehst du jederzeit die Tasten.",tour_next:"Weiter",tour_back:"Zur\xFCck",tour_done:"Los geht's",tour_skip:"\xDCberspringen",check_open_hint:"Listet, was im Plan fehlt oder schief ist, mit einer L\xF6sung per Tipp.",check_title:"Plan-Pr\xFCfung",check_all_good:"Alles in Ordnung \u2013 nichts gefunden.",check_hint:"{n} Punkte gefunden. Blaue Kn\xF6pfe \xE4ndern den Plan (R\xFCckg\xE4ngig geht wie immer), die anderen zeigen die Stelle.",check_room_no_area:"\u201E{room}\u201C hat keinen Home-Assistant-Bereich: seine Ger\xE4te werden nicht gefunden.",check_room_no_area_named:"\u201E{room}\u201C hat keinen Bereich \u2013 der freie Bereich \u201E{area}\u201C hei\xDFt genauso.",check_areas_unplaced:"{n} Bereiche dieser Etage haben noch keinen Raum: {names}",check_devices_unplaced:"\u201E{room}\u201C: {n} Ger\xE4te des Bereichs stehen noch nicht im Plan.",check_rooms_overlap:"\u201E{a}\u201C und \u201E{b}\u201C liegen \xFCbereinander.",check_opening_off_wall:"Eine T\xFCr oder ein Fenster in \u201E{room}\u201C sitzt auf keiner Wand.",check_entity_missing:"{n} Ger\xE4te-Pins zeigen auf Entit\xE4ten, die Home Assistant nicht mehr kennt ({ids}).",check_furniture_entity_missing:"Ein M\xF6bel ist mit {id} verkn\xFCpft \u2013 die Entit\xE4t gibt es nicht mehr.",check_battery_low:"Batterie schwach: {name} ({level} %)",battery_low_n:"Batterie schwach: {names}",check_standby:"{name} zieht {w} W, obwohl aus \u2013 etwa {cost} im Jahr.",check_fix_show:"Zeigen",check_fix_ignore:"Ignorieren",check_show_devices:"{n} Ger\xE4te ansehen",check_ignore_all:"Alle {n} ignorieren",check_reset_ignored:"{n} ignorierte Ger\xE4te wieder pr\xFCfen",check_fix_set_area:"\u201E{area}\u201C zuordnen",check_fix_add_rooms:"R\xE4ume anlegen",check_fix_place:"{n} setzen",check_fix_remove:"{n} entfernen",floor_layer_hint:"Diese Etage ist kein Geschoss, sondern eine Ebene \u2013 z. B. alle B\xE4ume oder die Deko. Die 3D-Ansicht zeigt oben ein Auge, mit dem du sie auf jedem Ger\xE4t ein- und ausblendest.",no_ha_floor:"\u2013 keine \u2013",area_rooms:"R\xE4ume aus HA-Bereichen anlegen ({n})",area_rooms_hint:"Legt f\xFCr jeden Bereich dieser Etage einen Raum an (4 \xD7 3 m) \u2013 danach an die richtige Stelle ziehen und die Ecken anpassen",floor_name:"Name",elevation:"H\xF6he \xFCber Boden (m)",floor_shift:"Etage verschieben (m)",floor_shift_apply:"Verschieben",floor_shift_hint:"Verschiebt alle R\xE4ume, M\xF6bel, Ger\xE4te, Au\xDFenfl\xE4chen, freien W\xE4nde und das Hintergrundbild dieser Etage um X und Z. Dachfl\xE4chen bleiben liegen.",height:"Raumh\xF6he (m)",cut_height:"Schnitth\xF6he (m)",delete_floor:"Etage l\xF6schen",floor_copy:"Etage duplizieren",floor_copy_hint:"Die Kopie kommt oben aufs Haus, mit allen R\xE4umen, W\xE4nden, T\xFCren und Fenstern. R\xE4ume und Etage verlieren ihre Verkn\xFCpfung mit Home Assistant, M\xF6bel ihre Entit\xE4ten; Energieger\xE4te bleiben auf der alten Etage.",floor_copy_furniture:"M\xF6bel mitnehmen",floor_copy_devices:"Ger\xE4te-Pins mitnehmen",floor_copy_devices_hint:"Dieselbe Entit\xE4t steht dann auf beiden Etagen.",floor_copy_outdoor:"Au\xDFenfl\xE4chen mitnehmen",floor_copy_make:"Kopie anlegen",floor_copy_name:"{name} (Kopie)",furn_to_floor:"Auf Etage verschieben",furn_to_floor_hint:"Das M\xF6bel wandert an dieselbe Stelle auf der gew\xE4hlten Etage.",delete_floor_confirm:"Etage \u201E{name}\u201C mit allen R\xE4umen l\xF6schen?",move_up:"Nach oben",move_down:"Nach unten",default_floor:"Erdgeschoss",new_floor:"Etage {n}",tool_select:"Ausw\xE4hlen",tool_rect:"Rechteck",tool_polygon:"Freie Form",undo:"R\xFCckg\xE4ngig",redo:"Wiederholen",fit:"Alles zeigen",room:"Raum",rooms:"R\xE4ume",room_name:"Name",area:"Bereich",no_area:"Kein Bereich",sub_area_add:"+ Bereich im Raum",sub_area_hint:"Ein Teil des Raums mit eigenem Home-Assistant-Bereich, aber ohne eigene W\xE4nde \u2013 eine Leseecke, ein Regal, eine K\xFCchenzeile im Wohnraum. Seine Ger\xE4te und Sensoren geh\xF6ren zu diesem Raum.",material:"Boden",x:"X (m)",z:"Y (m)",width:"Breite (m)",depth:"Tiefe (m)",points:"Eckpunkte",delete_point:"Punkt l\xF6schen",duplicate:"Duplizieren",delete:"L\xF6schen",new_room:"Raum {n}",settings:"Einstellungen",pendant_shape:"Form",pendant_shade:"Schirm",paint_colour:"Lackfarbe",pendant_globe:"Kugel",pendant_cone:"Kegel",pendant_drum:"Trommel",sofa_shape:"Form",sofa_straight:"Gerade",sofa_l:"L-Form (Spiegeln: andere Seite)",sofa_u:"U-Form",pkg_open:"Einrichten \u2026",pkg_hint:"Die M\xF6bel kommen an die W\xE4nde des Raums; Leuchten verbinden sich mit den Lichtern des Bereichs. Danach einzeln anpassen \u2013 Strg+Z nimmt alles zur\xFCck.",pkg_done:"{n} M\xF6bel gesetzt \u2013 Strg+Z nimmt es zur\xFCck.",pkg_kitchen_row:"K\xFCchenzeile",pkg_kitchen_row_desc:"Zeile an der R\xFCckwand mit K\xFChlschrank, Backofen, Sp\xFCle, Sp\xFClmaschine und Herd, Oberschrank, Esstisch mit Pendelleuchte",pkg_kitchen_l:"K\xFCche in L-Form",pkg_kitchen_l_desc:"Zeile hinten und links, Kochinsel mit Barhockern",pkg_bath:"Bad",pkg_bath_desc:"Waschtisch, WC, Badewanne, Waschmaschine, Einbauspot",pkg_bedroom:"Schlafzimmer",pkg_bedroom_desc:"Doppelbett mit zwei Nachttischen, Schrank, Kommode, Deckenleuchte",pkg_living:"Wohnzimmer",pkg_living_desc:"TV-Board, Sofa, Couchtisch, Teppich, Sessel, Regal, Stehlampe, Pflanze",pkg_dining:"Esszimmer",pkg_dining_desc:"Esstisch mit vier St\xFChlen, Sideboard, Pendelleuchte",pkg_office:"B\xFCro",pkg_office_desc:"Schreibtisch mit B\xFCrostuhl, zwei Regale, Deckenleuchte",pkg_kids:"Kinderzimmer",pkg_kids_desc:"Einzelbett, Schreibtisch, Regal, Teppich",pkg_hall:"Flur",pkg_hall_desc:"Garderobe, zwei Einbauspots",spots_place:"Spots setzen",spots_type:"Leuchte",spots_cols:"Spalten (links\u2013rechts)",spots_rows:"Reihen (vorne\u2013hinten)",spots_add:"{n} Leuchten setzen",spots_placed:"{n} Leuchten gesetzt.",spots_hint:"Alle Leuchten folgen dem gew\xE4hlten Licht (z. B. Spots an einem Dimmer). Einzeln verschieben und ein anderes Licht w\xE4hlen geht danach wie bei jedem M\xF6bel.",cancel:"Abbrechen",backup:"Sicherung",backup_history:"Wiederherstellungspunkte",share_view:"Ansicht teilen",share_view_hint:"Speichert das Haus als kleine Datei, die in jedem Browser ohne Home Assistant aufgeht (\xFCber die Online-Demo von NextFloor) \u2013 zum Zeigen f\xFCr Familie oder Planer. Ohne Ger\xE4te und Entit\xE4ten, wie eine Vorlage.",share_view_title:"Unser Haus in NextFloor",share_view_needs_js:"Diese Seite braucht JavaScript und eine Internetverbindung.",share_view_file:"ansicht",share_view_done:"Ansicht gespeichert \u2013 die Datei im Browser \xF6ffnen oder weitergeben.",version_save:"Stand speichern \u2026",version_save_hint:"H\xE4lt den Plan unter einem Namen fest (\u201Evor dem Umbau\u201C). Benannte St\xE4nde bleiben, wenn die automatischen Wiederherstellungspunkte gehen.",version_name_prompt:"Name f\xFCr diesen Stand (z. B. \u201Evor dem Umbau\u201C):",version_saved:"Stand \u201E{name}\u201C gespeichert.",version_compare:"Vergleichen",version_delete_confirm:"\u201E{name}\u201C l\xF6schen?",version_same:"Kein Unterschied zum Plan.",version_diff_n:"{n} Unterschiede zum Plan, wie er jetzt ist:",diff_floor_added:"Etage \u201E{name}\u201C neu",diff_floor_removed:"Etage \u201E{name}\u201C entfernt",diff_room_added:"Raum \u201E{name}\u201C neu",diff_room_removed:"Raum \u201E{name}\u201C entfernt",diff_room_renamed:"\u201E{detail}\u201C hei\xDFt jetzt \u201E{name}\u201C",diff_room_reshaped:"\u201E{name}\u201C umgeformt ({detail} m\xB2)",diff_opening_added:"{name} neu ({detail})",diff_opening_removed:"{name} entfernt ({detail})",diff_furniture_added:"{name} neu",diff_furniture_removed:"{name} entfernt",diff_furniture_moved:"{name} verschoben oder ge\xE4ndert",diff_device_added:"Ger\xE4t {name} gesetzt",diff_device_removed:"Ger\xE4t {name} entfernt",diff_device_moved:"Ger\xE4t {name} verschoben",backup_none:"Noch keine. Beim Bearbeiten entsteht h\xF6chstens alle 10 Minuten ein Punkt.",backup_summary:"{rooms} R\xE4ume, {furniture} M\xF6bel",backup_restore:"Wiederherstellen",backup_restore_confirm:"Den Stand vom {time} wiederherstellen? Der jetzige Stand bleibt als Wiederherstellungspunkt erhalten.",backup_restored:"Wiederhergestellt.",backup_file:"Datei",backup_export:"Exportieren",backup_export_share:"Als Vorlage teilen",backup_export_share_hint:"Ohne Bereiche, Ger\xE4te, Sensoren und Bilder \u2013 zum Weitergeben an andere.",backup_import:"Importieren \u2026",backup_import_confirm:"Den ganzen Grundriss durch die Datei ersetzen? Der jetzige Stand bleibt als Wiederherstellungspunkt erhalten.",backup_import_error:"Die Datei ist kein NextFloor-Plan ({error}).",backup_imported:"Importiert.",backup_hint:"Hintergrundbilder sind nicht in der Datei enthalten.",backup_full:"Komplett-Backup",backup_full_export:"Alles sichern (Plan, Bilder, Packs)",backup_full_import:"Komplett-Backup wiederherstellen \u2026",backup_full_hint:"Eine Datei mit dem Plan, allen Hintergrund- und Bildschirmbildern und den installierten Packs. Beim Wiederherstellen wird jedes Pack erneut gepr\xFCft; der Lizenzschl\xFCssel ist nicht enthalten.",backup_full_confirm:"Plan, Bilder und Packs durch das Backup ersetzen? Der aktuelle Stand bleibt als Wiederherstellungspunkt erhalten.",backup_full_not_backup:"Das ist kein Komplett-Backup von NextFloor.",backup_full_restored:"Backup wiederhergestellt: {packs} Packs, {pictures} Bilder.",backup_full_skipped:"\xDCbersprungen (nicht lesbar): {packs}.",export_name_full:"komplett",device_confirm:"Vor dem Schalten nachfragen",device_confirm_hint:"Beim Antippen in 3D, im Schnellmen\xFC und im Raumfenster erscheint erst eine R\xFCckfrage. Doppeltipp auf den Raum l\xE4sst dieses Ger\xE4t aus.",cover_confirm_hint:"Auf, Zu und Positionen fragen im Schnellmen\xFC und im Raumfenster erst nach, und Wischen \xFCber das Symbol bewegt den Rollladen nicht mehr (es dreht dann die Ansicht). Stopp fragt nie.",blind_kind:"Art des Behangs",blind_roller:"Rollladen au\xDFen",blind_venetian:"Raffstore mit Lamellen",blind_inside:"Rollo innen",cover2_entity:"Zweiter Rollladen (rechte H\xE4lfte)",cover_my:"Lieblingsposition \u201EMy\u201C (%, 0 = keine)",cover_my_go:"Zur Lieblingsposition ({p} %)",blind_hint:"Ein Raffstore dreht seine Lamellen in 3D mit der Lamellenstellung des Rollladens; ein Rollo innen h\xE4ngt hinter dem Glas. Ein breites Fenster kann f\xFCr seine rechte H\xE4lfte einen zweiten Rollladen haben. Die Lieblingsposition erscheint als \u201EMy\u201C im Schnellmen\xFC: ein Rollladen mit Positionen f\xE4hrt dorthin, ein Somfy-RTS-Motor ohne R\xFCckmeldung f\xE4hrt mit Stopp in seine eigene My-Stellung.",confirm_switch:"{name} wirklich schalten?",lock_confirm_unlock:"{name} wirklich aufschlie\xDFen?",gang_switch_one:"Schaltet",furn_cover_entity:"Bewegt sich mit",furn_cover_hint:"Vorhang, Leinwand, Markise oder Tor folgen dieser Cover-Entit\xE4t (Rollladen, Vorhang, Markise, Tor) und fahren mit ihr. Ein Tipp \xF6ffnet ihr Men\xFC (auf, Stopp, zu).",furn_cover_inverted:"Laufrichtung umkehren",furn_cover_inverted_hint:"F\xFCr eine Markise oder einen Vorhang, die im Plan genau andersherum fahren als in Wirklichkeit: ausgefahren zeigt dann eingefahren und umgekehrt.",gang_switch:"Taste {n} schaltet",gang_socket_one:"Steckdose an",gang_socket:"Steckdose {n} an",gang_switch_hint:"Eine Taste leuchtet, solange ihr Licht an ist (in seiner Farbe). Ein Tipp schaltet; bei mehreren Tasten fragt ein kleines Men\xFC, welche. Dieselbe Entit\xE4t darf an mehreren Schaltern sitzen.",gang_socket_hint:"Eine Steckdose leuchtet gr\xFCn, solange ihr Schalter an ist \u2013 heller, je mehr sie zieht. Ein Tipp schaltet; bei mehreren fragt ein kleines Men\xFC, welche.",lock_confirm_lock:"{name} abschlie\xDFen?",opening_lock:"Smart Lock",opening_lock_hint:"Ein Tipp auf die T\xFCr schlie\xDFt ab oder auf (immer mit R\xFCckfrage). Solange sie aufgeschlossen ist, leuchtet ihre Kante.",split_handle_hint:"Ziehen: Breite von Plan und 3D-Ansicht",wall_exterior:"Au\xDFenwand (m)",wall_interior:"Innenwand (m)",grid:"Raster (m)",units:"Ma\xDFe anzeigen in",units_metric:"Meter",units_imperial:"Fu\xDF und Zoll",units_hint:"Wie L\xE4ngen und Fl\xE4chen im Plan, in den Formularen und in der Wandansicht stehen. Eingaben bleiben in Metern.",background:"Vorlage (Grundriss-Bild)",background_upload:"Bild w\xE4hlen \u2026",background_width:"Breite im Plan (m)",background_opacity:"Deckkraft",background_rotation:"Drehung (\xB0)",background_edit:"Verschieben, skalieren und drehen",background_edit_done:"Fertig",background_edit_hint:"Solange der Modus an ist: Bild ziehen verschiebt es, der Griff unten rechts zieht es gr\xF6\xDFer oder kleiner. Erst das Bild an den Ma\xDFstab anpassen, dann drehen.",background_remove:"Vorlage entfernen",hint_select:"Raum antippen zum Ausw\xE4hlen \xB7 Ecken ziehen \xB7 \u201E+\u201C auf einer Kante f\xFCgt einen Punkt ein \xB7 Pfeiltasten verschieben \xB7 Entf l\xF6scht \xB7 Strg+Z",hint_rect:"Ziehen, um ein Rechteck zu zeichnen",hint_polygon:"Punkte setzen \xB7 auf den ersten Punkt tippen oder Enter schlie\xDFt \xB7 Esc bricht ab",hint_empty:"Lege zuerst eine Etage an.",area_m2:"{a} m\xB2",overlap_warning:"R\xE4ume \xFCberlappen sich \u2013 die W\xE4nde dort sind unvollst\xE4ndig.",read_only:"Nur Administratoren k\xF6nnen den Grundriss bearbeiten.",side_failed:"Dieses Formular lie\xDF sich nicht anzeigen ({error}). Der Grundriss bleibt bedienbar. Bitte melde den Text in einem GitHub-Issue.",mat_wood:"Holz",mat_oak:"Eiche",mat_tiles:"Fliesen",mat_carpet:"Teppich",mat_stone:"Stein",mat_concrete:"Beton",card_name:"NextFloor",card_description:"Deine Wohnung in 3D (Neon).",stats:"{calls} Draw-Calls \xB7 {tris} Dreiecke",stats_fps:"{fps} B/s (langsamstes Bild {ms} ms)",stats_idle:"Ruhe (0 B/s)",stats_busy_floors:"Etagen",stats_busy_openings:"T\xFCren/Fenster",stats_busy_flash:"Blitz",stats_busy_roof:"Dach",stats_busy_flow:"Stromfluss",stats_busy_effect:"Farbeffekt",stats_busy_robot:"Roboter",stats_busy_orbit:"Kamerafahrt",stats_busy_tint:"Raumfarbe",stats_low:"Stufe Tablet, Pixeldichte {r}",stats_full:"volle Stufe, Pixeldichte {r}",floors_apart:"Auseinander",floors_stacked:"Gestapelt",roof_keep:"Dach bleibt",roof_keep_hint:"Das Dach bleibt beim Heranzoomen auf dem Haus, statt sich zu heben und auszublenden",floor_rooms_one:"1 Raum",floor_rooms:"{n} R\xE4ume",quality:"Qualit\xE4t",quality_auto:"Auto",quality_low:"Tablet",quality_high:"Hoch",state_on:"An",state_off:"Aus",state_open:"Offen",state_closed:"Zu",state_opening:"\xD6ffnet",state_closing:"Schlie\xDFt",state_playing:"Spielt",state_paused:"Pause",state_idle:"Bereit",state_locked:"Verriegelt",state_unlocked:"Entriegelt",state_detected:"Erkannt",state_clear:"Frei",state_unavailable:"Nicht verf\xFCgbar",state_heat:"Heizen",state_cool:"K\xFChlen",state_auto:"Automatik",state_heat_cool:"Heizen/K\xFChlen",state_dry:"Entfeuchten",state_fan_only:"L\xFCften",devices:"Ger\xE4te",devices_none_area:"Verkn\xFCpfe den Raum mit einem Bereich, dann erscheinen dessen Ger\xE4te hier.",devices_none:"Im Bereich gibt es keine passenden Ger\xE4te.",devices_place_all_n:"Alle {n} platzieren \u2026",devices_place_all_confirm:"{n} Ger\xE4te auf einmal in den Raum setzen? (Strg+Z bzw. \u201ER\xFCckg\xE4ngig\u201C nimmt alle in einem Schritt zur\xFCck.)",devices_src_area:"Dieser Bereich",devices_src_other:"Andere Bereiche",devices_src_none:"Ohne Bereich",panel_hide:"Im Raumfenster ausblenden",panel_unhide:"Im Raumfenster wieder zeigen",panel_state_hide:"Zustand im Raumfenster ausblenden (z. B. ein Rollladen, der nur \u201Eunbekannt\u201C meldet)",panel_state_show:"Zustand im Raumfenster wieder zeigen",devices_place:"Platzieren",devices_remove:"Entfernen",devices_hint:"Platzierte Ger\xE4te erscheinen in 3D. Im Plan lassen sie sich verschieben.",panel_lights:"Licht",panel_covers:"Rolll\xE4den",panel_climate:"Heizung",panel_media:"Medien",panel_switches:"Schalter",panel_sensors:"Sensoren",panel_scenes:"Szenen & Skripte",panel_announce:"\u{1F4E2} Durchsage",announce_placeholder:"Eigene Nachricht \u2026",announce_send:"Sagen",announce_sent:"Gesagt: \u201E{message}\u201C",announce_failed:"Durchsage fehlgeschlagen: {error}",announce_phrase_1:"Essen ist fertig!",announce_phrase_2:"Zeit f\xFCrs Bett!",announce_phrase_3:"Bitte runterkommen!",announce_phrase_4:"Wir fahren gleich los!",announce_phrase_5:"Der Hund muss raus!",state_recording:"Nimmt auf",state_streaming:"Streamt",panel_all_off:"Alle aus",readable:"Gut lesbar",readable_hint:"Kr\xE4ftigere Kontraste und gr\xF6\xDFere Schrift \u2013 f\xFCr Wandtablets und alle, die so besser lesen.",plain:"Nur Grundriss",plain_hint:"Zeigt nur W\xE4nde, T\xFCren, Fenster und Treppen, ohne M\xF6bel. Ger\xE4te und ihre Pins bleiben.",right_back:"Rechtsklick = zur\xFCck",right_back_hint:"Ein kurzer Rechtsklick in der 3D-Ansicht geht einen Schritt zur\xFCck: vom Raum zur Etage, von der Etage zum Haus (wie ein Doppeltipp auf leere Fl\xE4che). Ziehen mit der rechten Taste verschiebt weiter die Ansicht.",stl:"3D-Druck (STL)",stl_hint:"Speichert das Haus als STL-Datei (W\xE4nde, B\xF6den, M\xF6bel und Au\xDFenfl\xE4chen aller Etagen) zum 3D-Drucken, im Ma\xDFstab 1:100 (ein Meter wird zu 10 mm). Fenster, Licht und Dach fehlen; ein Slicer repariert die Datei bei Bedarf.",card_plain:"Nur Grundriss",card_rooms:"Nur diese R\xE4ume",card_rooms_hint:"Die Karte zeigt nur die angehakten R\xE4ume mit ihren M\xF6beln, Ger\xE4ten, T\xFCren und Fenstern (zum Beispiel f\xFCr ein Tablet in der K\xFCche). Nichts angehakt: der ganze Plan.",card_templates:"Kartenvorlagen",card_templates_hint:"Eine Dashboard-Karte einmal hier einrichten (mit den Einstellungen der Karte) und auf jedem Tablet nur noch den Namen angeben: `template: k\xFCche_tablet`. \xC4nderungen hier erreichen alle Karten mit dieser Vorlage; was auf der Karte selbst steht, gilt vor der Vorlage.",template_name:"Neue Vorlage (Name)",template_add:"Vorlage anlegen",template_reload:"Bildschirme mit dieser Vorlage neu laden",template_reload_all:"Alle Bildschirme neu laden",template_use:"Auf der Dashboard-Karte: `template: {name}`",card_template:"Kartenvorlage",card_template_none:"keine (nur diese Karte)",card_readable:"Gut lesbar",all_off_n:"Alles aus ({n})",all_off_hint:"Schaltet Lichter, Schalter, Ventilatoren und Medien des Raums aus; zehn Sekunden lang l\xE4sst es sich r\xFCckg\xE4ngig machen.",all_off_done:"Alles aus.",all_off_undo:"R\xFCckg\xE4ngig",all_off_floor:"Alles aus im {floor} ({n} Ger\xE4te), zehn Sekunden lang r\xFCckg\xE4ngig zu machen",mood_save:"Stimmung speichern",mood_save_hint:"Speichert, wie die Lampen des Raums gerade leuchten, als Stimmung \u2013 ein Tipp darauf stellt sie sp\xE4ter wieder her, \u201E\u2192\u201C \xFCbertr\xE4gt sie auf einen anderen Raum.",mood_new:"Stimmung",mood_set:"Stimmung einstellen",mood_carry:"Auf einen anderen Raum \xFCbertragen",panel_all_on:"Alle an",view_options:"Ansicht: Qualit\xE4t, Look, Symbole, FPS",panel_all_open:"Alle auf",panel_all_close:"Alle zu",central:"Zentral: alle Lichter, Rolll\xE4den und Favoriten",central_house:"Ganzes Haus",central_lights:"Lichter",central_covers:"Rolll\xE4den",central_on:"An",central_off:"Aus",central_open:"Auf",central_close:"Zu",central_sure:"Sicher?",central_favorites:"Favoriten",central_no_favorites:"Noch keine Favoriten. Im Editor unter \u201EFavoriten\u201C legst du Szenen, Skripte und Schalter fest.",card_central:"Stern mit Zentral-Men\xFC",card_central_hint:"Alle Lichter und Rolll\xE4den der Etage oder des Hauses und die Favoriten aus dem Editor.",favorites:"Favoriten",favorites_hint:"Szenen, Skripte, Automationen, Tasten und Schalter f\xFCr das Zentral-Men\xFC (Stern) der 3D-Ansicht \u2013 Party, Anwesenheitssimulation, Verschattung, Bew\xE4sserung.",favorites_add:"Favorit hinzuf\xFCgen",favorite_floor:"Auf welcher Etage dieser Favorit erscheint",favorite_all_floors:"Alle Etagen",outside_hidden:"Drau\xDFen: Ger\xE4te ausblenden",outside_hidden_hint:"Ger\xE4te, die das Fenster \u201EDrau\xDFen\u201C nicht zeigen soll (sie bleiben im Plan).",outside_hidden_add:"Ger\xE4t ausblenden",outside_view_hint:"Ansicht f\xFCr \u201EDrau\xDFen\u201C: Dreh die 3D-Vorschau auf den Garten und \xFCbernimm sie. Beim \xD6ffnen von \u201EDrau\xDFen\u201C fliegt die Kamera dorthin.",outside_view_set:"Diese Ansicht f\xFCr Drau\xDFen",outside_view_reset:"Ansicht f\xFCr Drau\xDFen zur\xFCcksetzen",room_facts:"Raumfenster: angezeigte Angaben",room_fact_sun:"Sonnenstunden",room_fact_comfort:"Komfort",room_fact_air:"L\xFCftungshinweis",room_fact_circuits:"Stromkreise",background_handles_hint:"Das Bild hat jetzt Griffe wie ein M\xF6bel: ziehen verschiebt es, die Ecke unten rechts skaliert, der runde Griff oben dreht (mit Umschalt in 15\xB0-Schritten). Passt es, \u201EFertig\u201C tippen \u2013 dann liegt es fest.",background_fixed_hint:"Das Bild liegt fest, du kannst dar\xFCber zeichnen. Zum Anpassen \u201EVerschieben, skalieren und drehen\u201C tippen.",bg_level:"Gerade ausrichten",bg_level_cancel:"Ausrichten abbrechen",bg_level_first:"Tippe auf den Anfang einer Wand im Bild, die gerade (waagerecht oder senkrecht) sein soll.",bg_level_second:"Jetzt auf das Ende dieser Wand tippen \u2013 das Bild dreht sich passend.",bg_ruler:"Ma\xDFstab mit Lineal",bg_ruler_cancel:"Lineal abbrechen",bg_ruler_first:"Tippe im Bild auf den Anfang einer Strecke, deren L\xE4nge du kennst \u2013 etwa eine bema\xDFte Wand.",bg_ruler_second:"Jetzt auf das Ende der Strecke tippen.",bg_ruler_length_hint:"Im Plan gemessen: {m} m. Gib die echte L\xE4nge ein, das Bild wird passend skaliert.",bg_ruler_length:"Echte L\xE4nge (m)",bg_ruler_apply:"Ma\xDFstab \xFCbernehmen",thumbs_fold:"Etagenbilder zu Kn\xF6pfen einklappen",thumbs_show:"Etagenbilder wieder zeigen",room_start_view:"Ansicht als Start des Raums",room_start_view_hint:"Tippst du den Raum in 3D an, fliegt die Kamera genau so hin, wie die 3D-Ansicht rechts gerade steht \u2013 Blickwinkel, Zoom und Bildausschnitt. Erst 3D daneben einschalten, den Raum drehen und heranzoomen, dann tippen.",room_start_view_reset:"Startansicht des Raums entfernen (wieder von oben)",room_start_view_need_pane:"Schalte zuerst \u201E3D daneben\u201C ein und dreh und zoom den Raum so, wie er sich \xF6ffnen soll.",floor_start_view:"Ansicht als Start der Etage",floor_start_view_hint:"Diese Etage \xF6ffnet sich in 3D so, wie die 3D-Ansicht rechts gerade steht \u2013 etwa das Erdgeschoss von vorn und das Obergeschoss von hinten. Erst 3D daneben einschalten, drehen, dann tippen.",floor_start_view_reset:"Startansicht der Etage entfernen (wieder wie das Haus)",floor_start_view_need_pane:"Schalte zuerst \u201E3D daneben\u201C ein und dreh die Etage so, wie sie sich \xF6ffnen soll.",ambilight:"Leuchten hinter dem Fernseher (%)",ambilight_hint:"Wie kr\xE4ftig es hinter dem Fernseher leuchtet, solange er l\xE4uft. 0 schaltet es aus (zum Beispiel wenn du LED-Streifen am Fernseher hast), 100 ist die Standardst\xE4rke.",sound_rings:"Klangringe (%)",sound_rings_hint:"Wie gro\xDF die Ringe um den Lautsprecher werden, solange er spielt. 0 schaltet sie aus, Bild und Leuchten bleiben; 100 ist die Standardgr\xF6\xDFe. Die Gr\xF6\xDFe folgt au\xDFerdem der Lautst\xE4rke des Lautsprechers: leiser hei\xDFt kleiner.",glow_scale:"Leuchtst\xE4rke in 3D (%)",light_effects:"Effektanimationen in 3D",light_effects_hint:"Nur exakte HA-Effektnamen zuordnen. Ohne Zuordnung bleibt die HA-Farbe statisch. \xC4ndert nichts in Home Assistant.",light_effects_enabled:"Animationen f\xFCr diese Leuchte erlauben",light_effect_unmapped:"Nicht zugeordnet (statisch)",light_effect_add:"Exakten Effektnamen hinzuf\xFCgen",light_effect_name_limit:"Der exakte Effektname muss 1 bis 255 Zeichen lang sein. Er wird nicht gek\xFCrzt.",light_effect_count_limit:"Maximal 100 Zuordnungen. Entferne zuerst einen vorhandenen Eintrag.",light_effect_exists:"Dieser Effektname ist bereits zugeordnet. Die vorhandene Zuordnung bleibt erhalten.",light_animation_none:"Statisch",light_animation_rainbow:"Regenbogen (ersetzt Farbe)",light_animation_pulse:"Pulsieren (Intensit\xE4t)",light_animation_flicker:"Flackern (Intensit\xE4t)",glow_scale_hint:"Wie kr\xE4ftig die Leuchte in 3D leuchtet: unter 100 % d\xE4mpft helle LED-Streifen, damit der Raum nicht \xFCberstrahlt; \xFCber 100 % l\xE4sst eine schwache Lampe st\xE4rker leuchten. Schaltet nichts in Home Assistant.",vehicle_to_spot:"In Stellplatz umwandeln",vehicle_to_spot_hint:"Ein Fahrzeug als einfaches M\xF6bel steht immer da. Als Stellplatz erscheint es nur, wenn ein Sensor das Auto meldet, und dort verkn\xFCpfst du auch das Auto-Ger\xE4t (Ladestand, Reichweite, Schloss, Klima).",as_furniture:"Als M\xF6bel darstellen",as_furniture_hint:"Ersetzt den Pin durch ein M\xF6bel an derselben Stelle, das mit diesem Ger\xE4t verkn\xFCpft ist \u2013 etwa ein Lautsprecher f\xFCr einen Media Player oder eine Leuchte f\xFCr ein Licht. Strg+Z nimmt es zur\xFCck.",as_furniture_pick:"M\xF6bel w\xE4hlen \u2026",as_device:"Wieder als Ger\xE4te-Pin",as_device_hint:"Ersetzt das M\xF6bel durch den einfachen Pin seines Ger\xE4ts an derselben Stelle.",presets:"Sender und Playlists (Klang)",presets_hint:"Erscheinen im Schnellmen\xFC jedes Lautsprechers unter \u201EAbspielen\u201C, neben den Quellen des Players. F\xFCr einen Echo (Alexa Media Player): Art SPOTIFY, AMAZON_MUSIC oder TUNEIN und als Inhalt, was du sagen w\xFCrdest (\u201ERock Antenne\u201C). F\xFCr Sonos, Music Assistant und andere: Art music oder url mit einer Stream-Adresse oder einer URI.",preset_type:"Art",preset_type_hint:"media_content_type von play_media, z. B. music, url, playlist, SPOTIFY, AMAZON_MUSIC, TUNEIN",preset_content:"Inhalt",preset_content_hint:"media_content_id: Stream-URL, URI (spotify:playlist:\u2026) oder bei Alexa ein Suchbegriff",preset_speakers:"Nur auf diesen Lautsprechern (keiner = auf allen)",media_play:"Abspielen",media_pause:"Pause",media_previous:"Zur\xFCck",media_next:"Weiter",media_volume:"Lautst\xE4rke",media_sources:"Quellen",preset_add:"Sender oder Playlist",own_buttons:"Eigene Kn\xF6pfe",own_buttons_hint:"Erscheinen im Zentral-Men\xFC (Stern) unter den Favoriten: eine Dashboard-Seite \xF6ffnen, die Details einer Entit\xE4t zeigen, einen Dienst aufrufen oder ein browser_mod-Popup mit deiner eigenen Karte \xF6ffnen.",own_alerts:"Eigene Warnungen",circuits:"Sicherungskasten",circuits_hint:"Die Stromkreise mit den R\xE4umen, die an ihnen h\xE4ngen. Das Raum-Panel nennt sie, und die Suche findet sie (\u201EF12\u201C).",circuit_name:"Name",circuit_new:"Neuer Stromkreis",circuit_add:"Stromkreis hinzuf\xFCgen",circuit_add_room:"Raum hinzuf\xFCgen",own_alerts_hint:"Eine Zeile in der Warnleiste der 3D-Ansicht, solange eine Entit\xE4t in einem Zustand ist \u2013 \u201EWassertank leer\u201C vom Saugroboter, \u201ESp\xFClmaschine fertig\u201C. Mehrere Zust\xE4nde mit Komma; bei Zahlen <20 oder >80.",own_alert_entity:"Wenn \u2026",own_alert_state:"\u2026 im Zustand ist (leer = an)",own_alert_text:"\u2026 dann diese Warnung",own_alert_color:"Farbe",own_alert_tap:"Antippen",own_alert_tap_info:"\xF6ffnet die Details",own_alert_tap_toggle:"schaltet die Entit\xE4t",own_alert_tap_room:"springt in den Raum",own_alert_house:"Ganzes Haus",own_alert_new:"Neue Warnung",own_alert_add:"Warnung hinzuf\xFCgen",today:"Heute",tomorrow:"Morgen",today_days:"Tage auf der Karte \u201EHeute\u201C",today_days_one:"Nur heute",today_days_n:"{n} Tage",forecast:"Wettervorhersage",forecast_hint:"Eine kleine Karte mit den n\xE4chsten Tagen der Wetter-Entit\xE4t (Einstellungen): Wetter, H\xF6chst- und Tiefstwert, Regen. Sie steht in einer oberen Ecke der 3D-Ansicht, oben rechts unter der Karte \u201EHeute\u201C.",forecast_days:"Vorhersage",forecast_off:"Aus",forecast_corner:"Ecke",today_none:"Heute steht nichts an.",today_calendars:"Kalender f\xFCr \u201EHeute\u201C",today_calendars_hint:"Die Termine dieser Kalender stehen oben rechts in der 3D-Ansicht auf der Karte \u201EHeute\u201C, zusammen mit den M\xFClltonnen, die heute oder morgen abgeholt werden. Ein Tipp auf den Titel klappt die Karte ein.",own_button_state:"Leuchtet, solange \u2026 an ist (optional)",own_button_label:"Beschriftung",own_button_action:"Aktion",own_button_new:"Neuer Knopf",own_button_add:"Eigener Knopf",own_action_navigate:"Seite \xF6ffnen",own_action_more_info:"Details einer Entit\xE4t",own_action_service:"Dienst aufrufen",own_action_fire_dom_event:"fire-dom-event (browser_mod)",own_target_navigate:"Pfad",own_target_more_info:"Entit\xE4t",own_target_service:"Dienst (domain.service)",own_data:"Daten (JSON)",own_data_hint:'F\xFCr einen Dienst seine Daten, f\xFCr fire-dom-event der Inhalt des Ereignisses, z. B. {"browser_mod": {"service": "browser_mod.popup", "data": {\u2026}}}.',own_data_bad:"Kein g\xFCltiges JSON-Objekt.",panel_no_area:"Dieser Raum ist mit keinem Bereich verkn\xFCpft. Im Editor kannst du ihn verkn\xFCpfen.",panel_empty:"F\xFCr diesen Raum sind keine Ger\xE4te im Grundriss. Im Editor lassen sich Ger\xE4te platzieren oder mit \u2606 f\xFCrs Raumfenster ausw\xE4hlen.",close:"Schlie\xDFen",panel_fold:"Einklappen (Raum bleibt sichtbar)",panel_unfold:"Wieder aufklappen",brightness:"Helligkeit",color_temp:"Farbtemperatur",color:"Farbe",position:"Position",cover_open:"Auf",cover_stop:"Stopp",cover_tilt:"Lamellen",cover_tilt_open:"Lamellen auf",cover_tilt_close:"Lamellen zu",cover_close:"Zu",target_temp:"Soll",current_temp:"Ist",temp_down:"K\xE4lter",temp_up:"W\xE4rmer",volume:"Lautst\xE4rke",play_pause:"Wiedergabe/Pause",previous:"Zur\xFCck",next:"Weiter",run:"Ausf\xFChren",details:"Details",hold_hint:"Antippen schaltet \xB7 lange dr\xFCcken \xF6ffnet Details",tool_opening:"T\xFCr & Fenster",tool_furniture:"M\xF6bel",qm_off:"Aus",find:"Suchen",find_placeholder:"Wo ist \u2026? Ger\xE4t oder Raum",find_none:"Nichts gefunden",swipe_off:"Aus",panel_pin:"Im Raumfenster zeigen",panel_unpin:"Nicht im Raumfenster zeigen",devices_panel_hint:"Das Raumfenster zeigt die Ger\xE4te im Grundriss. \u2606 nimmt ein Ger\xE4t zus\xE4tzlich ins Raumfenster auf, ohne es zu platzieren.",card_section_view:"Ansicht",card_size:"Gr\xF6\xDFe",card_size_fixed:"Feste H\xF6he",card_size_fill:"Bildschirm f\xFCllen",card_fill_hint:"Am besten in einer Dashboard-Ansicht vom Typ \u201EPanel (1 Karte)\u201C \u2013 dann nimmt die Karte den ganzen Platz ein.",card_controls:"Schalter in der Karte",card_floor_thumbs:"Etagen als Mini-Ansichten",card_floor_thumbs_hint:"Kleine Bilder der Etagen am Rand \u2013 antippen wechselt die Etage",card_floor_thumbs_hint_start:"Die gew\xE4hlte Etage ist dann die Start-Etage \u2013 mit den Bildern am Rand wechselt man zu den anderen",card_room_names:"Raumnamen anzeigen",card_section_kiosk:"Wandtablet (Kiosk)",card_section_features:"Funktionen",card_weather_plan:"wie im Plan eingestellt",card_pro_hint:"Bewegungsspur und Kamerawand geh\xF6ren zum Kameras: Die Spur zeigt die letzte halbe Stunde, die Wand alle Kameras des Plans.",card_idle_return:"Zur\xFCck zur Startansicht nach",card_idle_off:"Nie",card_idle_min:"{n} min ohne Bedienung",card_idle_hint:"Nach der Wartezeit schlie\xDFt die Karte den Raum und zeigt wieder die Startansicht.",card_night:"Nachtdimmung",card_night_off:"Aus",card_night_sun:"Nach Sonnenstand",card_night_time:"Zeitraum",card_night_range:"Zeitraum (z. B. 22:00-06:00)",card_idle_orbit:"Kamerafahrt als Bildschirmschoner",card_idle_orbit_hint:"Nach der R\xFCckkehr dreht sich die Ansicht langsam, bis jemand das Tablet ber\xFChrt",card_dashboard:"Knopf zu einem Dashboard (Pfad)",card_dashboard_label:"Beschriftung des Knopfs",card_dashboard_hint:"Ein Knopf oben rechts in der Karte \xF6ffnet das Dashboard oder die Ansicht mit diesem Pfad, z. B. /lovelace/home oder /dashboard-haus/0. Ohne Beschriftung zeigt er \u2302.",card_alerts:"Warnungen anzeigen",card_alerts_hint:"Rauch, Gas, CO, Wasser, Alarmanlage und offene Fenster bei Regen: der Raum pulsiert, oben erscheint ein Hinweis",card_alert_jump:"Bei neuer Warnung zum Raum springen",card_alert_jump_hint:"Die Ansicht wechselt selbst zur Etage und zum Raum der Warnung",card_scenes:"Szenen-Kn\xF6pfe im Raum",card_scenes_hint:"Szenen und Skripte des Bereichs als Kn\xF6pfe unter der 3D-Ansicht, wenn ein Raum gew\xE4hlt ist",card_sensor_bar:"Eigene Sensoren oben",card_sensor_bar_hint:"Die im Editor gew\xE4hlten Sensoren (Einstellungen) oben links auf der Karte",card_central_open:"Sternmen\xFC offen und gro\xDF",card_central_open_hint:"Favoriten und eigene Kn\xF6pfe stehen von Anfang an offen, eine Nummer gr\xF6\xDFer",card_keep_camera:"Kamera beim Etagenwechsel behalten",card_keep_camera_hint:"Gleiche Seite, H\xF6he und Entfernung auf jeder Etage",card_today:"Karte \u201EHeute\u201C",card_today_hint:"Termine von heute und f\xE4llige M\xFClltonnen oben rechts",card_announcements:"Durchsagen",card_announcements_hint:"Durchsagen (Aktion \u201ENextFloor: Durchsage\u201C) erscheinen gro\xDF auf der Karte, mit Gong und gesprochen",weather_short:"Wetter",time_of_day:"Tageszeit",time_of_day_hint:"Zeigt Sonne, Licht, Schatten und Look zu einer anderen Uhrzeit von heute. Noch einmal tippen zeigt wieder das Jetzt.",menu_open:"Men\xFC offen",menu_open_hint:"Das Sternmen\xFC mit Favoriten und eigenen Kn\xF6pfen steht auf diesem Ger\xE4t von Anfang an offen, eine Nummer gr\xF6\xDFer \u2013 f\xFCr ein Wandtablet, das vor allem Szenen schaltet.",keep_camera:"Kamera behalten",keep_camera_hint:"Beim Wechsel der Etage bleibt die Kamera auf derselben Seite, H\xF6he und Entfernung, statt die neue Etage von der Startseite aus einzupassen.",view_zoom:"Zoom",view_zoom_hint:"Wie nah die eingepassten Ansichten kommen \u2013 auf kleinen Tablets wirkt das Haus gr\xF6\xDFer.",weather_entity:"Wetter-Entit\xE4t",weather_effects:"Wetter-Effekte in 3D",card_weather_density:"Regen- und Schneemenge",card_weather_density_hint:"Weniger Tropfen und Flocken als das Wetter meldet; Wolken, Nebel und Blitze bleiben",weather_effect_rain:"Regen",weather_effect_snow:"Schnee",weather_effect_fog:"Nebel (graut die Szene ein)",weather_effect_clouds:"Wolken dunkeln Himmel und Sonne ab",weather_effect_lightning:"Blitze bei Gewitter",weather_effect_sky:"Sonne und Mond am Himmel",rain_warning:"Warnung: Fenster offen bei Regen",sun_patches:"Sonnenlicht und Schatten",sun_patches_hint:"Mit eingestellter Nordrichtung f\xE4llt das Sonnenlicht aus sun.sun als helle Flecken durch die Fenster auf den Boden, und das Haus wirft seinen Schatten auf das Grundst\xFCck. Ohne Haken bleiben Boden und Grundst\xFCck ohne Sonnenflecken und Schatten.",sun_arc:"Sonnenbogen und Kompass",sun_arc_hint:"Zeichnet den Weg der Sonne von heute als Bogen \xFCber das Grundst\xFCck, mit einem Ring und den Himmelsrichtungen am Boden (Norden rot). Braucht die Position deines Zuhauses in Home Assistant.",weather_entity_hint:"Welche Wetter-Entit\xE4t den Himmel ums Haus steuert. \u201EAutomatisch\u201C nimmt die erste gefundene.",weather_hint:"Wetter am Haus: Regen und Schnee fallen mit dem echten Wind, Wolken ziehen mit Schatten \xFCbers Grundst\xFCck, Blitze, Nebel, Sonne und Mond",card_weather:"Wetter drau\xDFen",card_weather_hint:"Regen, Schnee, Hagel, Wolken mit Schatten, Blitze und Nebel aus der ersten Wetter-Entit\xE4t (weather_entity w\xE4hlt eine andere); auf Stufe Tablet weniger Teilchen",alerts:"Warnungen",alert_smoke:"Rauch: {name}",alert_gas:"Gas: {name}",alert_co:"Kohlenmonoxid: {name}",alert_water:"Wasser: {name}",alert_alarm:"Alarm ausgel\xF6st",alert_alarm_by:"Alarm ausgel\xF6st durch {cause}",alert_alarm_pending:"Alarm wird ausgel\xF6st",alert_window_rain:"Fenster offen bei Regen: {name}",alert_power_outage:"Stromausfall: {name}",alert_contact_lost:"Kontakt antwortet nicht: {name}",rain_sensor:"Regensensor (eigene Wetterstation)",rain_sensor_inverted:"Regensensor umkehren",rain_sensor_inverted_hint:"F\xFCr Sensoren, die bei Regen \u201Eaus\u201C (oder 0) melden und bei Trockenheit \u201Eein\u201C.",outage_sensor:"Sensor f\xFCr Stromausfall",outage_hint:"Ein Bin\xE4rsensor der Klasse Strom, der aus ist, ein anderer Bin\xE4rsensor, der an ist, ein Status wie \u201Eoff_grid\u201C oder \u201Ebackup\u201C oder eine Spannung unter 50 V l\xF6sen eine Warnung f\xFCrs ganze Haus aus.",contact_warning:"Warnen, wenn ein T\xFCr- oder Fensterkontakt nicht erreichbar ist",contact_warning_hint:"Ist ein Kontakt 10 Minuten lang \u201Enicht verf\xFCgbar\u201C (leere Batterie, au\xDFer Funkreichweite), sieht das Fenster in 3D geschlossen aus, obwohl es keiner wei\xDF. Dann nennt ein Hinweis den Kontakt. Ein Neustart von Home Assistant warnt nicht.",night_lock_warning:"Nachts warnen, wenn eine T\xFCr nicht abgeschlossen ist",night_lock_warning_hint:"Zwischen 22 und 6 Uhr nennt ein Hinweis die T\xFCrschl\xF6sser des Plans, die offen stehen.",alert_unlocked_night:"Nicht abgeschlossen: {name}",motion_markers_active:"Bewegungsmelder nur zeigen, wenn sie etwas erkennen",motion_markers_active_hint:"Gilt f\xFCr Bewegungs-, Anwesenheits- und Pr\xE4senzmelder. Ein Melder, dessen Symbol auf immer zeigen steht, bleibt sichtbar.",room_double_tap:"Doppeltipp auf einen Raum",room_double_tap_hint:"Ein Doppeltipp auf einen Raum schaltet seine Lichter aus, wenn eins an ist, sonst alle an. Ger\xE4te mit \u201EErst fragen\u201C bleiben immer au\xDFen vor.",room_double_tap_area:"Lampen im Plan und alle Lichter des Bereichs",room_double_tap_plan:"Nur Lampen im Plan",room_double_tap_off:"Nichts schalten",card_room_double_tap_auto:"Wie im Plan eingestellt",status_entities:"Eigene Sensoren oben in der 3D-Ansicht",status_add:"Sensor hinzuf\xFCgen",status_entities_hint:"Zum Beispiel Au\xDFentemperatur, Alarmanlage oder Luftqualit\xE4t: Sie stehen oben links mit Name und Wert, auch in einem ge\xF6ffneten Raum. Antippen \xF6ffnet die Details. Bis zu 12.",announce_tts:"Text-zu-Sprache f\xFCr Durchsagen",announce_phrases:"S\xE4tze f\xFCr Durchsagen (einer pro Zeile)",announce_phrases_hint:"Leer: die mitgelieferten S\xE4tze. Durchsagen gibt es auch als Aktion \u201ENextFloor: Durchsage\u201C f\xFCr Automationen \u2013 auf den Lautsprechern der R\xE4ume und auf jedem offenen NextFloor-Bildschirm.",opening_rain_warning:"Bei Regen warnen",opening_light_well:"Lichtschacht davor",sill_boards:"Fensterbank",sill_boards_auto:"Automatisch",sill_boards_none:"Keine",sill_boards_inside:"Nur innen",sill_boards_outside:"Nur au\xDFen",room_names_short:"Raumnamen",room_names_toggle_hint:"Raumnamen in der 3D-Ansicht ein- oder ausblenden",floor_stack_short_dim:"Abgedunkelt",floor_stack_short_stacked:"Gestapelt",floor_stack_short_single:"Einzeln",size_short_w:"B",size_short_d:"T",size_short_h:"H",import_error_not_json:"Die Datei ist kein JSON.",import_error_not_plan:"Die Datei ist kein NextFloor-Plan.",import_other_hint:"Aus Sweet Home 3D: die .sh3d-Datei hier importieren. Etagen, R\xE4ume, T\xFCren, Fenster und freie W\xE4nde werden \xFCbernommen, M\xF6bel nicht.",import_sh3d_found:"Sweet Home 3D: {floors} Etagen, {rooms} R\xE4ume, {openings} T\xFCren und Fenster, {walls} freie W\xE4nde ({furniture} M\xF6bel werden nicht \xFCbernommen).",import_dxf_found:"DXF: {rooms} R\xE4ume (geschlossene Polylinien) und {walls} freie W\xE4nde (Linien) auf einer Etage.",import_ifc_found:"In der IFC-Datei: {floors} Etagen und {rooms} R\xE4ume (die W\xE4nde zeichnet NextFloor aus den R\xE4umen).",import_roomplan_found:"Raumscan (RoomPlan): {rooms} R\xE4ume, {openings} T\xFCren und Fenster; {skipped} Objekte wurden nicht \xFCbernommen (M\xF6bel stellst du selbst).",import_error_roomplan_empty:"Im Raumscan sind keine W\xE4nde.",import_error_ifc_empty:"In der IFC-Datei sind keine R\xE4ume (IfcSpace) mit Grundriss.",import_error_dxf_empty:"In der DXF-Datei sind keine Linien oder Polylinien.",import_error_sh3d:"Das ist keine Sweet-Home-3D-Datei, die sich lesen l\xE4sst (es braucht Sweet Home 3D 5.3 oder neuer).",import_error_sh3d_empty:"In der Sweet-Home-3D-Datei sind keine R\xE4ume oder W\xE4nde.",export_name_template:"vorlage",export_name_backup:"sicherung",card_floor_stack:"Etagen darunter",floor_stack_dim:"Abgedunkelt",floor_stack_stacked:"Gestapelt (ganzes Haus bis hier)",floor_stack_single:"Ausgeblendet (nur diese Etage)",card_control_walls:"W\xE4nde hoch/Schnitt",card_control_floors:"Etagen auseinander",card_control_temperature:"Temperatur",card_control_humidity:"Feuchte",card_control_co2:"CO\u2082",card_controls_hint:"W\xE4nde hoch/Schnitt, Etagen auseinander und Temperatur, Feuchte, CO\u2082 zum Umschalten",controls_hide:"Bedienelemente ausblenden \u2013 nur die 3D-Ansicht bleibt",nav_wrap:"Leiste umbrechen: alle Etagen und R\xE4ume auf mehreren Zeilen",bars_unfold:"Schalter",nav_row:"Leiste in einer Zeile (seitlich scrollen)",controls_show:"Bedienelemente wieder einblenden",card_controls_hidden:"Mit ausgeblendeten Bedienelementen starten",card_controls_hidden_hint:"Nur die 3D-Ansicht; ein Auge unten links holt Leisten, Werte und Schalter zur\xFCck",card_controls_hide_after:"Bedienelemente ausblenden nach",card_hide_after_s:"{n} s ohne Ber\xFChrung",card_fullscreen_button:"Vollbild-Taste",card_fullscreen_button_hint:"Blendet das Dashboard drumherum aus (z. B. am Wandtablet)",fullscreen:"Vollbild",fullscreen_exit:"Vollbild beenden",card_section_show:"Anzeigen",card_floor:"Etage",card_floor_house:"Ganzes Haus (Etage antippen zum \xD6ffnen)",card_height:"H\xF6he (Pixel)",card_walls:"W\xE4nde",card_quality_hint:"\u201ETablet\u201C ist die sparsamste Stufe \u2013 ideal f\xFCr Fire-Tablets und andere Wandtablets.",card_flows_switch:"Schalter in der Karte",card_flows_on:"Immer an",card_flows_off:"Immer aus",holos:"Karten",holos_hint:"Die Live-Karten \xFCber dem Haus (Energiebilanz, Auto, Medien) ein- oder ausblenden",card_energy:"Energiewerte oben anzeigen",card_room_panel:"Raum-Details beim Antippen",card_room_buttons:"Raum-Kn\xF6pfe",card_room_buttons_hint:"Eine Reihe mit einem Knopf je Raum oben in der Karte \u2013 antippen \xF6ffnet den Raum, wie das Antippen im Modell",card_room_panel_hint:"Lichter und Rolll\xE4den des Raums in einem Seitenfenster",card_explode:"Etagen in der Hausansicht auseinanderziehen",card_roof_fade:"Dach beim Heranzoomen ausblenden",card_roof_fade_hint:"Aus: Das Dach bleibt auf dem Haus, auch wenn die Kamera nah herankommt.",card_stats:"Leistungsanzeige (Bilder pro Sekunde)",card_stats_hint:"Zum Pr\xFCfen, wie fl\xFCssig die Karte auf dem Ger\xE4t l\xE4uft",packs:"M\xF6bel-Packs",lib_badge_light:"Leuchte: l\xE4sst sich mit einem Licht verkn\xFCpfen und in 3D schalten",lib_badge_electric:"Elektrisch: l\xE4sst sich mit Entit\xE4t und Leistungssensor verkn\xFCpfen (schalten, Bild, Verbrauch)",lib_badge_hint:"M\xF6bel mit Symbol lassen sich mit Entit\xE4ten verkn\xFCpfen: Leuchten schalten, Bildschirme zeigen Bilder, Ger\xE4te ihren Verbrauch.",care_bin_today:"Heute Abholung",care_bin_tomorrow:"Morgen Abholung",care_bin_days:"In {n} Tagen",care_mail_yes:"Post ist da",care_mail_no:"Leer",care_plant_thirsty:"Durst",care_plant_ok:"Gut versorgt",care_time_left:"Noch {time}",care_entity_bin:"Abholtermin (Sensor)",care_entity_mail:"Post-Sensor",care_entity_plant:"Bodenfeuchte (Sensor)",care_thirsty_below:"Durst unter (%)",care_hint_bin:"Ein Sensor mit dem n\xE4chsten Abholtermin: Tage, ein Datum, \u201Eheute\u201C/\u201Emorgen\u201C oder die Integration Waste Collection Schedule. Am Tag davor und am Abholtag leuchtet die Tonne.",care_hint_mail:"Ein Sensor, der meldet, dass Post im Kasten ist (z. B. ein Kontakt an der Klappe). Dann leuchtet der Briefkasten.",care_hint_plant:"Ein Feuchtesensor in der Erde. Darunter leuchtet die Pflanze und meldet Durst.",lib_cat_lights:"Leuchten",lib_cat_seating:"Sitzen",lib_cat_tables:"Tische",lib_cat_storage:"Schr\xE4nke & Regale",lib_cat_beds:"Betten",lib_cat_kitchen:"K\xFCche",lib_cat_appliances:"Haushaltsger\xE4te",lib_cat_bath:"Bad",lib_cat_media:"TV & Audio",lib_cat_office:"B\xFCro",lib_cat_tech:"Technik",lib_cat_climate:"Heizung & Klima",lib_cat_energy:"Energie",lib_cat_garden:"Garten & Terrasse",lib_cat_plants:"Pflanzen",lib_cat_kids:"Kinder",lib_cat_fitness:"Fitness",lib_cat_pets:"Haustiere",lib_cat_workshop:"Werkstatt & Garage",lib_cat_music:"Musik & Atelier",lib_cat_season:"Saison & Deko",lib_cat_pictures:"Bilder & Rahmen",lib_cat_vehicles:"Fahrzeuge",lib_cat_building:"Treppen & Bauteile",lib_cat_decor:"Deko & Sonstiges",lib_favourites:"Favoriten",lib_recent:"Zuletzt benutzt",lib_for_room:"Passend zu {room}",lib_all_rooms:"Alle R\xE4ume zeigen",lib_linkable:"verkn\xFCpfbar",lib_lit:"leuchtet",lib_outdoor:"drau\xDFen",lib_fav_add:"Zu den Favoriten",lib_fav_remove:"Aus den Favoriten nehmen",lib_sizes:"Gr\xF6\xDFen",feature_name_energy:"Energiefluss",ext_tab:"Erweiterungen",ext_title:"Erweiterungen",models:"Eigene 3D-Modelle",models_hint:"F\xFCr manche Fahrzeuge kann NextFloor ein echtes 3D-Modell zeigen, wenn du eins besitzt. W\xE4hle die Datei (.glb) hier aus: NextFloor dreht sie richtig herum, macht sie leichter, markiert den Lack und legt sie auf deinem Home Assistant ab. Ohne Modell sieht das Fahrzeug aus wie bisher.",models_licence:"Die Dateien geh\xF6ren dir und bleiben auf deinem Home Assistant. NextFloor liefert keine Modelle mit; bitte pr\xFCfe, dass die Lizenz deines Modells die Nutzung in deiner Installation erlaubt.",model_add:"Modell hochladen \u2026",model_replace:"Modell ersetzen \u2026",model_remove:"Entfernen",model_present:"vorhanden",model_missing:"noch keins",model_remove_confirm:"Das Modell \u201E{id}\u201C von Home Assistant l\xF6schen?",model_removed:"Modell \u201E{id}\u201C gel\xF6scht.",model_uploaded:"Modell \u201E{id}\u201C hochgeladen ({size}). Lade das Panel neu, damit es erscheint.",model_upload:"Auf Home Assistant ablegen",model_info:"{triangles} Dreiecke, {size} m",model_front:"Vorderseite",model_front_hint:"Drehe das Modell, bis die Front zum Betrachter zeigt (schr\xE4g nach unten links in der Vorschau).",model_paint:"Lack (die Farbe, die du im Editor w\xE4hlst)",model_paint_preview:"Farbe in der Vorschau",model_detail:"Detailgrad",model_detail_light:"Leicht (Tablet)",model_detail_normal:"Normal",model_detail_fine:"Fein",model_result:"Ergebnis: {triangles} Dreiecke, {size}",model_error_not_glb:"Das ist keine .glb-Datei (bin\xE4res glTF). Exportiere das Modell als \u201EglTF binary\u201C.",model_error_compressed:"Die Datei ist komprimiert (Draco, Meshopt oder KTX). Exportiere sie ohne Kompression.",model_error_empty:"In der Datei ist nichts Dreidimensionales zu finden.",model_error_unreadable:"Die Datei l\xE4sst sich nicht lesen: {detail}",model_error_too_large:"Die Datei ist gr\xF6\xDFer als {max}. W\xE4hle einen geringeren Detailgrad.",model_upload_forbidden:"Nur Administratoren d\xFCrfen Modelle hochladen.",model_upload_too_large:"Home Assistant nimmt keine Dateien \xFCber {max} an. W\xE4hle einen geringeren Detailgrad.",model_upload_not_glb:"Home Assistant hat die Datei abgelehnt (kein bin\xE4res glTF).",model_upload_bad_id:"Die Modell-Kennung ist ung\xFCltig.",model_upload_other:"Das Hochladen hat nicht geklappt: {detail}",ext_intro:"Hier importierst du eigene M\xF6bel-Packs, l\xE4dst eigene 3D-Modelle hoch und bindest Plugins ein.",plugin:"Plugin",plugins_title:"Plugins",plugins_intro:"Plugins erweitern NextFloor um eigene Licht-Animationen, Ger\xE4te und Karten im Raum-Panel. Trag die Adresse eines Plugins ein (eine .js-Datei in /config/www, also /local/\u2026, aus HACS /hacsfiles/\u2026 oder https://\u2026).",plugins_docs:"Wie man ein Plugin schreibt",plugins_warning:"Plugins laufen mit denselben Rechten wie NextFloor in deinem Browser. Nimm nur Plugins, deren Quelle du vertraust.",plugins_off:"ausgeschaltet",plugins_error:"Fehler",plugins_loading:"wird geladen \u2026",plugins_nothing_registered:"geladen, hat aber nichts angemeldet",plugins_loaded:"aktiv",plugins_reload_hint:"Wirkt nach dem Neuladen der Seite",plugins_remove:"Entfernen",plugins_none:"Noch keine Plugins eingetragen.",plugins_from_dashboard:"\xDCber eine Dashboard-Ressource angemeldet",plugins_add:"Hinzuf\xFCgen",plugins_url_invalid:"Bitte eine .js-Adresse unter /local/\u2026, /hacsfiles/\u2026 oder https://\u2026 angeben.",plugins_exists:"Dieses Plugin ist schon eingetragen.",plugins_limit:"H\xF6chstens 20 Plugins.",packs_title:"M\xF6bel-Packs",packs_intro:"Eigene M\xF6bel als Pack (JSON) importieren: als Datei oder unten einf\xFCgen. {n} Packs sind mitgeliefert und immer da.",packs_docs:"Pack-Format",packs_none:"Noch keine eigenen Packs importiert.",community_title:"Community-M\xF6bel",community_intro:"M\xF6bel, die andere mit dem M\xF6bel-Baukasten gebaut und geteilt haben \u2013 gepr\xFCft und kostenlos. Bau deine eigenen:",community_builder:"M\xF6bel-Baukasten \xF6ffnen",community_how:"So teilst du deine",community_load:"Community-M\xF6bel laden",community_none:"Noch keine Community-M\xF6bel \u2013 sei die oder der Erste!",community_install:"Installieren",community_update:"Aktualisieren",community_installed:"Installiert",community_failed:"Die Community-M\xF6bel lie\xDFen sich nicht laden: {detail}",pack_import:"Pack-Dateien importieren \u2026",pack_paste:"JSON importieren",pack_paste_empty:"F\xFCge zuerst das JSON eines Packs ein.",pack_paste_not_json:"Das ist kein g\xFCltiges JSON: {detail}",pack_imported:"\u201E{name}\u201C von {publisher} importiert \u2013 {n} M\xF6bel",packs_imported_n:"{n} von {total} Packs importiert",pack_by:"von {publisher} \xB7 {n} M\xF6bel",pack_remove:"Entfernen",pack_remove_confirm:"Pack \u201E{name}\u201C entfernen? M\xF6bel daraus bleiben als einfache K\xE4sten im Plan.",pack_error_not_a_pack:'Das ist kein M\xF6bel-Pack (es fehlt "format": "nfpack").',pack_error_builtin:"Ein mitgeliefertes Pack hat schon diese ID.",pack_error_invalid_content:"Das Pack enth\xE4lt ung\xFCltige M\xF6bel: {detail}",pack_error_too_large:"Das Pack ist zu gro\xDF (h\xF6chstens 1 MB).",pack_error_needs_update:"Dieses Pack braucht eine neuere Version von NextFloor. Bitte zuerst aktualisieren (HACS \u203A NextFloor \u203A \u22EE \u203A \u201EInformationen aktualisieren\u201C \u203A \u201EHerunterladen\u201C), Home Assistant neu starten und dann noch einmal importieren.",pack_error_other:"Import fehlgeschlagen: {detail}",store_open:"Plugin-Store \xF6ffnen",store_close:"Plugin-Store schlie\xDFen",store_intro:"Gepr\xFCfte Plugins aus der Community. Jedes wird vor der Aufnahme angesehen und danach nicht mehr ver\xE4ndert.",store_submit:"Eigenes Plugin einreichen",store_empty:"Noch keine Plugins im Store.",store_failed:"Der Store lie\xDF sich nicht laden ({error}).",store_install:"Installieren",store_installed:"installiert",store_update:"Aktualisieren",store_confirm:`\u201E{name}\u201C von {author} installieren? Ein Plugin l\xE4uft mit denselben Rechten wie NextFloor in deinem Browser. Die Datei wurde gepr\xFCft, ihr Inhalt ist festgelegt: {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_passage:"Durchbruch (ohne T\xFCr)",style_standard:"Standard",style_bars:"Mit Sprossen",style_glass_wall:"Glaswand (feststehend)",preset_glass_wall:"Glaswand",glass_panes:"Glasfelder",glass_panes_auto:"automatisch (ca. 0,9 m)",glass_panes_hint:"0 = ein einziges Glas ohne Teilung, leer = Teilung etwa alle 0,9 m",flip_hinge:"Anschlag wechseln",flip_main_leaf:"Hauptfl\xFCgel wechseln",flip_hinge_hint:"Scharniere auf die andere Seite",flip_swing:"\xD6ffnungsrichtung umdrehen",flip_swing_hint:"Die T\xFCr schwenkt in den Raum oder zur anderen Seite",main_leaf:"Hauptfl\xFCgel (vom Raum aus)",contact_main:"Kontakt Hauptfl\xFCgel",contact_second:"Kontakt zweiter Fl\xFCgel",tool_outdoor:"Au\xDFen",tool_measure:"Nach Ma\xDF",hint_measure:"Startpunkt antippen, dann rechts die Wandl\xE4ngen mit Richtung eingeben",measure:"Raum nach Ma\xDF",measure_start:"Tippe im Plan auf den Startpunkt, z. B. eine Raumecke.",measure_from:"Start bei {x} / {z} m \u2013 antippen verschiebt den Start.",measure_length:"L\xE4nge der n\xE4chsten Wand (m)",measure_close:"Raum schlie\xDFen",measure_undo:"Letzte Wand weg",measure_gap:"L\xFCcke zum Start: {gap} m (wird beim Schlie\xDFen verbunden)",measure_hint:"Tipp: L\xE4nge eintippen und Pfeiltaste dr\xFCcken. Mit gemessenen Innenma\xDFen danach \u201EL\xFCcken schlie\xDFen\u201C.",rect_by_size:"Rechteck nach Ma\xDF",rect_add:"Rechteck anlegen",dir_up:"Nach oben",dir_down:"Nach unten",dir_left:"Nach links",dir_right:"Nach rechts",hint_outdoor:"Ziehen, um eine Au\xDFenfl\xE4che (Rasen, Terrasse, Pool \u2026) aufzuziehen",outdoor:"Au\xDFenfl\xE4che",outdoor_type:"Art",outdoor_height:"H\xF6he (m)",outdoor_offset:"H\xF6henversatz (m, \u2212 = tiefer)",outdoor_opacity:"Deckkraft (%)",outdoor_opacity_hint:"100 = undurchsichtig. Weniger macht die Fl\xE4che durchsichtig, etwa eine Einfahrt \xFCber dem Keller; der Umriss bleibt.",outdoor_outline:"Umrisslinie zeigen",outdoor_outline_hint:"Ohne Haken zeichnet die Fl\xE4che keine Leuchtlinie an ihrem Rand \u2013 f\xFCr gro\xDFe Grundst\xFCcke aus mehreren Rasenfl\xE4chen.",outdoor_corners_hint:"Ecken: ein + auf einer Kante f\xFCgt eine Ecke hinzu, Ziehen formt die Fl\xE4che, \xD7 entfernt eine Ecke. Beim Zeichnen und Verschieben rasten Fl\xE4chen an benachbarten Ecken und Kanten ein. Alt unterdr\xFCckt das Einrasten.",outdoor_hint:"Au\xDFenleuchten (Wegleuchte, Garten-Spot, Wandleuchte au\xDFen) beleuchten alle Au\xDFenfl\xE4chen und die Fassade.",out_lawn:"Rasen",out_terrace:"Terrasse",out_path:"Weg",out_driveway:"Einfahrt",out_street:"Stra\xDFe",out_pavers:"Pflastersteine",access_room_devices:"Hier sind nur die einzeln freigegebenen Ger\xE4te sichtbar.",access_room_geometry:"F\xFCr diesen Raum sind keine Zust\xE4nde freigegeben.",out_stepping_stones:"Trittplatten",out_natural_stone:"Natursteinweg",outdoor_texture_scale:"Texturma\xDFstab (%)",outdoor_texture_rotation:"Texturdrehung (\xB0)",outdoor_texture_hint:"100 % ist die Originalgr\xF6\xDFe. 200 % macht das Muster doppelt so gro\xDF, 50 % halb so gro\xDF (5\u20132000 %). Die Drehung ver\xE4ndert nur die Textur dieser Fl\xE4che. Standard: 100 % und 0\xB0.",out_sidewalk:"Gehweg",out_gravel:"Schotterfl\xE4che",out_river:"Fluss",out_stream:"Bach",out_pool:"Pool",out_bed:"Beet",out_hedge:"Hecke",out_fence:"Zaun",out_wild:"Wildfl\xE4che",out_pergola:"Pergola / Rahmen",outdoor_open:"Offen (letzte Kante weglassen)",outdoor_open_hint:"Die Kante vom letzten zum ersten Punkt wird nicht gezeichnet \u2013 ein Zaun oder eine Pergola, die ans Haus lehnt.",fence_gates:"Tore im Zaun",gate_add:"+ Tor im Zaun",gate_edge:"Zaunseite",gate_kind:"Art",gate_single:"Gartentor",gate_double:"Doppeltor",gate_sliding:"Schiebetor",gate_offset:"Mitte ab Zaunanfang (m)",gate_width:"Breite (m)",gate_entity:"Antrieb oder Schalter",gate_contact:"Kontakt (an = offen)",fence_gates_hint:"Ein Tor ist eine L\xFCcke im Zaun mit Torpfosten und Fl\xFCgel. Mit einem Antrieb (Cover, Schalter, Hilfsschalter, Schloss) und/oder Kontakt geht es in 3D auf: Garten- und Doppeltor schwingen nach innen, ein Schiebetor f\xE4hrt hinter den Zaun.",outdoor_bracing:"X-Verstrebung",outdoor_cut:"Aus Fl\xE4chen ausschneiden",outdoor_cut_hint:"Jede Fl\xE4che, in der diese ganz liegt, bekommt hier ein Loch \u2013 ein Pool in der Terrasse, ein Bach oder eine Wildfl\xE4che im Rasen. Die Reihenfolge beim Zeichnen spielt keine Rolle. Pool, Fluss und Bach schneiden sich von selbst aus.",outdoor_area_hint:"Der Home-Assistant-Bereich dieser Fl\xE4che (Garten, Terrasse, Pool): seine Ger\xE4te und Sensoren stehen unter Drau\xDFen, und ein Pin auf der Fl\xE4che \xF6ffnet es.",pool_temp:"Wassertemperatur (optional)",pool_pump:"Pumpe / Filter (optional)",pool_pump_on:"Pumpe l\xE4uft",outdoor_slope:"Gef\xE4lle (m)",outdoor_slope_hint:"H\xF6henunterschied von der hohen zur tiefen Kante; die hohe Kante liegt auf dem H\xF6henversatz. Leuchten auf der Fl\xE4che folgen.",outdoor_slope_dir:"F\xE4llt nach",slope_x:"rechts (+X)",slope_nx:"links (\u2212X)",slope_z:"unten (+Z)",slope_nz:"oben (\u2212Z)",north:"Nordrichtung (\xB0 im Uhrzeigersinn von oben)",north_hint:"Die Nordrichtung braucht der Sonnenstand (Licht durch die Fenster).",map_on:"Echte Karte unter dem Plan anzeigen",map_lat:"Breitengrad",map_lon:"L\xE4ngengrad",map_use_ha:"Standort von Home Assistant \xFCbernehmen",map_opacity:"Sichtbarkeit (%)",map_zoom:"Detailstufe",map_zoom_coarse:"grob",map_zoom_fine:"fein",map_move:"Karte unter dem Plan verschieben",map_step:"Schritt",map_url:"Eigene Kachel-Adresse (leer = OpenStreetMap)",map_hint:"Dein Browser l\xE4dt die Kartenkacheln direkt vom Kartenserver (standardm\xE4\xDFig OpenStreetMap, bitte deren Nutzungsbedingungen beachten); solange die Karte aus ist, wird nichts geladen. Der Plan liegt auf der Karte, wie der Kompass es sagt \u2013 drehe den Kompass oder verschiebe die Karte, bis das Haus passt.",compass_title:"Kompass",compass_n_short:"N",compass_s_short:"S",compass_swap:"Nord \u2194 S\xFCd tauschen",compass_swap_hint:"Dreht den Kompass um 180\xB0. Zeichnung, Dachfl\xE4chen und Solarfelder bleiben, wie sie sind.",compass_hint:"Stimmt der Kompass nicht mit der Wirklichkeit \xFCberein, drehst du ihn hier \u2013 nichts muss neu gezeichnet werden. Sonnenlicht, Wind und die Himmelsrichtungen der Dachfl\xE4chen richten sich danach.",roof:"Dach",roof_none:"Kein Dach",roof_flat:"Flachdach",roof_gable:"Satteldach",roof_custom:"Dachfl\xE4chen (frei)",roof_sections:"Dachfl\xE4chen",roof_sections_hint:"Jede Dachfl\xE4che deckt ein Rechteck des Hauses ab, etwa das Wohnhaus, die Scheune oder einen Anbau \u2013 jede mit eigener Form, Firstrichtung, Traufh\xF6he und Neigung. Eine neue Fl\xE4che ziehst du im Plan auf; antippen w\xE4hlt sie aus, ziehen verschiebt sie, die Ecken \xE4ndern die Gr\xF6\xDFe.",roof_sections_start:"Dachfl\xE4chen aus den R\xE4umen erzeugen",roof_sections_regen:"Neu aus den R\xE4umen erzeugen",roof_sections_off:"Zur\xFCck zu einem Dach",roof_regen_confirm:"Alle Dachfl\xE4chen durch einen neuen Vorschlag aus den R\xE4umen ersetzen?",roof_section:"Dachfl\xE4che",roof_section_hint:"H\xF6hen z\xE4hlen vom Boden. Eine Seite mit tieferer Traufe zieht weiter herunter (Abschleppdach); Pultd\xE4cher steigen von der ersten Seite an.",roof_shape_gable:"Sattel",roof_shape_hip:"Walm",roof_shape_pent:"Pult",roof_shape_flat:"Flach",roof_shape_halfhip:"Kr\xFCppelwalm",roof_shape_pyramid:"Zelt",roof_shape_mansard:"Mansard",roof_shape_parapet:"Attika",roof_shape:"Form",roof_end_start:"Ende am Firstanfang",roof_end_end:"Ende am Firstende",roof_halfhip:"Kr\xFCppelwalm beginnt bei",roof_halfhip_hint:"Wie weit oben am Giebel die Walmfl\xE4che beginnt, als Anteil der Giebelh\xF6he: niedrig = ein gro\xDFer Walm, hoch = nur die Spitze ist abgewalmt.",roof_axis_x:"First \u2194",roof_axis_z:"First \u2195",roof_eave:"Traufe (m)",roof_pitch_short:"Neigung (\xB0)",roof_height:"H\xF6he (m)",roof_base:"Wandoberkante (m)",roof_rotation:"Drehung (\xB0)",roof_on_floor:"Sitzt auf Etage",roof_on_floor_hint:"Setzt den Abschnitt auf die Wandoberkante dieser Etage; Grundh\xF6he und Traufen wandern mit. In der 3D-Ansicht geh\xF6rt das Dach zu dieser Etage.",roof_base_hint:"Liegt sie unter der Deckenh\xF6he des Geschosses darunter, enden dessen W\xE4nde an der Dachunterseite: Kniestock an der Traufe, Giebel bis zum First, Innenw\xE4nde an der Schr\xE4ge. Im Grundriss zeigen gestrichelte Linien, wo 1,5 m und 2 m Kopfh\xF6he bleiben.",roof_ridge_height:"Firsth\xF6he",roof_side_top:"oben",roof_side_bottom:"unten",roof_side_left:"links",roof_side_right:"rechts",roof_swap:"Seiten tauschen",roof_open:"\xDCberdachung (Pfosten statt W\xE4nde, durchsichtig)",roof_open_short:"\xDCberdachung",roof_dormer:"Gaube",roof_dormer_hint:"Eine Gaube auf dieser Dachseite: 2 m breit, Front an der Traufwand, Traufe 1,4 m \xFCber der Dachtraufe, Satteldach. Danach verschieben, Breite und H\xF6hen \xE4ndern wie bei jeder Dachfl\xE4che; die Hauptfl\xE4che \xF6ffnet sich darunter, die Wand des Dachgeschosses steigt bis zur Gaube \u2013 dort passt ein Fenster.",roof_outline:"Umriss des Geschosses \xFCbernehmen",roof_outline_hint:"Ein Flachdach als freie Form: \xFCbernimmt den Umriss der R\xE4ume des angezeigten Geschosses (auch L- oder Z-f\xF6rmig) als eine Fl\xE4che ohne Kanten. Die Ecken lassen sich danach ziehen.",roof_points_hint:"Freie Form: Ziehe die Ecken im Plan, ein + auf einer Kante f\xFCgt eine Ecke hinzu, \xD7 entfernt eine. Zur\xFCck zum Rechteck l\xF6scht die Form.",roof_rect:"Zur\xFCck zum Rechteck",roof_open_hint:"F\xFCr Terrassendach oder Carport: Statt W\xE4nden tragen Pfosten und Balken das Dach, die Fl\xE4che ist durchsichtig. Wo die \xDCberdachung an die Hauswand st\xF6\xDFt, liegt sie auf der Wand auf.",roof_swap_hint:"Dreht das Dach um: Die beiden Seiten tauschen Traufe und Neigung, ein Pultdach steigt in die andere Richtung.",roof_pitch:"Dachneigung (\xB0)",roof_overhang:"Dach\xFCberstand (m)",roof_overhang_sides:"\xDCberstand je Seite",roof_overhang_a:"\xDCberstand Traufe A (m)",roof_overhang_b:"\xDCberstand Traufe B (m)",roof_overhang_u0:"\xDCberstand Giebel vorn (m)",roof_overhang_u1:"\xDCberstand Giebel hinten (m)",roof_overhang_auto:"Wieder automatisch",roof_overhang_sides_hint:"Ohne eigene Werte ist der \xDCberstand automatisch: \xFCberall gleich, au\xDFer wo der Dachteil ans Haus st\xF6\xDFt (dort keiner).",roof_ridge:"First",roof_ridge_long:"Entlang der langen Seite",roof_ridge_short:"Entlang der kurzen Seite (z. B. Reihenhaus)",device:"Ger\xE4t",lamp_mount:"Lampe",lamp_ceiling:"Deckenleuchte",lamp_floor:"Stehlampe",lamp_table:"Tischlampe",lamp_wall:"Wandleuchte",marker_height:"H\xF6he des Symbols (m)",height_auto:"H\xF6he automatisch",device_centre:"In Raummitte",lights_spread:"Deckenlampen gleichm\xE4\xDFig verteilen",devices_search:"Ger\xE4te suchen \u2026",devices_more:"+{n} weitere",devices_less:"weniger",panel_more:"Weitere Ger\xE4te des Bereichs ({n})",panel_less:"Weniger anzeigen",gaps_close:"L\xFCcken schlie\xDFen",gaps_hint:"R\xE4ume mit bis zu 60 cm Abstand an einer gemeinsamen Wand zusammenf\xFChren; der Abstand wird die Innenwandst\xE4rke.",gaps_none:"Keine L\xFCcken zwischen R\xE4umen gefunden.",gaps_closed:"{n} Stellen geschlossen.",gaps_closed_wall:"{n} Stellen geschlossen, Innenwand jetzt {t} m.",fps:"FPS",fps_title:"Leistungsanzeige (Bilder pro Sekunde)",hint_garage:"Auf eine Wand tippen, um ein Garagentor einzusetzen",opening_garage:"Garagentor",garage_hint:"Das Tor folgt einem Garagen-Cover (Position oder offen/zu) oder einem Garagentor-Kontakt aus dem Bereich des Raums.",door_hint:"Mit T\xFCrkontakt schwenkt das T\xFCrblatt auf, ohne Sensor steht es halb offen.",hint_door:"Auf eine Wand tippen, um eine T\xFCr einzusetzen",hint_window:"Auf eine Wand tippen, um ein Fenster einzusetzen",opening_door:"T\xFCr",opening_window:"Fenster",opening_type:"Art",opening_position:"Mitte ab Ecke (m)",sill:"Br\xFCstung (m)",opening_height:"H\xF6he (m)",hinge:"Anschlag (vom Raum aus)",hinge_left:"Links",hinge_right:"Rechts",cover_entity:"Rollladen",door_cover:"Antrieb (T\xFCr oder Tor mit Motor)",cover_position_entity:"Positions-Sensor (live)",cover_position_invert:"Positionssensor in 3D umkehren (0 = offen)",contact_entity:"Kontakt",sensor_kind:"Sensor-Art",sensor_kind_contact:"Fensterkontakt (offen/zu)",sensor_kind_handle:"Griff-Sensor (offen/gekippt/zu)",sensor_kind_contact_tilt:"Kontakt + Kipp-Sensor",handle_entity:"Griff-Sensor",handle_main:"Griff-Sensor Hauptfl\xFCgel",leaf_main:"Hauptfl\xFCgel",leaf_second:"Zweiter Fl\xFCgel",tilt_entity:"Kipp-Sensor",tilt_angle_entity:"Kippwinkel-Sensor (\xB0, optional)",tilt_angle_max:"Winkel f\xFCr \u201Eganz gekippt\u201C (\xB0)",tilt_angle_offset:"Offset: Winkel bei geschlossenem Fenster (\xB0)",tilt_angle_invert:"Winkel z\xE4hlt andersherum",door_shut:"Ohne Sensor geschlossen zeigen",door_shut_hint:"Eine T\xFCr ohne Kontakt steht in 3D halb offen, damit man sie als T\xFCr erkennt. Mit Haken wird sie geschlossen gezeichnet \u2013 Haust\xFCr, Carport, Nebent\xFCr.",door_angle:"\xD6ffnungswinkel",door_angle_default:"Standard",door_angle_hint:"Wie weit das T\xFCrblatt aufgeht. Mit Sensor \xF6ffnet es so weit, sobald er \u201Eoffen\u201C meldet; ohne Sensor steht es so weit offen (statt halb). Standard bleibt wie bisher.",entity_auto:"Automatisch ({name})",entity_auto_none:"Automatisch (keiner gefunden)",entity_none:"Keiner",entity_search:"Tippen zum Suchen \u2026",opening_hint:"Sensor-Art: Fensterkontakt (meldet offen/zu), Griff-Sensor (meldet offen, gekippt und zu \u2013 z. B. Homematic-Fenstergriff) oder Kontakt + Kipp-Sensor (ein zweiter Sensor, der nur \u201Egekippt\u201C meldet). Automatisch nimmt Rolll\xE4den und Kontakte aus dem Bereich des Raums. Positions-Sensor: eine Entit\xE4t, die die Rollladen-Position auch w\xE4hrend der Fahrt meldet (z. B. Homematic \u201ELevel\u201C, 0\u2013100 % oder 0\u20131, offen = hoch) \u2013 dann f\xE4hrt der Rollladen in 3D live.",furniture:"M\xF6bel",furniture_add:"M\xF6bel hinzuf\xFCgen",studio_new:"Eigenes M\xF6bel bauen",studio_title:"M\xF6bel-Werkstatt",studio_title_edit:"M\xF6bel-Werkstatt: \xE4ndern",studio_hint:"W\xE4hle eine Vorlage, stell Ma\xDFe und Fronten ein und setz das M\xF6bel in den Plan. Es landet im Pack \u201EEigene M\xF6bel\u201C und l\xE4sst sich sp\xE4ter hier wieder \xE4ndern.",studio_kind:"Vorlage",studio_kind_cabinet:"Schrank",studio_kind_shelf:"Regal",studio_kind_lamp:"Lampe",studio_kind_device:"Ger\xE4t",studio_name:"Name",studio_width:"Breite (cm)",studio_depth:"Tiefe (cm)",studio_height:"H\xF6he (cm)",studio_doors:"T\xFCren",studio_drawers:"Schubladen",studio_shelves:"B\xF6den",studio_handle:"Griffe",studio_handle_bar:"Stangengriff",studio_handle_knob:"Knopf",studio_handle_none:"Grifflos",studio_base:"Unterbau",studio_base_plinth:"Sockel",studio_base_legs:"F\xFC\xDFe",studio_base_none:"Ohne",studio_back:"R\xFCckwand",studio_lamp:"Art",studio_lamp_floor:"Stehlampe",studio_lamp_table:"Tischlampe",studio_lamp_pendant:"Pendelleuchte",studio_lamp_wall:"Wandleuchte",studio_display:"Display vorne (zeigt den Mediaplayer)",studio_mount:"Steht",studio_mount_floor:"Auf dem Boden",studio_mount_surface:"Auf einem M\xF6bel",studio_mount_wall:"An der Wand",studio_color_body:"Korpus",studio_color_lamp_body:"Fu\xDF und Gestell",studio_color_front:"Fronten",studio_color_boards:"B\xF6den",studio_color_shade:"Schirm",studio_color_display:"Rahmen des Displays",studio_color_white:"Wei\xDF",studio_color_wood:"Holz",studio_color_metal:"Metall",studio_color_dark:"Dunkel",studio_color_glass:"Glas",studio_color_accent:"Akzent",studio_color_own:"Eigene Farbe",studio_color_plan:"Farbe des Plans",studio_place:"In den Plan setzen",studio_save:"\xC4nderung speichern",studio_open:"In der Werkstatt \xE4ndern",studio_error:"Speichern ging nicht: {detail}",studio_pack_name:"Eigene M\xF6bel",studio_pack_publisher:"M\xF6bel-Werkstatt",furniture_search:"M\xF6bel suchen \u2026",furniture_search_none:"Nichts gefunden. Versuch ein anderes Wort \u2013 deutsch oder englisch.",furniture_type:"M\xF6belst\xFCck",rotation:"Drehung (\xB0)",tilt_x:"Neigung vorn/hinten (\xB0)",tilt_z:"Neigung seitlich (\xB0)",strip_tilt:"Neigung um die L\xE4nge (\xB0)",strip_upright:"Senkrecht",strip_rise:"Steigung entlang der L\xE4nge (\xB0)",strip_upright_hint:"Der Streifen steht hochkant: Seine L\xE4nge l\xE4uft von der H\xF6he \xFCber Boden nach oben \u2013 am T\xFCrrahmen, als Lichts\xE4ule. Die Neigung legt einen liegenden Streifen an die Schr\xE4ge (90\xB0 = Fl\xE4che zeigt zur Seite).",rotate_left:"\u21BA 90\xB0",rotate_right:"\u21BB 90\xB0",height_m:"H\xF6he (m)",furn_sofa:"Sofa",furn_armchair:"Sessel",furn_table:"Tisch",furn_chair:"Stuhl",furn_bed:"Bett",furn_nightstand:"Nachttisch",furn_wardrobe:"Schrank",furn_shelf:"Regal",furn_kitchen:"K\xFCchenzeile",furn_worktop:"Arbeitsplatte",furn_fridge:"K\xFChlschrank",furn_fridge_smart:"Smart-K\xFChlschrank (Side-by-Side)",furn_door_left:"T\xFCrsensor links (Gefrierseite)",furn_door_right:"T\xFCrsensor rechts (K\xFChlseite)",fridge_hint:"Meldet ein T\xFCrsensor \u201Eoffen\u201C, schwingt die T\xFCr in 3D auf.",furn_stove:"Herd",furn_sink:"Sp\xFCle",furn_bathtub:"Badewanne",furn_shower:"Dusche",furn_wc:"WC",furn_washbasin:"Waschtisch",furn_desk:"Schreibtisch",furn_tv_board:"TV-Board",furn_plant:"Pflanze",furn_rug:"Teppich",furn_stairs:"Treppe",furn_stairwell:"Boden\xF6ffnung",stairwell_hint:"Ein Loch im Boden dieser Etage, zum Beispiel \xFCber dem Treppenaufgang oder f\xFCr eine Galerie; von oben sieht man hindurch. Die \xD6ffnung muss ganz in einem Raum liegen; mehrere \xD6ffnungen d\xFCrfen sich \xFCberlappen (zum Beispiel f\xFCr eine L-Form). Eine Treppe auf der Etage darunter, die bis hier hinauf reicht, \xF6ffnet den Boden auch von selbst.",tool_hole:"Boden\xF6ffnung",tool_stairs:"Treppe",hint_stairs:"Ziehen, wo die Treppe stehen soll \u2013 sie l\xE4uft entlang der langen Seite; Form, Drehrichtung und Bauart stellst du danach rechts ein",tool_roof:"Dach",tool_energy:"Energie",tool_wall:"Wand",hint_wall:"Ziehen, um eine einzelne Wand zu zeichnen (Raumteiler, halbe Wand) \xB7 Umschalt h\xE4lt sie gerade \xB7 Alt ohne Fangen",free_wall:"Wand",wall_length:"L\xE4nge (m)",wall_thickness:"Wandst\xE4rke (m)",wall_height:"H\xF6he (m)",wall_height_full:"Volle Raumh\xF6he",wall_slope:"Schr\xE4g",wall_slope_start:"H\xF6he am Anfang (m)",wall_slope_end:"H\xF6he am Ende (m)",wall_slope_hint:"Schr\xE4ge Wand: die Oberkante l\xE4uft gerade von der H\xF6he am Anfang der Wand (Ecke mit der kleineren Nummer) zur H\xF6he am Ende. Beide H\xF6hen d\xFCrfen \xFCber der Geschossh\xF6he liegen, zum Beispiel f\xFCr ein Pultdach-Zimmer mit hohen Oberlichtern.",wall_slope_off:"Wieder eine ebene Wand",wall_none:"Keine Wand",wall_none_hint:"Diese Wand ganz weglassen: f\xFCr offene Grundrisse, bei denen R\xE4ume baulich ein Raum sind, in Home Assistant aber getrennt.",edge_thickness:"Dicke (m)",wall_thickness_hint:"Dicke dieser Wand, z. B. 0,365 an einer dicken Au\xDFenwand oder 0,115 an einer leichten Trennwand. Eine Wand zwischen zwei R\xE4umen nimmt die dickere Angabe.",wall_thickness_reset:"Dicke wie im Haus eingestellt",wall_heights:"Wandh\xF6hen",wall_n:"Wand {a}\u2013{b}",wall_view:"Wandansicht",wall_view_hint:"Die Wand von vorne: T\xFCren, Fenster und M\xF6bel an ihr ziehen oder ihren Abstand eintippen.",wall_view_prev:"Vorige Wand",wall_view_next:"N\xE4chste Wand",wall_view_left:"Abstand links (m)",wall_view_height:"H\xF6he \xFCber Boden (m)",wall_part:"Teil {n}",wall_split_hint:"Wand hier teilen: Das Teilst\xFCck bekommt eine eigene H\xF6he, z. B. 2,5 m neben 1,7 m in einer Flucht",wall_split_at:"Teilpunkt ab Ecke (m)",wall_join_hint:"Teilpunkt entfernen: Das Teilst\xFCck w\xE4chst wieder mit dem davor zusammen",wall_exterior_short:"Au\xDFenwand",room_wall_hint:"Eine niedrigere H\xF6he macht aus der Wand eine Br\xFCstung oder Theke. Teilen sich zwei R\xE4ume die Wand, gilt die niedrigere Einstellung. Fenster und T\xFCren darin enden an der Wandh\xF6he.",free_wall_hint:"Eine frei stehende Wand, zum Beispiel ein Raumteiler. Trifft sie auf eine Raumwand, wird die Ecke verschnitten. Die Endpunkte ziehst du an den Griffen, die ganze Wand verschiebst du an der Linie.",free_wall_slope:"\u25E2 Schr\xE4g",free_wall_slope_hint:"Die Wand wird von einem Ende zum anderen h\xF6her oder niedriger: oben die H\xF6he am Anfang, hier die am Ende.",free_wall_height_end:"H\xF6he am Ende (m)",arc:"Bogen",arc_hint:"Biegt die Wand zu einem Bogen. Ein Nachbarraum an dieser Wand biegt sich mit, T\xFCren und Fenster wandern mit; R\xFCckg\xE4ngig nimmt den Bogen zur\xFCck.",arc_bulge:"W\xF6lbung (m)",arc_bulge_hint:"Wie weit sich die Wand in der Mitte w\xF6lbt: positiv nach au\xDFen, negativ in den Raum.",arc_apply:"Biegen",arc_too_wide:"Eine T\xFCr oder ein Fenster in dieser Wand ist f\xFCr diesen Bogen zu breit. Mach den Bogen flacher oder die \xD6ffnung schmaler.",stairwell_outside:"Diese \xD6ffnung ragt \xFCber eine Raumgrenze und wird deshalb nicht ausgeschnitten. Ziehe sie ganz in einen Raum oder verkleinere sie.",hint_hole:"Ziehen, um eine Boden\xF6ffnung aufzuziehen (Treppenaufgang, Galerie)",hint_roof:"Dachfl\xE4che aufziehen \xB7 antippen w\xE4hlt aus \xB7 ziehen verschiebt \xB7 Ecken \xE4ndern die Gr\xF6\xDFe",hint_energy:"Solarfeld antippen w\xE4hlt aus \xB7 ziehen verschiebt, auch auf eine andere Dachfl\xE4che \xB7 neue Felder rechts mit + Solarfeld",furn_parking:"Stellplatz",furn_group_vehicles:"Stellpl\xE4tze",parking_entity:"Sensor \u201EAuto anwesend\u201C",parking_vehicle:"Fahrzeug",parking_vehicle_none:"Keins",parking_no_pack:"Kein Fahrzeug-Pack importiert \u2013 Fahrzeuge kommen aus dem Pack \u201EFahrzeuge\u201C (Erweiterungen \u2192 M\xF6bel-Packs).",parking_scale:"Gr\xF6\xDFe (%)",parking_type_entity:"Fahrzeugtyp-Sensor (optional)",parking_types:"Zustand \u2192 Fahrzeug",parking_type_state:"Zustand (z. B. van)",parking_add_type:"+ Zuordnung",parking_hint:"Ohne Sensor steht das Fahrzeug immer da. Mit Sensor erscheint es, sobald der Sensor \u201Ean\u201C, \u201Ehome\u201C oder \u201Eanwesend\u201C meldet. Ein Fahrzeugtyp-Sensor (z. B. aus einer KI-Kameraauswertung) w\xE4hlt das Modell: Passt sein Zustand zu einer Zuordnung \u2013 auch als Wort im Text \u2013, wird dieses Fahrzeug gezeigt, sonst das Standard-Fahrzeug.",parking_too_tall:"Das Fahrzeug ({car} m) ist h\xF6her als der Raum ({room} m).",furn_lamp_ceiling:"Deckenleuchte",furn_lamp_downlight:"Einbauspot",furn_lamp_spot:"Aufbau-Spot",furn_lamp_panel:"LED-Panel",furn_lamp_uplight:"Deckenfluter",furn_lamp_bollard:"Wegleuchte",furn_lamp_garden:"Garten-Spot",furn_radiator:"Heizk\xF6rper",furn_robot_vacuum:"Saugroboter",furn_entity_vacuum:"Saugroboter",furn_entity_mower:"M\xE4hroboter",pet_room_sensor:"Raum-Sensor des Tiers (optional)",pet_room_hint:"Ein Sensor, der den Raum nennt, in dem das Tier gerade ist \u2013 Bermuda oder ESPresense mit einem Anh\xE4nger am Halsband: in 3D l\xE4uft es dann in diesem Raum herum.",furn_entity_water:"Ventil oder Schalter",device_temp:"Ger\xE4tetemperatur",device_temp_hint:"Ein Temperatursensor des Ger\xE4ts (Wechselrichter, Akku, PC \u2026): sein Wert steht am Pin in der 3D-Ansicht, ab 60 \xB0C ist der Pin hervorgehoben.",fridge_temp:"Temperatur K\xFChlteil",freezer_temp:"Temperatur Gefrierteil",fridge_temp_hint:"Der Pin zeigt die Temperaturen. \xDCber 8 \xB0C im K\xFChlteil oder \u221212 \xB0C im Gefrierteil leuchtet er als Warnung.",spray_reach:"Reichweite des Wassers (m)",spray_hint:"Solange das Ventil offen oder der Schalter an ist, spritzt der Sprenger Wasser in B\xF6gen um sich herum.",furn_robot_room:"Aktueller Raum (Sensor)",robot_cal_none:"Noch nicht kalibriert \u2013 ohne Bezug zur Karte bleibt die Fahrspur erfunden.",robot_cal_done:"Kalibriert: eine Rasterzelle misst {m} m.",robot_cal_do:"Von der jetzigen Position des Roboters kalibrieren",robot_cal_doing:"Tippe in den Plan, wo der Roboter gerade steht.",robot_cal_need:"Die Karte des Roboters meldet gerade keine Position \u2013 l\xE4uft die Integration?",robot_cal_hint:"Die Station ist der Anker: der Plan wei\xDF, wo sie steht, die Kamera wei\xDF, wo Roboter und Station in ihrem Raster liegen. Kennt die Karte R\xE4ume mit denselben Namen wie der Plan, reicht der Knopf \u201EAus den R\xE4umen kalibrieren\u201C. Sonst: Stell den Roboter mindestens 1,5 m entfernt ab \u2013 Reinigung pausieren \u2013 und tippe ihn im Plan an. Kommen die R\xE4ume spiegelverkehrt heraus, setze den Haken.",robot_cal_mirror:"Die Karte des Roboters ist gespiegelt (R\xE4ume kommen verkehrt heraus)",robot_cal_forget:"Kalibrierung entfernen",robot_cal_nudge:"Von Hand nachr\xFCcken: Pfeile schieben die Karte um 10 cm, \u27F2 \u27F3 drehen um 1\xB0, \u2212 + \xE4ndern die Gr\xF6\xDFe um 1 %.",robot_cal_nudge_move:"Karte verschieben",robot_cal_nudge_turn:"Karte drehen",robot_cal_nudge_grow:"Karte gr\xF6\xDFer oder kleiner",robot_cal_rooms:"Aus den R\xE4umen kalibrieren (die Karte kennt {n} R\xE4ume)",robot_cal_rooms_none:"Zu wenige R\xE4ume hei\xDFen im Plan so wie auf der Karte des Roboters ({n} gefunden, mindestens 2 n\xF6tig). Benenne die R\xE4ume gleich \u2013 oder kalibriere \xFCber die Position des Roboters.",robot_cal_rooms_bad:"Die gleichnamigen R\xE4ume liegen im Plan anders als auf der Karte des Roboters \u2013 ist ein Raum vertauscht? Kalibriere sonst \xFCber die Position des Roboters.",robot_hint:"Saugt der Roboter in Home Assistant, f\xE4hrt er in 3D in Bahnen durch den Raum, den er meldet (Sensor \u201EAktueller Raum\u201C, zugeordnet \xFCber den Raum- oder Bereichsnamen), sonst durch den Raum seiner Station. Ist die Karte des Roboters unten kalibriert, zeigt die Spur stattdessen, wo er wirklich gefahren ist; ohne sie sind die Bahnen erfunden. Zur\xFCck f\xE4hrt er zur Station.",furn_lamp_pendant:"Pendelleuchte",furn_ceiling_fan:"Deckenventilator",furn_fan_entity:"Ventilator",fan_hint:"Die Leuchte ist das Licht des Ventilators (leer lassen, wenn er keins hat). Der Ventilator wird im Raum gefunden oder hier gew\xE4hlt: In 3D drehen sich die Fl\xFCgel so schnell wie er l\xE4uft, sein Symbol schaltet ihn, Wischen hoch/runter \xE4ndert die Stufe, lange dr\xFCcken \xF6ffnet das Schnellmen\xFC. Die H\xF6he ist, wie weit er von der Decke h\xE4ngt (mehr = l\xE4ngere Stange).",room_ceiling:"Deckenh\xF6he",room_ceiling_tip:"Niedriger als das Stockwerk (ein Bad unter der Treppe) oder h\xF6her (ein Wohnzimmer offen bis unters Dach): Deckenleuchten, Ventilatoren, LED-Streifen und Ger\xE4te an der Decke h\xE4ngen dann hier, und die W\xE4nde des Raums sind so hoch.",room_ceiling_through:"Die Decke ({ceiling} m) liegt \xFCber der Etagenh\xF6he ({floor} m): Der Raum reicht in die Etage dar\xFCber, seine W\xE4nde wachsen mit, und die Etage dar\xFCber bleibt \xFCber ihm offen (Luftraum). Im Editor der oberen Etage ist die Fl\xE4che schraffiert.",room_floor_offset:"Bodenh\xF6he (m)",room_floor_offset_hint:"Liegt der Boden dieses Raums tiefer oder h\xF6her als die Etage (ein abgesenkter Eingang: \u22120,39), wandern Boden, W\xE4nde, T\xFCren und Fenster und was im Raum steht mit; die Decke bleibt. Die Stufen stellst du als Treppe dazu.",room_inner:"Innenma\xDF {w} \xD7 {d}",room_inner_hint:"Von Wand zu Wand gemessen: Innenw\xE4nde nehmen die H\xE4lfte ihrer Dicke, Au\xDFenw\xE4nde stehen au\xDFerhalb des Umrisses.",floor_heating:"Fu\xDFbodenheizung (optional)",floor_heating_hint:"Solange der Thermostat heizt (oder das Ventil offen, der Schalter an ist), gl\xFCht der Boden des Raums in 3D warm.",room_announce_speaker:"Lautsprecher f\xFCr Durchsagen",room_announce_quiet:"Ruhezeit f\xFCr Durchsagen",room_announce_hint:"Ohne Wahl spricht der Lautsprecher, der im Raum steht, sonst ein Sprachassistent, ein Echo oder ein Lautsprecher des Bereichs (nie ein Fernseher). In der Ruhezeit lassen Durchsagen an mehrere R\xE4ume diesen Raum aus; eine Durchsage nur f\xFCr ihn kommt trotzdem an.",ceiling_here:"Decke hier",ceiling_here_hint:"H\xF6he der Decke genau an dieser Stelle, z. B. bei einer Dachschr\xE4ge. Leer = Decke des Raums.",ceiling_slope:"An die Dachschr\xE4ge",ceiling_slope_hint:"Die Decke liegt hier unter der Dachschr\xE4ge: die Leuchte h\xE4ngt an deren Unterseite, genau \xFCber ihrem Platz.",furn_lamp_floor:"Stehlampe",furn_lamp_table:"Tischlampe",furn_lamp_wall:"Wandleuchte",furn_led_strip:"LED-Streifen",furn_group_lights:"Leuchten",furn_entity_light:"Licht oder Schalter",furn_color_entity:"Farbe und Helligkeit von (optional)",furn_color_entity_hint:"F\xFCr Lampen, die ein Relais (Shelly, Schaltaktor) ein- und ausschaltet, w\xE4hrend die Leuchte selbst Farbe und Helligkeit kennt: An/Aus kommt vom Schalter oben, Farbe und Helligkeit von dieser Entit\xE4t.",lamp_extra_light:"Leuchtmittel {n} (optional)",lamp_extra_hint:"Eine Leuchte mit mehreren Lichtern \u2013 Hauptlicht, Nachtlicht, Lichtring: Ist das Hauptlicht aus, leuchtet sie in 3D mit dem n\xE4chsten Licht, das an ist, etwas schw\xE4cher. Die Lichter schaltest du im Raumfenster einzeln.",furn_entity_climate:"Heizung (Thermostat)",lamp_hint:"Antippen in 3D schaltet die Leuchte, lange dr\xFCcken \xF6ffnet das Schnellmen\xFC. Auch Schalter (z. B. ein Relais f\xFCrs Deckenlicht) sind m\xF6glich \u2013 die Leuchte strahlt dann, solange er an ist. Tischlampen stehen automatisch auf dem M\xF6bel darunter.",lamp_hint_pendant:"H\xF6he = Abh\xE4ngung unter der Decke. Antippen in 3D schaltet, lange dr\xFCcken \xF6ffnet die Details.",theme:"Look",version_hint:"Installierte Version von NextFloor \u2013 Oberfl\xE4che; die Integration in Home Assistant meldet {backend}",accent:"Akzentfarbe",accent_hint:"Eigene Akzentfarbe: Linien und Leuchtkanten im Neon-Look, Kn\xF6pfe und Pins \u2013 \u21BA setzt das Neon-Cyan zur\xFCck",accent_reset:"Zur\xFCck zu Cyan",furn_colors_card:"M\xF6belfarben dieser Karte",furn_color_house:"Farbe des Hauses",theme_neon:"Neon",theme_blueprint:"Blueprint",theme_day:"Tag",theme_auto:"Auto",clock:"Uhr",clock_none:"Keine",clock_top_left:"Oben links",clock_top_right:"Oben rechts",clock_bottom_left:"Unten links",clock_bottom_right:"Unten rechts",glass_walls:"Glasw\xE4nde",glass_walls_hint:"Wie deckend die W\xE4nde sind, durch die man in die R\xE4ume schaut: links fast unsichtbar, rechts undurchsichtig. Gilt f\xFCr diesen Bildschirm.",screen_name:"Name dieses Bildschirms",screen_name_hint:"Durchsagen erscheinen auf jedem offenen NextFloor-Bildschirm. Mit einem Namen (z. B. \u201EFlur\u201C) kann eine Durchsage auch nur an diesen Bildschirm gehen. Ohne Haken bleibt dieser Bildschirm still.",announce_on:"Durchsagen auf diesem Bildschirm an",announce_muted:"Durchsagen auf diesem Bildschirm stumm",lock3d_on:"3D sperren (Drehen, Zoomen und Verschieben aus, Tippen geht weiter)",lock3d_off:"3D entsperren",walk:"Durchs Haus gehen",travel:"Zeitreise: die letzten 24 Stunden oder 7 Tage abspielen",travel_play:"Abspielen",travel_pause:"Anhalten",travel_loading:"Lade Verlauf \u2026",travel_failed:"Der Verlauf lie\xDF sich nicht laden.",travel_speed:"Tempo",travel_speed_min:"1 Min./s",travel_speed_10min:"10 Min./s",travel_speed_hour:"1 Std./s",travel_days:"Tage",travel_live:"Live",card_travel_button:"Taste f\xFCr die Zeitreise",walk_stop:"Gehen beenden",walk_hint:"Ziehen: umsehen \xB7 W A S D / Pfeile oder Stick: gehen \xB7 Mausrad: Schritt",card_walk_button:"Taste zum Durchgehen",card_lock_button:"Taste f\xFCr die 3D-Sperre",backdrop:"Eigener Hintergrund",backdrop_color:"Farbe",backdrop_image:"Bild (/local/\u2026 oder https://\u2026)",backdrop_dim:"Abdunkeln",backdrop_hint:"Statt des Himmels des Looks steht das Haus vor einer eigenen Farbe oder einem Bild. Ein Bild in /config/www ist unter /local/\u2026 erreichbar.",furnish:"Einrichten",split_3d:"3D daneben",plan_dims:"Ma\xDFe",plan_dims_hint:"Schreibt an jede Raumkante ihre L\xE4nge.",mount_height:"H\xF6he \xFCber Boden (m)",side_open:"Seitenleiste \xF6ffnen",side_close:"Schlie\xDFen",side_details:"Details zur Auswahl",side_pin:"Anheften",side_pinned:"Angeheftet",side_pin_hint:"Angeheftet bleibt die Seitenleiste immer offen; sonst klappt sie neben der 3D-Ansicht zu, solange nichts ausgew\xE4hlt ist",split_3d_hint:"Live-3D neben dem Plan: M\xF6bel und Ger\xE4te dort ziehen und drehen \u2013 mit R\xFCckg\xE4ngig, gespeichert wird mit dem Plan",size_w:"Breite (m)",size_d:"Tiefe (m)",size_h:"H\xF6he (m)",furnish_hint:"M\xF6bel, Leuchten und Ger\xE4te mit dem Finger ziehen \xB7 M\xF6bel rasten an W\xE4nden ein \xB7 antippen zum Drehen, f\xFCr H\xF6he und Montage",done:"Fertig",heatmap:"Heatmap",heat_off:"Normal",heat_short_temperature:"Temp.",heat_short_humidity:"Feuchte",heat_short_co2:"CO\u2082",heat_short_mould:"Schimmel",heat_short_power:"Strom",heat_short_comfort:"Komfort",heat_short_sun:"Sonne",heat_short_wifi:"WLAN",heat_short_values:"Werte",heat_temperature:"Temperatur",heat_humidity:"Luftfeuchtigkeit",heat_co2:"CO\u2082",heat_mould:"Schimmel",heat_power:"Stromverbrauch",heat_comfort:"Wohlf\xFChlwert",heat_sun:"Sonne heute",room_sun_hours:"{h} h Sonne heute ({facing})",open_since:"offen seit {time}",presence_now:"jemand da",presence_last:"zuletzt vor {time}",comfort_n:"Komfort {n}",empty_lights_hint:"{n} Licht an, seit {min} min niemand da.",empty_lights_off:"Licht aus",open_heating_hint:"{n} Fenster offen, w\xE4hrend die Heizung l\xE4uft.",open_heating_off:"Heizung aus",room_clean:"Reinigung (Skript oder Knopf)",room_clean_hint:"Ein Skript oder Knopf, der den Saugroboter in diesen Raum schickt (z. B. die Raumreinigung deiner Roboter-Integration). Das Raum-Panel zeigt dann \u201E\u{1F9F9} Saugen\u201C.",room_clean_run:"Saugen",room_clean_run_hint:"Schickt den Saugroboter in diesen Raum.",shade_hint:"Sonne auf {n} Fenstern bei {temp} \u2013 Rolll\xE4den senken?",shade_close:"Senken",room_sun_year:"Sonne \xFCbers Jahr",room_sun_year_hint:"Die Sonnenstunden durch die Au\xDFenfenster des Raums am 15. jedes Monats.",room_energy:"heute {today} \xB7 Monat {month}",room_energy_hint:"Aus der Statistik der Leistungssensoren der Ger\xE4te im Raum; die Kosten f\xFCr den Monat mit dem Tarif des Hauses.",heat_summer:"Sommer",heat_winter:"Winter",air_co2:"l\xFCften (CO\u2082)",air_humidity:"l\xFCften (feucht)",air_mould:"Schimmelgefahr \u2013 l\xFCften",room_curve_hint:"Die Temperatur des Raums in den letzten 24 Stunden",heat_values:"Werte am Raumnamen",heat_wifi:"WLAN",wifi_aps:"{n} Access Points \xB7 {clients} Ger\xE4te",wifi_network:"Netzwerk: {online} online \xB7 {offline} offline",wifi_none:"Stelle Access Points oder Router aus den Packs (Smart Home 2) auf und verkn\xFCpfe sie mit einer Entit\xE4t ihres Ger\xE4ts.",wifi_clients:"{n} Ger\xE4te",heat_none_found:"Keine passenden Sensoren in den Bereichen der R\xE4ume.",markers:"Symbole",markers_none:"Keine",markers_important:"Wichtige",markers_all:"Alle",furn_stool:"Hocker",furn_coffee_table:"Couchtisch",furn_tv_wall:"Fernseher (Wand)",furn_sideboard:"Sideboard",furn_table_round:"Runder Tisch",furn_bench:"Sitzbank",furn_corner_bench:"Eckbank",furn_bar_stool:"Barhocker",furn_kitchen_wall:"Oberschrank",furn_kitchen_tall:"Hochschrank mit Backofen",furn_island:"Kochinsel",furn_dishwasher:"Sp\xFClmaschine",furn_bunk_bed:"Etagenbett",furn_dresser:"Kommode",furn_washer:"Waschmaschine",furn_dryer:"Trockner",furn_office_chair:"B\xFCrostuhl",furn_tall_cabinet:"Hochschrank",furn_coat_rack:"Garderobe",furn_group_living:"Wohnen",furn_group_dining:"Essen",furn_group_kitchen:"K\xFCche",furn_group_sleeping:"Schlafen",furn_group_bath:"Bad & Hauswirtschaft",furn_group_work:"Arbeiten & Sonstiges",furn_group_energy:"Energie & Solar",energy_devices:"Ger\xE4te",wallbox_charging:"l\xE4dt",wallbox_plugged:"angesteckt",furn_soc:"Ladestand (%)",furn_export:"Einspeiseleistung (W, separater Sensor, optional)",furn_export_hint:"Meldet dein Z\xE4hler Bezug und Einspeisung in zwei Sensoren (z. B. Growatt, Tibber Pulse), nimm oben den Bezugs-Sensor als Leistung und hier den Einspeise-Sensor. Ein Sensor mit Vorzeichen braucht das nicht.",meter_parent:"H\xE4ngt an Z\xE4hler",meter_parent_none:"keinem (Hauptz\xE4hler)",meter_main:"Hauptz\xE4hler",meter_unmetered:"{w} ungemessen",meter_device_hint:"Steht das Ger\xE4t hinter einem Zwischenz\xE4hler (z. B. Balkonkraftwerk in einer Wohnung), z\xE4hlt seine Leistung zu dieser Wohnung. Der Zwischenz\xE4hler muss daf\xFCr in beide Richtungen messen (\u2212 = R\xFCckspeisung); z\xE4hlt er nur Bezug, f\xE4llt der Verbrauch der Wohnung bei \xDCberschuss zu hoch aus.",meter_sub_power:"Leistung des Zweigs (W, + = Bezug, \u2212 = R\xFCckspeisung)",meter_floors:"Versorgt die Etagen",meter_sub_hint:"Ein Zwischenz\xE4hler misst seinen Zweig, z. B. eine Wohnung. Ger\xE4te auf den angehakten Etagen h\xE4ngen in 3D an ihm statt am Hauptz\xE4hler; was der Hauptz\xE4hler dar\xFCber hinaus z\xE4hlt, steht als \u201EAllgemein (Rest)\u201C in der Bilanz.",furn_charge:"Ladeleistung (W, separater Sensor, optional)",furn_charge_hint:"Meldet dein Speicher Laden und Entladen in zwei Sensoren (z. B. Anker Solix), nimm oben den Entlade-Sensor als Leistung und hier den Lade-Sensor. Ein Sensor mit Vorzeichen braucht das nicht.",furn_wallbox_status:"Status (l\xE4dt, angesteckt)",charging_data:"Ladedaten",charging_card:"Ladestation als 3D-Kachel",charging_hint:"Verkn\xFCpfte Ladedaten erscheinen in der 3D-Kachel und im Raummen\xFC, auch ohne Leistungswert. Nicht verkn\xFCpfte Zeilen bleiben ausgeblendet. Zeitprofile und Integer-Aliase werden aus Symcon \xFCbernommen. Ohne Zeitprofil erkennt Automatisch Unix-Zeitstempel; numerische Ladezeiten ohne Einheit gelten als Sekunden. Die Formatwahl kann dies \xE4ndern. Die Werte dienen ausschlie\xDFlich der Anzeige.",charging_start:"Startzeit",charging_end:"Endzeit",charging_duration:"Ladezeit",charging_energy:"Geladene Energie",charging_lock:"Verriegelungsstatus",charging_time_format:"Zeitformat",charging_duration_unit:"Ladezeit-Einheit",charging_auto:"Automatisch",charging_value:"Symcon-Wert unver\xE4ndert",charging_seconds:"Sekunden",charging_minutes:"Minuten",charging_hours:"Stunden",charging_unix_seconds:"Unix-Zeit (Sekunden)",charging_unix_ms:"Unix-Zeit (Millisekunden)",energy_only_note:"\u26A1 Energie: Hier lassen sich nur Solarfelder und Energieger\xE4te verschieben, R\xE4ume und M\xF6bel sind gesperrt.",roof_only_note:"\u{1F3E0} Dach: Hier lassen sich nur Dachfl\xE4chen und Dachfenster verschieben, R\xE4ume und M\xF6bel sind gesperrt.",energy_devices_hint:"Stromz\xE4hler, Wechselrichter, Stromspeicher, Wallbox und Netzanschluss werden hier angelegt: auf der oben gew\xE4hlten Etage, im Grundriss verschiebbar. Mit Leistungssensor zeigen sie ihre Watt; der Z\xE4hler bekommt den Netzsensor, beim Strang w\xE4hlst du den Wechselrichter. Mehrere Wechselrichter und Speicher (etwa eine Balkonanlage dazu) gehen auch: Jeder bekommt seinen eigenen Sensor.",energy_routes:"Kabelwege",energy_routes_hint:"Wo ein Kabel wirklich l\xE4uft: Der Fluss folgt dann deinen Punkten statt eines Bogens quer durchs Haus. Ohne Weg bleibt es beim Bogen. Verbraucher behalten ihren Bogen.",route_conn_solar:"{name} \u2192 Wechselrichter",route_conn_battery:"Batterie \u2194 Haus",route_conn_inverter:"Wechselrichter \u2192 Haus",route_conn_grid:"Netz \u2194 Haus",route_conn_meter:"{name} \u2194 \xFCbergeordneter Z\xE4hler",route_conn_device:"{name} \u2194 Unterz\xE4hler",route_points:"{n} Punkte",route_none:"direkter Bogen",route_draw:"Weg zeichnen",route_redraw:"Neu zeichnen",route_drawing:"Tippe im Plan die Punkte an, durch die das Kabel l\xE4uft, vom einen Ende zum anderen; wechsle dazwischen das Geschoss, wo es durch die Decke geht. {n} Punkte.",route_undo:"Letzter Punkt",route_done:"Fertig",route_cable:"Als Kabel zeigen",route_cable_hint:"Zeichnet den Weg als sichtbares Kabel, nicht nur als feine Linie unter den Teilchen.",solar_fields:"Solarfelder",solar_hint:"Module aufs Dach legen: Sie liegen in der Neigung der Dachfl\xE4che, auf einem Flachdach stehen sie aufgest\xE4ndert. Im Grundriss l\xE4sst sich ein Feld mit der Maus verschieben.",solar_no_roof:"F\xFCr Solarfelder braucht das Haus ein Dach: unter Einstellungen ein Sattel- oder Flachdach, oder Dachabschnitte hier im Dach-Werkzeug.",solar_face_gone:"Dachfl\xE4che fehlt",solar_summary:"{n} Module \xB7 {kwp} kWp",solar_add:"Solarfeld",solar_field:"Solarfeld",solar_face:"Dachfl\xE4che",solar_rows:"Reihen",solar_cols:"Module pro Reihe",solar_portrait:"Hochformat",solar_landscape:"Querformat",solar_u:"Abstand vom Rand (m)",solar_v:"Abstand von der Traufe (m)",solar_tilt:"Neigung der Aufst\xE4nderung (\xB0)",solar_rack_ew:"Ost-West-Aufst\xE4nderung",solar_rack_ew_hint:"Jede zweite Reihe zeigt in die andere Richtung, die Paare stehen R\xFCcken an R\xFCcken \u2013 flach und dicht wie auf vielen Flachd\xE4chern.",solar_rack_tilt:"Aufst\xE4nderung (\xB0 zus\xE4tzlich)",solar_flip:"In die andere Richtung neigen",solar_partial:"nur {n} von {total} passen auf die Fl\xE4che",solar_form_hint:"Module, die \xFCber die Dachfl\xE4che hinausragen w\xFCrden, fallen weg. \u201EFl\xE4che f\xFCllen\u201C legt so viele Module aufs Dach, wie passen. kWp gerechnet mit 400 W je Modul.",solar_fit:"Fl\xE4che f\xFCllen",roof_windows:"Dachfenster",roof_window:"Dachfenster",chimneys:"Schornsteine",chimney:"Schornstein",chimney_shape:"Form",chimney_brick:"Gemauert",chimney_round:"Rund",chimney_wide:"Breit, zwei Z\xFCge",chimney_steel:"Edelstahlrohr",chimney_diameter:"Durchmesser (m)",chimney_depth:"Tiefe (m)",chimney_height:"H\xF6he \xFCber dem Dach (m)",chimney_hint:"Die H\xF6he z\xE4hlt ab der oberen Seite, wo der Schornstein aus dem Dach kommt. Im Grundriss und in der 3D-Ansicht l\xE4sst er sich verschieben, auch auf eine andere Dachfl\xE4che.",roof_windows_hint:"Dachfenster liegen in der Dachfl\xE4che, mit Rollladen und Kontakt wie normale Fenster. Im Grundriss lassen sie sich verschieben, auch auf eine andere Dachfl\xE4che.",roof_window_tilt:"Kippkontakt",roof_window_name:"Name (optional)",roof_window_motor:"Fenstermotor (Cover, optional)",roof_window_motor_hint:"Ein Fenstermotor (Velux, Roto, Fakro) meldet seine Position als Cover: Der Fl\xFCgel \xF6ffnet in 3D so weit, wie der Motor steht. Ein Kontakt oder Kippkontakt geht weiterhin ohne Motor.",roof_window_hint:"Offen klappt der Fl\xFCgel oben angeschlagen nach au\xDFen, gekippt ein St\xFCck, und der Rahmen leuchtet warm; der Rollladen f\xE4hrt von oben \xFCber die Scheibe. In einer Dachfl\xE4che schneidet das Fenster ein Loch in die Schr\xE4ge, so sieht das Dachgeschoss hinaus.",solar_ground:"Frei aufgest\xE4ndert (Garten, Garagendach \u2026)",solar_add_ground:"Frei aufgest\xE4ndert",solar_base:"H\xF6he der Aufstellfl\xE4che (m, 0 = Boden)",solar_add_wall:"An der Wand",solar_wall:"Wand",solar_v_wall:"H\xF6he \xFCber dem Boden (m)",solar_tilt_wall:"Neigung von der Wand (\xB0, 90 = Vordach)",solar_flip_wall:"Unten abstehend statt oben",solar_rotation:"Drehung (\xB0)",solar_name:"Name",solar_name_hint:"z. B. Strang 1 S\xFCd",solar_module_w:"Modulbreite (m)",solar_module_h:"Modulh\xF6he (m)",solar_wp:"Modulleistung (Wp)",solar_string:"Strang",solar_strings:"Str\xE4nge",solar_string_none:"Kein Strang",solar_string_new:"Neuer Strang",solar_string_n:"Strang {n}",solar_string_name:"Name des Strangs",solar_string_entity:"PV-Leistung des Strangs",solar_string_inverter:"Wechselrichter",solar_string_inverter_none:"Kein Wechselrichter gew\xE4hlt",inverter_strings:"Str\xE4nge an diesem Wechselrichter: {names}",inverter_strings_none:"Noch kein Strang an diesem Wechselrichter \u2013 zuordnen beim Solarfeld unter Strang \u203A Wechselrichter.",solar_string_inverter_missing:"Noch kein Wechselrichter im Plan (unten bei Ger\xE4te anlegen)",solar_string_hint:"Felder im selben Strang geh\xF6ren zusammen, auch auf verschiedenen D\xE4chern (z. B. 5 Module auf dem Haus und 5 auf der Garage). Sensor und Wechselrichter gelten f\xFCr den ganzen Strang.",solar_string_sum:"{fields} Felder \xB7 {n} Module \xB7 {kwp} kWp",solar_face_size:"Dachfl\xE4che {w} \xD7 {h} m (entlang der Traufe \xD7 die Schr\xE4ge hoch)",solar_cols_hint:"Eine Zahl f\xFCr gleich lange Reihen, oder eine Liste f\xFCr Reihen eigener L\xE4nge: \u201E4, 4, 3\u201C (von der Traufe aus).",solar_align_left:"Links",solar_align_center:"Mitte",solar_align_right:"Rechts",solar_look_black:"Full Black",solar_look_blue:"Blau",solar_pick:"Module einzeln an/aus",solar_pick_all:"Alle wieder an",solar_pick_hint:"Tippe im Grundriss auf ein Modul, um es wegzunehmen oder wieder dazuzunehmen. Weggenommene sind gestrichelt.",solar_entity:"PV-Leistung dieses Feldes (z. B. sein Strang)",solar_main:"Hauptdach",solar_section:"Abschnitt {n}",solar_flat:"Flachdach",compass_n:"Nord",compass_ne:"Nordost",compass_e:"Ost",compass_se:"S\xFCdost",compass_s:"S\xFCd",compass_sw:"S\xFCdwest",compass_w:"West",compass_nw:"Nordwest",furn_meter:"Stromz\xE4hler",furn_grid_point:"Netzanschluss",grid_point_hint:"Hier steht der Netzanschluss: der \xDCbergabepunkt zum Stromanbieter, zum Beispiel am Ende der Einfahrt. Im Grundriss verschiebbar.",furn_model:"Modell",inverter_std:"Standard (Wandger\xE4t mit Display)",inverter_slim:"Schmal und hoch (Lichtleiste)",inverter_hybrid:"Hybrid (Rund-Display, L\xFCfter)",battery_std:"Turm (gestapelte Module)",battery_wall:"Wandspeicher (flach, h\xE4ngend)",battery_cube:"Kompakt (Balkonspeicher)",furn_inverter:"Wechselrichter",furn_home_battery:"Stromspeicher",furn_wallbox:"Wallbox",furn_heating_manifold:"Heiz-/K\xFChlkreisverteiler",furn_buffer_tank:"Pufferspeicher",furn_freshwater_station:"Frischwasserstation",furn_entity:"Ger\xE4t (Schalter, Steckdose \u2026)",furn_state_entity:"Zustand von (optional)",furn_state_entity2:"Zweiter Zustand (andere H\xE4lfte)",furn_tap:"Antippen des M\xF6bels",furn_tap_default:"Wie \xFCblich",furn_tap_hint:"Eine eigene Aktion wie bei den eigenen Kn\xF6pfen des Sternmen\xFCs, z. B. ein browser_mod-Popup mit deiner Karte.",furn_show_when:"Nur zeigen, solange \u2026",furn_show_when_state:"\u2026 im Zustand (leer = an)",furn_show_when_invert:"Umgekehrt: zeigen, solange es nicht so ist",furn_show_when_hint:"Saison-Deko, die nur im Dezember steht: ein Helfer (input_boolean), ein Kalender oder ein Sensor entscheidet, ob das M\xF6bel in 3D erscheint. Mehrere Zust\xE4nde mit Komma trennen. Im Editor bleibt es immer sichtbar.",picture_upload:"Foto hochladen",picture_replace:"Anderes Foto hochladen",picture_stored:"Ein eigenes Foto ist gespeichert.",picture_url:"\u2026 oder Bild-Adresse",picture_entity:"\u2026 oder Bild einer Entit\xE4t",picture_border:"Passepartout (%)",picture_fit:"Foto",picture_fit_cover:"f\xFCllt den Rahmen",picture_fit_contain:"ganz zu sehen",picture_hint:"Dein Foto im Rahmen, in 3D und auf dem Wandtablet. Hochgeladene Fotos werden verkleinert mit dem Plan gespeichert; eine Bild-Entit\xE4t (z. B. Foto des Tages) oder eine Kamera zeigt ihr aktuelles Bild.",furn_state_split:"H\xE4lften",furn_state_left_right:"Links / rechts",furn_state_top_bottom:"Unten / oben (Hochbett)",furn_state_hint:"Das M\xF6bel leuchtet, solange die Entit\xE4t an, belegt oder zu Hause meldet \u2013 ein Bett mit Belegungsmatte, ein Sessel, die Sauna. Zwei Entit\xE4ten beleuchten die H\xE4lften: links und rechts, beim Hochbett unten und oben.",furn_entity_tv:"Fernseher (Media-Player oder Steckdose)",fix:"Fixieren",unfix:"L\xF6sen",fix_hint:"Fixiert: l\xE4sst sich nicht mehr versehentlich verschieben (Taste L, Rechtsklick oder langes Dr\xFCcken)",fixed_drag_hint:"\u{1F512} Fixiert \u2013 zum Verschieben erst l\xF6sen (Schloss im Formular, Rechtsklick oder Taste L)",fixed_delete_confirm:"Dieses Element ist fixiert. Trotzdem l\xF6schen?",lock_plan:"\u{1F512} Grundriss",lock_plan_hint:"Grundriss sperren: R\xE4ume, W\xE4nde, T\xFCren, Fenster und Au\xDFenfl\xE4chen lassen sich nicht mehr versehentlich verschieben. M\xF6bel und Ger\xE4te bleiben frei.",start_view:"Startansicht",start_view_hint:"Mit dieser Ansicht \xF6ffnen 3D-Ansicht, Karte und Kiosk das Haus, zum Beispiel von der Gartenseite. Drehe, zoome und verschiebe das Haus in der 3D-Ansicht rechts, bis es passt, und merke sie dir dann.",start_view_card:"Soll eine Karte eine andere Ansicht haben: diese Zeile in ihre YAML-Konfiguration \xFCbernehmen.",start_view_set:"Aktuelle 3D-Ansicht als Start merken",start_view_reset:"Standard",start_view_saved:"Eine eigene Startansicht ist gespeichert.",ctx_rotate:"Drehen 90\xB0",devices_placed_in:"in {room}",devices_narrow:"{n} weitere \u2013 Suche eingrenzen",climate:"Raumklima",climate_temperature:"Temperatur",climate_humidity:"Luftfeuchte",climate_co2:"CO\u2082",climate_hint:"Diese Sensoren gelten f\xFCr die Heatmap und das Raumfenster. \u201EAutomatisch\u201C nimmt die Sensoren des Bereichs und die im Raum platzierten, aber keine Ger\xE4tetemperaturen (3D-Drucker, W\xE4rmepumpe, Vorlauf \u2026).",climate_more:"\u2026 und noch ein Sensor (Mittelwert)",plan_locked:"Grundriss gesperrt",plan_lock:"Grundriss sperren",plan_unlock:"Grundriss entsperren",opening_mark:"Markieren in 3D",opening_mark_open:"Wenn offen",opening_mark_closed:"Wenn geschlossen (z. B. WC)",opening_mark_hint:"Ein markiertes Fenster oder eine markierte T\xFCr leuchtet warm. \u201EWenn geschlossen\u201C braucht einen Kontakt; ohne Sensor wird nichts markiert.",window_opens:"\xD6ffnet",window_opens_turn:"Dreh-Kipp (nach innen)",window_opens_slide:"Schiebend (Schiebefenster, Hebe-Schiebet\xFCr)",window_opens_top:"Klappfenster (unten nach au\xDFen)",window_opens_hint:"Schiebend: Der Fl\xFCgel auf der Seite des Scharniers gleitet vor den festen; zweifl\xFCgelig gleiten die beiden mittleren nach au\xDFen. Klappfenster \xF6ffnen mit dem Kontakt oder einem Kippsensor.",marker_show:"Symbol in 3D",marker_show_hint:"Automatisch folgt dem Schalter Keine / Wichtige / Alle in der 3D-Ansicht. Immer zeigen und Ausblenden gelten unabh\xE4ngig davon (au\xDFer bei Keine).",pin_shift:"Pin verschieben",pin_shift_up:"\u2191 H\xF6he",pin_shift_hint:"Stehen Ger\xE4te dicht beieinander, schiebst du den Pin hier ein St\xFCck zur Seite oder nach oben (in Metern); das Ger\xE4t selbst bleibt, wo es ist.",marker_show_auto:"Automatisch",marker_show_always:"Immer zeigen",marker_show_no_power:"Ohne Watt",marker_show_active:"Nur wenn aktiv",marker_show_never:"Ausblenden",marker_icon:"Eigenes Symbol (Material-Design-Icon)",device_name:"Eigener Name (optional)",show_name:"Name unter dem Symbol in 3D zeigen",card_marker_names:"Eigene Namen an den Symbolen",card_marker_names_hint:"Jedes Ger\xE4t mit eigenem Namen zeigt ihn klein unter seinem Symbol \u2013 drei Thermometer im Garten bleiben unterscheidbar.",card_tap_in_room:"Ger\xE4te nur im ge\xF6ffneten Raum schalten",card_tap_in_room_hint:"In der Haus- und Stockwerksansicht \xF6ffnet ein Antippen das Stockwerk oder den Raum, auch auf einem Ger\xE4t oder seinem Symbol. Im ge\xF6ffneten Raum schaltet es das Ger\xE4t. Langes Dr\xFCcken \xF6ffnet immer sein Men\xFC oder seine Details.",card_markers_outside:"Symbole au\xDFerhalb des ge\xF6ffneten Raums w\xE4hlen",card_markers_outside_hint:"Im Haus, auf dem Stockwerk und in den anderen R\xE4umen nur die angehakten Arten; im ge\xF6ffneten Raum alle wie oben eingestellt. \u201EImmer\u201C und \u201ENie\u201C am Ger\xE4t gehen vor.",marker_kind_light:"Lichter",marker_kind_cover:"Rolll\xE4den",marker_kind_climate:"Heizung",marker_kind_media:"Medien",marker_kind_switch:"Schalter",marker_kind_fan:"Ventilatoren",marker_kind_lock:"Schl\xF6sser",marker_kind_binary:"Kontakte und Melder",marker_kind_sensor:"Sensoren",marker_kind_tap:"M\xF6bel mit Aktion",marker_kind_other:"Sonstige",device_name_hint:"Ein Name f\xFCr den Plan und das Raumfenster, z. B. \u201EDekolicht Kochinsel\u201C \u2013 die Entit\xE4t in Home Assistant bleibt, wie sie ist.",device_simple:"Im Raumfenster nur schalten",device_simple_hint:"Der Raumdialog zeigt f\xFCr diese Lampe nur den Schalter, ohne Helligkeit, Farbtemperatur und Farben.",floor_turn:"90\xB0 drehen",floor_shift_all:"Alle Etagen mitnehmen (ganzes Haus)",floor_shift_all_hint:"Verschieben und Drehen wirken auf alle Etagen samt Dachfl\xE4chen, Au\xDFenfl\xE4chen, Energieger\xE4ten und Z\xE4hler \u2013 das ganze Haus wandert als Ganzes.",floor_turn_hint:"Dreht alles auf der Etage um 90\xB0 im Uhrzeigersinn um die Mitte der R\xE4ume \u2013 wenn eine Etage verdreht gezeichnet wurde. Dreimal = 270\xB0.",marker_icon_hint:"Name eines Material-Design-Icons wie bei Home Assistant, z. B. mdi:thermometer oder mdi:water-alert. Leer = Symbol nach Ger\xE4teart.",furn_power:"Leistungssensor (W)",furn_links_hint:"Mit Leistungssensor zeigt das M\xF6bel seine Watt und nimmt am Energiefluss teil.",furn_links_hint_tv:"Der Bildschirm leuchtet, solange der Fernseher an ist, in der Farbe der App (Netflix, YouTube \u2026); das Schild zeigt App oder Titel.",stairs_hint:"Die Treppe steigt nach hinten an (weg von der markierten Vorderkante) und \xF6ffnet die Decke der Etage dar\xFCber.",stair_shape:"Form",stair_shape_straight:"Gerade",stair_shape_quarter:"Viertelgewendelt",stair_shape_l:"L mit Podest",stair_shape_half:"Halbgewendelt",stair_shape_u:"U mit Podest",stair_shape_spiral:"Wendeltreppe",stair_turn:"Laufrichtung (beim Hinaufgehen)",stair_turn_left:"Links herum",stair_turn_right:"Rechts herum",stair_build:"Bauart",stair_build_solid:"Massiv (Beton)",stair_build_stringer:"Wangentreppe",stair_build_mono:"Holmtreppe (Mittelholm)",stair_build_cantilever:"Kragarm (schwebend)",stair_risers:"Setzstufen",stair_steps:"Steigungen",stair_run_width:"Laufbreite (m)",stair_landing_after:"Stufen bis zum Podest",stair_landing_hint:"Das Podest liegt {h} cm \xFCber dem Boden; der Rest der Stufen kommt danach.",stair_rail:"Gel\xE4nder",stair_rail_none:"Keins",stair_rail_left:"Links",stair_rail_right:"Rechts",stair_rail_both:"Beidseitig",stair_down:"F\xFChrt nach unten",stair_down_hint:"Die Treppe beginnt auf dieser Etage und f\xFChrt hinunter, zum Beispiel in einen Keller, der nicht gezeichnet sein muss. Sie \xF6ffnet den Boden dieser Etage.",stair_measures:"{steps} Steigungen \xE0 {rise} cm \xB7 Auftritt {going} cm \xB7 Schrittma\xDF {measure} cm",stair_uncomfortable:"unbequem (Schrittma\xDF 59\u201365 cm, Steigung h\xF6chstens 21 cm)",stair_up_note:"Die Treppe beginnt an der markierten Vorderkante. Die Decke der Etage dar\xFCber \xF6ffnet sich nur dort, wo \xFCber den Stufen keine 2,2 m Kopfh\xF6he bleiben.",stair_down_note:"Man betritt die Treppe an der markierten Vorderkante und geht hinunter. Im Plan ist sie gestrichelt; der Boden dieser Etage \xF6ffnet sich \xFCber den Stufen.",stair_opening:"Decken\xF6ffnung",stair_opening_headroom:"Nach Kopfh\xF6he (nur wo n\xF6tig)",stair_opening_full:"\xDCber der ganzen Treppe",stair_opening_none:"Keine (Luke, geschlossener Schacht)",stair_opening_hint:"Wie weit die Treppe den Boden \xF6ffnet, den sie erreicht: die Etage dar\xFCber, oder bei einer Treppe nach unten die eigene. Nach Kopfh\xF6he \xF6ffnet nur \xFCber den Stufen, \xFCber denen keine 2,2 m bleiben.",stair_up_note_plain:"Die Treppe beginnt an der markierten Vorderkante und steigt nach hinten an.",stair_upgrade:"Form einstellen",stair_upgrade_hint:"Macht daraus eine Treppe mit Form (gewendelt, L, U, Wendel), Bauart, Gel\xE4nder und Stufenzahl.",floor_lights:"{n} Licht an",floor_open:"{n} offen",floor_persons:"{n} Pers.",energy_consumption:"Verbrauch",energy_grid_import:"Netzbezug",energy_grid_export:"Einspeisung",energy_solar:"Solar",energy_battery:"Akku",energy_tariff:"Tarif",energy:"Energie",energy_meter:"Z\xE4hlerplatz",energy_grid:"Netz (W, + = Bezug)",energy_solar_sensor:"Solar-Erzeugung (W)",energy_battery_sensor:"Akku-Leistung (W, + = Entladen)",energy_battery_soc:"Akku-Ladestand (%)",energy_tariff_sensor:"Tarif (z. B. \u20AC/kWh)",energy_gas:"Gasz\xE4hler (optional)",energy_water:"Wasserz\xE4hler (optional)",energy_meters_hint:"Gas und Wasser stehen bei der Hausbilanz \u2013 in der Energieleiste und auf der Hauskarte: ein Sensor mit dem Durchfluss jetzt (m\xB3/h, l/min) oder dem Z\xE4hlerstand von heute.",energy_gas_short:"Gas",energy_water_short:"Wasser",energy_invert:"Vorzeichen umkehren",energy_hint:"Verbraucher sind platzierte Ger\xE4te mit Leistungssensor (W) \u2013 der Sensor selbst oder einer vom selben Ger\xE4t.",energy_balance:"Energiebilanz",energy_balance_hint:"Netz, Solar und Akku kommen von den Ger\xE4ten im Plan: Stromz\xE4hler, Wechselrichter und Stromspeicher. Hier kannst du andere Sensoren w\xE4hlen, Vorzeichen umkehren und den Hausverbrauch angeben.",energy_rest:"Allgemein (Rest)",energy_advanced:"Erweiterter Energiemodus",energy_advanced_on:"Zwischenz\xE4hler nutzen",energy_show_unmetered:"Ungemessenen Verbrauch am Zwischenz\xE4hler zeigen",energy_show_unmetered_hint:"Das Schild eines Zwischenz\xE4hlers zeigt dann den Verbrauch seiner Etagen und wie viel davon kein platziertes Ger\xE4t misst, z. B. \u201E500 W \xB7 450 W ungemessen\u201C. Sonst zeigt es den Z\xE4hlerwert.",energy_advanced_hint:"F\xFCr Zwischenz\xE4hler, z. B. je Wohnung hinter einem Hauptz\xE4hler: Ein Stromz\xE4hler kann dann an einem anderen h\xE4ngen und eigene Etagen versorgen. Aus = der erste Z\xE4hler ist der Netzanschluss, weitere sind Verbraucher.",energy_consumption_sensor:"Hausverbrauch (W, sonst aus der Bilanz)",energy_import_prefs:"Aus dem Energie-Dashboard \xFCbernehmen",energy_import_done:"{n} Sensoren \xFCbernommen \u2013 bitte die Vorzeichen pr\xFCfen.",energy_import_none:"Im Energie-Dashboard sind keine passenden Leistungssensoren (W) zu finden \u2013 bitte von Hand w\xE4hlen.",energy_import_failed:"Das Energie-Dashboard von Home Assistant ist nicht eingerichtet.",tool_meter:"Z\xE4hler",hint_meter:"Auf die Stelle des Z\xE4hlers tippen",presence:"Anwesenheit",ble:"Bluetooth-Ortung",ble_hint:"Orte einen Bluetooth-Tag (Schl\xFCsselanh\xE4nger, Uhr, Handy) raumgenau: Du l\xE4ufst mit ihm durch die R\xE4ume und nimmst jeden Raum auf. NextFloor vergleicht danach, wie stark ihn die Bluetooth-Scanner von Home Assistant (ESPHome-Proxys, Shelly-Ger\xE4te mit eingeschaltetem Bluetooth, Adapter am Server) h\xF6ren. Je Tag entsteht ein Sensor mit dem Raumnamen als Zustand.",ble_unavailable:"Die Bluetooth-Integration von Home Assistant l\xE4uft nicht. Ohne sie gibt es keine Scanner.",ble_scanners:"{n} Bluetooth-Scanner in Home Assistant. Je mehr Scanner in verschiedenen R\xE4umen, desto genauer.",ble_add:"Tag oder Ger\xE4t hinzuf\xFCgen",ble_trackers:"Handys und Uhren (Private BLE Device)",ble_devices:"Gefundene Bluetooth-Ger\xE4te",ble_name:"Name (optional)",ble_refresh:"Liste neu laden",ble_add_button:"Hinzuf\xFCgen",ble_learn:"R\xE4ume lernen",ble_close:"Schlie\xDFen",ble_spots:"{n} Aufnahmen",ble_now:"Jetzt",ble_unknown:"unbekannt",ble_none_heard:"Kein Scanner h\xF6rt den Tag gerade. Halte ihn nah an einen Scanner und warte kurz; ein Tag sendet nur alle paar Sekunden.",ble_no_address:"Dieses Handy oder diese Uhr hat gerade keine bekannte Adresse. Pr\xFCfe in Home Assistant die Integration \u201EPrivate BLE Device\u201C.",ble_one_scanner:"Nur ein Scanner h\xF6rt den Tag. Zum Unterscheiden von R\xE4umen braucht es mindestens zwei, besser drei oder mehr.",ble_learn_room:"Raum aufnehmen",ble_record:"Aufnehmen ({s} s)",ble_recording:"Nimmt auf \u2026 noch {s} s",ble_forget_room:"Raum vergessen",ble_learn_hint:"W\xE4hle den Raum, dr\xFCcke Aufnehmen und geh mit dem Tag in der Hand langsam durch den ganzen Raum, auch in die Ecken. Aufnehmen erneut ersetzt den Raum. Lerne alle R\xE4ume, in denen du den Tag orten willst.",ble_sensor_hint:"Der Sensor \u201E{name}\u201C (Ger\xE4t NextFloor) zeigt den Raum. Unter Anwesenheit kannst du ihn als Raum-Sensor einer Person w\xE4hlen.",presence_hint:"Raumsensor je Person (z. B. ESPresense, Bermuda): sein Zustand nennt den Raum oder Bereich.",presence_sensor:"Raumsensor",presence_room:"Standardraum",presence_room_none:"\u2013 keiner \u2013",presence_add:"Weitere Entit\xE4t (Hilfsschalter, Tracker)",no_persons:"In Home Assistant gibt es keine Personen."},Yh={view:"3D",editor:"Editor",all_floors:"All floors",outside_area:"Outside",outside_area_hint:"All devices outside at a glance: in the garden, outside the rooms, and what belongs to Outside (a weather station on the roof, say).",device_outside:"Belongs to Outside",device_outside_hint:"The device does not count for the room under it (a weather station on the roof) and is listed in the Outside panel.",no_building:"No floor plan yet.",no_building_admin:"No floor plan yet. Draw your first floor in the editor.",no_rooms_admin:"The floors exist, but there is no room yet. Walls alone are not enough: draw at least one room in the editor with \u201CRectangle\u201D or \u201CFree form\u201D.",open_editor:"Open editor",loading:"Loading \u2026",load_error:"Loading failed",saving:"Saving \u2026",saved:"Saved",save_error:"Saving failed",save_failed_detail:"Saving failed: {error}. Your changes are kept in this browser.",needs_restart:"A new version of NextFloor ({frontend}) is installed, but Home Assistant still runs {version}. Please restart Home Assistant \u2013 until then saving may fail.",needs_reload:"This page still shows NextFloor {frontend}, Home Assistant already has {backend}. Please reload the page; in the companion app: Settings \u2192 Companion app \u2192 Reset frontend cache.",reload_page:"Reload",symcon_variables_reload:"Reload variables",symcon_cover_position:"Blind position",climate_card:"Room climate as a floating card",climate_card_hint:"Shows temperature, humidity and CO\u2082 over this room. Toggle them with \u201CCards\u201D in the 3D view.",climate_card_missing:"No current readings",furniture_power_card:"Power as a floating 3D card",furniture_power_card_hint:"Shows the power reading above this furniture, even without a linked switch. The card remains visible at 0 W. Logged variables offer a trend button. Use the Cards switch to show or hide floating cards together.",climate_illuminance:"Illuminance",device_values:"Additional values",device_value:"Data point",device_value_add:"Add value",device_value_remove:"Remove value",device_value_icon:"Symbol",device_value_label:"Label (optional)",device_values_hint:"Use + to select additional data points, such as several temperatures or other readings. Symbols can be emoji or short characters such as \u{1F321}, \u{1F4A7}, \u2601 or \u26A1. Values appear on the device and in the room panel.",cover_tilt_entity:"Slat position",cover_direction_invert:"Reverse blind in 3D",cover_tilt_direction_invert:"Reverse slats in 3D",cover2_direction_invert:"Reverse second blind in 3D",cover2_tilt_direction_invert:"Reverse second blind slats in 3D",cover_direction_hint:"Reversal affects only the 3D appearance. Numeric values, sliders and control commands stay unchanged: a received value of 0 is still displayed as 0, and a chosen value of 0 is sent as 0.",cover2_tilt_entity:"Slat position (second blind)",symcon_variables_loading:"Loading variables \u2026",symcon_variables_loaded:"Variables and object tree reloaded.",symcon_variables_error:"Could not reload variables: {error}",needs_restart_old:"A new version of NextFloor is installed, but Home Assistant still runs an older one. Please restart Home Assistant \u2013 until then saving fails.",draft_found:"Unsaved changes from {time} found.",draft_restore:"Restore and save",draft_discard:"Discard",walls_auto:"Tall walls",walls_cut:"Cut",walls_slope:"Sloped",walls_slope_hint:"Walls cut on a slope: half height in front, full height at the back \u2013 like a doll's house, turns with the camera",walls_solid:"Solid",walls_solid_hint:"Solid walls in their colours instead of glass (colours: editor \u2192 settings, per room in the room)",wall_paint_outside:"Wall colour outside",wall_paint_inside:"Wall colour inside",furn_color_body:"Furniture colour body",furn_color_wood:"Furniture colour wood",furn_color_fabric:"Furniture colour fabric",furn_color_white:"Furniture colour white",furn_color_metal:"Furniture colour metal",furn_color_dark:"Furniture colour dark",furn_color_hint:"Furniture is built from a few materials, the pieces from the furniture builder and the packs too. Here each material gets a colour for the whole house; a card can set its own. They show most in the Neon look; Day and Blueprint only tint with them.",wall_paint_room:"Wall colour inside (this room)",wall_paint_floor:"Wall colour outside (this floor)",wall_paint_hint:"Used in the 3D view \u201CSolid\u201D.",wall_paint_default:"Default",card_solid_walls:"Solid walls (in their colours)",reset_view:"Overview",back:"Back",floor:"Floor",floors:"Floors",add_floor:"Add floor",floor_from_ha:"Floors from Home Assistant:",floor_empty:"Empty floor",level:"Level {n}",ha_floor:"Floor in Home Assistant",floor_layer:"Layer (can be shown and hidden)",floor_power:"Floor meter (power)",floor_power_hint:"A power sensor for this floor alone (a sub-meter, a flat). Its value shows on the floor label and, in this floor's view, on the house card with its share of the house's use.",floor_power_share:"{n} % of the house",living_area:"Living area {living}",room_living:"Counts as living area",living_area_none:"No living area \xB7 floor {floor}",living_area_low:"Living area {living} (floor {floor}, of which {low} below 2 m)",living_area_hint:"Counted like the German Wohnfl\xE4chenverordnung: the floor inside the walls, in full from 2 m clear height, half between 1 and 2 m (under slopes), not at all below 1 m. A guide value, not a survey.",living_area_floor:"Living area: {floor}",living_area_floor_house:"Living area of this floor: {floor} \xB7 whole house: {house}",print_plan:"Print plan / PDF",print_plan_hint:"Every floor as a clean plan with measurements and areas, and a table of the areas \u2013 to print, or save as PDF from the print dialog.",print_title:"Floor plan",print_room:"Room",print_floor_area:"Floor area",print_living:"Living area",print_low:"below 2 m",print_total:"Total",print_blocked:"The print window was blocked \u2013 please allow pop-ups for Home Assistant.",check_open:"Check the plan",note:"Note",note_add:"Note here",note_text:"Text",note_placeholder:'e.g. "change the filter" or "fuse 12"',note_due:"Due on",note_height:"Height above the floor (m)",note_height_hint:"Where the pin floats in the 3D view: 1.3 m is eye level, higher for something under the ceiling (a shutoff valve, a hatch).",note_photo_upload:"Add a photo",note_photo_hint:"The photo shows when the note is tapped in the 3D view, e.g. what the valve looks like.",note_due_hint:"From that day on the pin turns orange.",note_is_due:"This note is due.",keys_title:"Editor keys",keys_undo:"Undo",keys_redo:"Redo",keys_duplicate:"Duplicate the room",keys_delete:"Delete the selection",keys_nudge:"Move the selection one grid step",keys_nudge_10:"\u2026 by 10 cm",keys_nudge_1:"\u2026 by 1 cm",keys_rotate:"Turn furniture by 90\xB0 (Shift: back)",keys_lock:"Fix or free furniture, a device or a roof section",keys_close_shape:"Close the free shape",keys_escape:"Cancel, leave the tool, clear the selection",keys_straight:"While drawing: straight lines",keys_sheet:"This sheet",tour_title:"First steps",tour_1_title:"Draw the rooms",tour_1:'Draw the rooms with "{rect}" or "{free}"; the walls come by themselves. Give each room its Home Assistant area \u2013 then NextFloor finds its devices. With areas already set up, "{rooms}" in the floor form adds them all at once.',tour_2_title:"Doors and windows",tour_2:'"{opening}" puts them on a wall. Link their contact or blind \u2013 in 3D they then open and close with it, and open windows tell you.',tour_3_title:"Furniture and devices",tour_3:'"{furniture}" opens the library \u2013 or build your own pieces in the \u{1F6E0}\uFE0F furniture studio. Select a room and the devices of its area are listed below, ready to place; lamps then shine in the colour of their light.',tour_4_title:"Look and check",tour_4:'"{split}" shows your house while you draw; at the top you switch to the 3D view. "{check}" lists what is still missing \u2013 and ? shows the keys at any time.',tour_next:"Next",tour_back:"Back",tour_done:"Let's go",tour_skip:"Skip",check_open_hint:"Lists what is missing or off in the plan, with a fix in one tap.",check_title:"Plan check",check_all_good:"All good \u2013 nothing found.",check_hint:"{n} points found. Blue buttons change the plan (undo works as always), the others show the place.",check_room_no_area:'"{room}" has no Home Assistant area: its devices are not found.',check_room_no_area_named:'"{room}" has no area \u2013 the free area "{area}" has the same name.',check_areas_unplaced:"{n} areas of this floor have no room yet: {names}",check_devices_unplaced:'"{room}": {n} devices of the area are not in the plan yet.',check_rooms_overlap:'"{a}" and "{b}" overlap.',check_opening_off_wall:'A door or window in "{room}" is not on a wall.',check_entity_missing:"{n} device pins point to entities Home Assistant no longer knows ({ids}).",check_furniture_entity_missing:"A piece of furniture is linked to {id} \u2013 that entity no longer exists.",check_battery_low:"Battery low: {name} ({level} %)",battery_low_n:"Battery low: {names}",check_standby:"{name} draws {w} W while off \u2013 about {cost} a year.",check_fix_show:"Show",check_fix_ignore:"Ignore",check_show_devices:"Look at the {n} devices",check_ignore_all:"Ignore all {n}",check_reset_ignored:"Check the {n} ignored devices again",check_fix_set_area:'Link "{area}"',check_fix_add_rooms:"Add the rooms",check_fix_place:"Place {n}",check_fix_remove:"Remove {n}",floor_layer_hint:"This floor is no storey but a layer \u2013 all the trees or the decoration, say. The 3D view shows an eye at the top that shows or hides it on each device.",no_ha_floor:"\u2013 none \u2013",area_rooms:"Add rooms from HA areas ({n})",area_rooms_hint:"Adds a room (4 \xD7 3 m) for each area of this floor \u2013 then drag it into place and adjust the corners",floor_name:"Name",elevation:"Elevation (m)",floor_shift:"Shift the floor (m)",floor_shift_apply:"Shift",floor_shift_hint:"Moves every room, furniture item, device, outdoor area, free wall and the background image of this floor by X and Z. Roof sections stay.",height:"Ceiling height (m)",cut_height:"Cut height (m)",delete_floor:"Delete floor",floor_copy:"Duplicate floor",floor_copy_hint:"The copy goes on top of the house with all rooms, walls, doors and windows. Rooms and the floor lose their link to Home Assistant, furniture its entities; energy devices stay on the old floor.",floor_copy_furniture:"Take the furniture along",floor_copy_devices:"Take the device pins along",floor_copy_devices_hint:"The same entity then shows on both floors.",floor_copy_outdoor:"Take the outdoor areas along",floor_copy_make:"Make the copy",floor_copy_name:"{name} (copy)",furn_to_floor:"Move to floor",furn_to_floor_hint:"The item moves to the same spot on the chosen floor.",delete_floor_confirm:"Delete floor \u201C{name}\u201D with all its rooms?",move_up:"Move up",move_down:"Move down",default_floor:"Ground floor",new_floor:"Floor {n}",tool_select:"Select",tool_rect:"Rectangle",tool_polygon:"Free shape",undo:"Undo",redo:"Redo",fit:"Show all",room:"Room",rooms:"Rooms",room_name:"Name",area:"Area",no_area:"No area",sub_area_add:"+ Area within the room",sub_area_hint:"A part of the room with a Home Assistant area of its own but no walls \u2013 a reading corner, a shelf, a kitchenette in the living room. Its devices and sensors belong to this room.",material:"Floor",x:"X (m)",z:"Y (m)",width:"Width (m)",depth:"Depth (m)",points:"Corners",delete_point:"Delete corner",duplicate:"Duplicate",delete:"Delete",new_room:"Room {n}",settings:"Settings",pendant_shape:"Shape",pendant_shade:"Shade",paint_colour:"Paint colour",pendant_globe:"Globe",pendant_cone:"Cone",pendant_drum:"Drum",sofa_shape:"Shape",sofa_straight:"Straight",sofa_l:"L-shaped (mirror: other side)",sofa_u:"U-shaped",pkg_open:"Furnish \u2026",pkg_hint:"Furniture goes against the room's walls; lamps link to the area's lights. Adjust single items afterwards \u2013 Ctrl+Z takes it all back.",pkg_done:"{n} items placed \u2013 Ctrl+Z takes it back.",pkg_kitchen_row:"Kitchen row",pkg_kitchen_row_desc:"Row on the back wall with fridge, oven, sink, dishwasher and stove, wall cabinet, dining table with pendant",pkg_kitchen_l:"L-shaped kitchen",pkg_kitchen_l_desc:"Rows at the back and left, kitchen island with bar stools",pkg_bath:"Bathroom",pkg_bath_desc:"Washbasin, WC, bathtub, washing machine, downlight",pkg_bedroom:"Bedroom",pkg_bedroom_desc:"Double bed with two nightstands, wardrobe, chest of drawers, ceiling light",pkg_living:"Living room",pkg_living_desc:"TV board, sofa, coffee table, rug, armchair, shelf, floor lamp, plant",pkg_dining:"Dining room",pkg_dining_desc:"Table with four chairs, sideboard, pendant",pkg_office:"Office",pkg_office_desc:"Desk with office chair, two shelves, ceiling light",pkg_kids:"Kids' room",pkg_kids_desc:"Single bed, desk, shelf, rug",pkg_hall:"Hall",pkg_hall_desc:"Coat rack, two downlights",spots_place:"Place spots",spots_type:"Lamp",spots_cols:"Columns (left\u2013right)",spots_rows:"Rows (front\u2013back)",spots_add:"Place {n} lamps",spots_placed:"{n} lamps placed.",spots_hint:"All lamps follow the chosen light (e.g. spots on one dimmer). Afterwards each can be moved and linked to another light like any furniture.",cancel:"Cancel",backup:"Backup",backup_history:"Restore points",share_view:"Share a view",share_view_hint:"Saves the house as a small file that opens in any browser without Home Assistant (through NextFloor's online demo) \u2013 to show it to family or a planner. Without devices and entities, like a template.",share_view_title:"Our home in NextFloor",share_view_needs_js:"This page needs JavaScript and an internet connection.",share_view_file:"view",share_view_done:"View saved \u2013 open the file in a browser or pass it on.",version_save:"Save this state \u2026",version_save_hint:'Keeps the plan under a name ("before the renovation"). Named states stay when the automatic restore points go.',version_name_prompt:'Name for this state (e.g. "before the renovation"):',version_saved:'State "{name}" saved.',version_compare:"Compare",version_delete_confirm:'Delete "{name}"?',version_same:"No difference to the plan.",version_diff_n:"{n} differences to the plan as it is now:",diff_floor_added:'Floor "{name}" added',diff_floor_removed:'Floor "{name}" removed',diff_room_added:'Room "{name}" added',diff_room_removed:'Room "{name}" removed',diff_room_renamed:'"{detail}" is now called "{name}"',diff_room_reshaped:'"{name}" reshaped ({detail} m\xB2)',diff_opening_added:"{name} added ({detail})",diff_opening_removed:"{name} removed ({detail})",diff_furniture_added:"{name} added",diff_furniture_removed:"{name} removed",diff_furniture_moved:"{name} moved or changed",diff_device_added:"Device {name} placed",diff_device_removed:"Device {name} removed",diff_device_moved:"Device {name} moved",backup_none:"None yet. While editing, a restore point is kept at most every 10 minutes.",backup_summary:"{rooms} rooms, {furniture} items",backup_restore:"Restore",backup_restore_confirm:"Restore the state of {time}? The current state is kept as a restore point.",backup_restored:"Restored.",backup_file:"File",backup_export:"Export",backup_export_share:"Share as template",backup_export_share_hint:"Without areas, devices, sensors and images \u2013 for passing on to others.",backup_import:"Import \u2026",backup_import_confirm:"Replace the whole plan with the file? The current state is kept as a restore point.",backup_import_error:"The file is no NextFloor plan ({error}).",backup_imported:"Imported.",backup_hint:"Background images are not part of the file.",backup_full:"Full backup",backup_full_export:"Back up everything (plan, pictures, packs)",backup_full_import:"Restore a full backup \u2026",backup_full_hint:"One file with the plan, every background and screen picture and the installed packs. On restore every pack is checked again; the licence key is not included.",backup_full_confirm:"Replace the plan, the pictures and the packs with the backup? The current state stays as a restore point.",backup_full_not_backup:"This is not a full NextFloor backup.",backup_full_restored:"Backup restored: {packs} packs, {pictures} pictures.",backup_full_skipped:"Skipped (could not be read): {packs}.",export_name_full:"full",device_confirm:"Ask before switching",device_confirm_hint:"A tap in 3D, the quick menu and the room panel ask first. A double tap on the room leaves this device out.",cover_confirm_hint:"Open, close and positions ask first in the quick menu and the room panel, and a swipe on the marker no longer moves the blind (it turns the view instead). Stop never asks.",blind_kind:"Kind of blind",blind_roller:"Roller shutter outside",blind_venetian:"Venetian blind with slats",blind_inside:"Roller blind inside",cover2_entity:"Second blind (right half)",cover_my:'Favourite position "My" (%, 0 = none)',cover_my_go:"To the favourite position ({p} %)",blind_hint:`A venetian blind turns its slats in 3D with the cover's tilt; a roller blind inside hangs behind the glass. A wide window can have a second blind for its right half. The favourite position shows as "My" in the quick menu: a blind with positions moves there, a Somfy RTS motor without feedback goes to its own My on stop.`,confirm_switch:"Really switch {name}?",lock_confirm_unlock:"Really unlock {name}?",gang_switch_one:"Switches",furn_cover_entity:"Moves with",furn_cover_hint:"The curtain, screen, awning or gate follows this cover entity (blind, curtain, awning, gate) and travels with it. A tap opens its menu (up, stop, down).",furn_cover_inverted:"Reverse the direction",furn_cover_inverted_hint:"For an awning or curtain that moves the opposite way in the plan than in reality: out then shows in, and the other way round.",gang_switch:"Button {n} switches",gang_socket_one:"Socket powered by",gang_socket:"Socket {n} powered by",gang_switch_hint:"A button glows while its light is on (in its colour). A tap switches it; with several buttons a small menu asks which. The same entity may sit on several switches.",gang_socket_hint:"A socket glows green while its switch is on \u2013 brighter the more it draws. A tap switches it; with several, a small menu asks which.",lock_confirm_lock:"Lock {name}?",opening_lock:"Smart lock",opening_lock_hint:"A tap on the door locks or unlocks it (always asking first). While it is unlocked, its edge glows.",split_handle_hint:"Drag: width of the plan and the 3D view",wall_exterior:"Exterior wall (m)",wall_interior:"Interior wall (m)",grid:"Grid (m)",units:"Show lengths in",units_metric:"Metres",units_imperial:"Feet and inches",units_hint:"How lengths and areas appear in the plan, the forms and the wall view. Inputs stay in metres.",background:"Template (floor plan image)",background_upload:"Choose image \u2026",background_width:"Width in plan (m)",background_opacity:"Opacity",background_rotation:"Rotation (\xB0)",background_edit:"Move, scale and turn",background_edit_done:"Done",background_edit_hint:"While the mode is on: dragging the picture moves it, the handle at the bottom right scales it. Fit the picture to the scale first, then turn it.",background_remove:"Remove template",hint_select:"Tap a room to select \xB7 drag corners \xB7 \u201C+\u201D on an edge inserts a corner \xB7 arrow keys nudge \xB7 Del deletes \xB7 Ctrl+Z",hint_rect:"Drag to draw a rectangle",hint_polygon:"Place corners \xB7 tap the first corner or press Enter to close \xB7 Esc cancels",hint_empty:"Add a floor first.",area_m2:"{a} m\xB2",overlap_warning:"Rooms overlap \u2013 walls there are incomplete.",read_only:"Only administrators can edit the floor plan.",side_failed:"This form could not be shown ({error}). The plan stays usable. Please report the text in a GitHub issue.",mat_wood:"Wood",mat_oak:"Oak",mat_tiles:"Tiles",mat_carpet:"Carpet",mat_stone:"Stone",mat_concrete:"Concrete",card_name:"NextFloor",card_description:"Your home in 3D (neon).",stats:"{calls} draw calls \xB7 {tris} triangles",stats_fps:"{fps} fps (slowest frame {ms} ms)",stats_idle:"At rest (0 fps)",stats_busy_floors:"floors",stats_busy_openings:"doors/windows",stats_busy_flash:"flash",stats_busy_roof:"roof",stats_busy_flow:"power flow",stats_busy_effect:"colour effect",stats_busy_robot:"robot",stats_busy_orbit:"camera turn",stats_busy_tint:"room tint",stats_low:"tablet level, pixel ratio {r}",stats_full:"full level, pixel ratio {r}",floors_apart:"Apart",floors_stacked:"Stacked",roof_keep:"Roof stays",roof_keep_hint:"The roof stays on the house while zooming in instead of lifting and fading out",floor_rooms_one:"1 room",floor_rooms:"{n} rooms",quality:"Quality",quality_auto:"Auto",quality_low:"Tablet",quality_high:"High",state_on:"On",state_off:"Off",state_open:"Open",state_closed:"Closed",state_opening:"Opening",state_closing:"Closing",state_playing:"Playing",state_paused:"Paused",state_idle:"Idle",state_locked:"Locked",state_unlocked:"Unlocked",state_detected:"Detected",state_clear:"Clear",state_unavailable:"Unavailable",state_heat:"Heat",state_cool:"Cool",state_auto:"Auto",state_heat_cool:"Heat/cool",state_dry:"Dry",state_fan_only:"Fan",devices:"Devices",devices_none_area:"Link the room to an area and its devices appear here.",devices_none:"The area has no suitable devices.",devices_place_all_n:"Place all {n} \u2026",devices_place_all_confirm:"Put {n} devices into the room at once? (Ctrl+Z or \u201CUndo\u201D takes them all back in one step.)",devices_src_area:"This area",devices_src_other:"Other areas",devices_src_none:"No area",panel_hide:"Hide from the room panel",panel_unhide:"Show in the room panel again",panel_state_hide:'Hide the state in the room panel (e.g. a cover that only reports "unknown")',panel_state_show:"Show the state in the room panel again",devices_place:"Place",devices_remove:"Remove",devices_hint:"Placed devices appear in 3D. Drag them in the plan to move them.",panel_lights:"Lights",panel_covers:"Covers",panel_climate:"Heating",panel_media:"Media",panel_switches:"Switches",panel_sensors:"Sensors",panel_scenes:"Scenes & scripts",panel_announce:"\u{1F4E2} Announcement",announce_placeholder:"Your own message \u2026",announce_send:"Say it",announce_sent:'Said: "{message}"',announce_failed:"Announcement failed: {error}",announce_phrase_1:"Dinner is ready!",announce_phrase_2:"Time for bed!",announce_phrase_3:"Please come down!",announce_phrase_4:"We are leaving soon!",announce_phrase_5:"The dog needs to go out!",state_recording:"Recording",state_streaming:"Streaming",panel_all_off:"All off",readable:"Easy to read",readable_hint:"Stronger contrast and larger text \u2013 for wall tablets and anyone who reads better that way.",plain:"Floor plan only",plain_hint:"Shows only walls, doors, windows and stairs, without furniture. Devices and their pins stay.",right_back:"Right click = back",right_back_hint:"A short right click in the 3D view goes one step back: from the room to the floor, from the floor to the house (like a double tap on empty space). Dragging with the right button still pans the view.",stl:"3D print (STL)",stl_hint:"Saves the house as an STL file (walls, floors, furniture and outdoor areas of every floor) for 3D printing, at 1:100 (one metre becomes 10 mm). Windows, lights and the roof are not in it; a slicer repairs the file if needed.",card_plain:"Floor plan only",card_rooms:"Only these rooms",card_rooms_hint:"The card shows only the ticked rooms with their furniture, devices, doors and windows (for a tablet in the kitchen, say). Nothing ticked: the whole plan.",card_templates:"Card templates",card_templates_hint:"Set up a dashboard card once here (with the card's own settings) and give just its name on each tablet: `template: kitchen_tablet`. Changes here reach every card that uses the template; what stands on the card itself wins over the template.",template_name:"New template (name)",template_add:"Create template",template_reload:"Reload screens with this template",template_reload_all:"Reload all screens",template_use:"On the dashboard card: `template: {name}`",card_template:"Card template",card_template_none:"none (this card only)",card_readable:"Easy to read",all_off_n:"Everything off ({n})",all_off_hint:"Switches off the room's lights, switches, fans and media; it can be undone for ten seconds.",all_off_done:"Everything off.",all_off_undo:"Undo",all_off_floor:"Everything off on {floor} ({n} devices), undo for ten seconds",mood_save:"Save mood",mood_save_hint:`Keeps how the room's lamps shine right now as a mood \u2013 a tap on it sets them again later, "\u2192" carries it to another room.`,mood_new:"Mood",mood_set:"Set this mood",mood_carry:"Carry over to another room",panel_all_on:"All on",view_options:"View: quality, look, markers, FPS",panel_all_open:"All up",panel_all_close:"All down",central:"Central: all lights, blinds and favourites",central_house:"Whole house",central_lights:"Lights",central_covers:"Blinds",central_on:"On",central_off:"Off",central_open:"Up",central_close:"Down",central_sure:"Sure?",central_favorites:"Favourites",central_no_favorites:'No favourites yet. Set scenes, scripts and switches in the editor under "Favourites".',card_central:"Star with the central menu",card_central_hint:"All lights and blinds of the floor or the house and the favourites from the editor.",favorites:"Favourites",favorites_hint:"Scenes, scripts, automations, buttons and switches for the central menu (star) of the 3D view \u2013 party, presence simulation, shading, watering.",favorites_add:"Add a favourite",favorite_floor:"Which floor this favourite shows on",favorite_all_floors:"All floors",outside_hidden:"Outside: hide devices",outside_hidden_hint:"Devices the Outside panel should not show (they stay in the plan).",outside_hidden_add:"Hide a device",outside_view_hint:"View for Outside: turn the 3D preview to the garden and use it. Opening Outside then flies the camera there.",outside_view_set:"Use this view for Outside",outside_view_reset:"Reset the Outside view",room_facts:"Room panel: facts shown",room_fact_sun:"Sun hours",room_fact_comfort:"Comfort",room_fact_air:"Airing hint",room_fact_circuits:"Circuits",background_handles_hint:'The picture now has handles like a piece of furniture: drag moves it, the lower right corner scales it, the round handle on top turns it (Shift for 15\xB0 steps). When it fits, tap "Done" \u2013 then it stays put.',background_fixed_hint:'The picture stays put, you can draw over it. To adjust it, tap "Move, scale and turn".',bg_level:"Straighten",bg_level_cancel:"Cancel straightening",bg_level_first:"Tap the start of a wall in the picture that should run straight (horizontal or vertical).",bg_level_second:"Now tap the end of that wall \u2013 the picture turns to fit.",bg_ruler:"Scale with a ruler",bg_ruler_cancel:"Cancel the ruler",bg_ruler_first:"Tap the start of a stretch of known length in the picture \u2013 e.g. a dimensioned wall.",bg_ruler_second:"Now tap the end of the stretch.",bg_ruler_length_hint:"Measured in the plan: {m} m. Enter the real length and the picture is scaled to fit.",bg_ruler_length:"Real length (m)",bg_ruler_apply:"Apply the scale",thumbs_fold:"Fold the floor pictures into buttons",thumbs_show:"Show the floor pictures again",room_start_view:"View as this room's start",room_start_view_hint:"When you tap the room in 3D, the camera flies to exactly the view the 3D pane on the right shows now \u2013 angle, zoom and framing. Turn on 3D beside first, turn and zoom in on the room, then tap.",room_start_view_reset:"Remove the room's start view (from above again)",room_start_view_need_pane:'Turn on "3D beside" first, then turn and zoom the room the way it should open.',floor_start_view:"View as this floor's start",floor_start_view_hint:"This floor opens in 3D the way the 3D pane on the right stands right now \u2013 e.g. the ground floor from the front and the upper floor from the back. Turn on 3D beside first, turn it, then tap.",floor_start_view_reset:"Remove the floor's start view (like the house again)",floor_start_view_need_pane:'Turn on "3D beside" first and turn the floor the way it should open.',ambilight:"Glow behind the TV (%)",ambilight_hint:"How strongly it glows behind the TV while it plays. 0 switches it off (for example if you have LED strips on the TV), 100 is the usual strength.",sound_rings:"Sound rings (%)",sound_rings_hint:"How large the rings around the speaker grow while it plays. 0 switches them off, the picture and the glow stay; 100 is the usual size. The size also follows the speaker's volume: quieter means smaller.",glow_scale:"Glow in 3D (%)",light_effects:"Effect animations in 3D",light_effects_hint:"Map exact HA effect names only. Unmapped effects keep the static HA colour. Changes nothing in Home Assistant.",light_effects_enabled:"Allow animations for this lamp",light_effect_unmapped:"Unmapped (static)",light_effect_add:"Add exact effect name",light_effect_name_limit:"The exact effect name must contain 1 to 255 characters. It will not be shortened.",light_effect_count_limit:"At most 100 mappings. Remove an existing entry first.",light_effect_exists:"This effect name is already mapped. Its existing mapping is preserved.",light_animation_none:"Static",light_animation_rainbow:"Rainbow (replaces colour)",light_animation_pulse:"Pulse (intensity)",light_animation_flicker:"Flicker (intensity)",glow_scale_hint:"How strongly the lamp glows in 3D: below 100 % tones down bright LED strips so the room does not burn out; above 100 % makes a weak lamp glow more. Switches nothing in Home Assistant.",vehicle_to_spot:"Turn into a parking spot",vehicle_to_spot_hint:"A vehicle as plain furniture always stands there. As a parking spot it appears only while a sensor reports the car, and that is where the car device is linked (charge, range, lock, climate).",as_furniture:"Show as furniture",as_furniture_hint:"Replaces the pin by a furniture item in the same place, linked to this device \u2013 a speaker for a media player, a lamp for a light. Ctrl+Z takes it back.",as_furniture_pick:"Pick furniture \u2026",as_device:"Back to a device pin",as_device_hint:"Replaces the furniture by the plain pin of its device in the same place.",presets:"Stations and playlists (Sound)",presets_hint:`Shown in every speaker's quick menu under "Play", next to the player's sources. For an Echo (Alexa Media Player): type SPOTIFY, AMAZON_MUSIC or TUNEIN and as content what you would say ("Rock Antenne"). For Sonos, Music Assistant and others: type music or url with a stream address or a URI.`,preset_type:"Type",preset_type_hint:"media_content_type of play_media, e.g. music, url, playlist, SPOTIFY, AMAZON_MUSIC, TUNEIN",preset_content:"Content",preset_content_hint:"media_content_id: stream URL, URI (spotify:playlist:\u2026) or, for Alexa, a search phrase",preset_speakers:"Only on these speakers (none = on all)",media_play:"Play",media_pause:"Pause",media_previous:"Previous",media_next:"Next",media_volume:"Volume",media_sources:"Sources",preset_add:"Station or playlist",own_buttons:"Own buttons",own_buttons_hint:"Shown in the central menu (star) below the favourites: open a dashboard path, show an entity's details, call a service, or open a browser_mod popup with your own card.",own_alerts:"Own warnings",circuits:"Fuse box",circuits_hint:'The circuits with the rooms they feed. The room panel names them, and the search finds them ("F12").',circuit_name:"Name",circuit_new:"New circuit",circuit_add:"Add a circuit",circuit_add_room:"Add a room",own_alerts_hint:'A line in the warning bar of the 3D view while an entity is in a state \u2013 "Water tank empty" from the robot vacuum, "Dishwasher done". Several states with commas; for numbers <20 or >80.',own_alert_entity:"When \u2026",own_alert_state:"\u2026 is in state (empty = on)",own_alert_text:"\u2026 then this warning",own_alert_color:"Colour",own_alert_tap:"A tap",own_alert_tap_info:"opens the details",own_alert_tap_toggle:"switches the entity",own_alert_tap_room:"jumps to the room",own_alert_house:"Whole house",own_alert_new:"New warning",own_alert_add:"Add a warning",today:"Today",tomorrow:"Tomorrow",today_days:'Days on the "Today" card',today_days_one:"Today only",today_days_n:"{n} days",forecast:"Weather forecast",forecast_hint:'A small card with the next days of the weather entity (settings): the weather, high and low, and rain. It sits in a top corner of the 3D view, top right below the "Today" card.',forecast_days:"Forecast",forecast_off:"Off",forecast_corner:"Corner",today_none:"Nothing on today.",today_calendars:'Calendars for "Today"',today_calendars_hint:'The appointments of these calendars show top right in the 3D view on the "Today" card, with the bins collected today or tomorrow. A tap on its title folds the card.',own_button_state:"Lights up while \u2026 is on (optional)",own_button_label:"Label",own_button_action:"Action",own_button_new:"New button",own_button_add:"Own button",own_action_navigate:"Open a path",own_action_more_info:"Entity details",own_action_service:"Call a service",own_action_fire_dom_event:"fire-dom-event (browser_mod)",own_target_navigate:"Path",own_target_more_info:"Entity",own_target_service:"Service (domain.service)",own_data:"Data (JSON)",own_data_hint:`For a service its data, for fire-dom-event the event's content, e.g. {"browser_mod": {"service": "browser_mod.popup", "data": {\u2026}}}.`,own_data_bad:"Not a valid JSON object.",panel_no_area:"This room is not linked to an area. You can link it in the editor.",panel_empty:"No devices of this room are in the plan. In the editor, place devices or pick them for the room panel with \u2606.",close:"Close",panel_fold:"Fold away (the room stays in view)",panel_unfold:"Open again",brightness:"Brightness",color_temp:"Colour temperature",color:"Colour",position:"Position",cover_open:"Open",cover_stop:"Stop",cover_tilt:"Slats",cover_tilt_open:"Slats open",cover_tilt_close:"Slats closed",cover_close:"Close",target_temp:"Target",current_temp:"Current",temp_down:"Cooler",temp_up:"Warmer",volume:"Volume",play_pause:"Play/pause",previous:"Previous",next:"Next",run:"Run",details:"Details",hold_hint:"Tap toggles \xB7 long press opens details",tool_opening:"Doors & windows",tool_furniture:"Furniture",qm_off:"Off",find:"Search",find_placeholder:"Where is \u2026? Device or room",find_none:"Nothing found",swipe_off:"Off",panel_pin:"Show in the room panel",panel_unpin:"Don't show in the room panel",devices_panel_hint:"The room panel shows the devices in the plan. \u2606 adds a device to the room panel without placing it.",card_section_view:"View",card_size:"Size",card_size_fixed:"Fixed height",card_size_fill:"Fill the screen",card_fill_hint:"Works best in a dashboard view of the type \u201CPanel (single card)\u201D \u2013 the card then takes all the space.",card_controls:"Switches in the card",card_floor_thumbs:"Floors as miniatures",card_floor_thumbs_hint:"Small pictures of the floors at the side \u2013 tap one to switch",card_floor_thumbs_hint_start:"The chosen floor is then where the card starts \u2013 the pictures at the side switch to the others",card_room_names:"Show room names",card_section_kiosk:"Wall tablet (kiosk)",card_section_features:"Features",card_weather_plan:"as set in the plan",card_pro_hint:"Motion trail and camera wall belong to the cameras: the trail shows the last half hour, the wall every camera of the plan.",card_idle_return:"Back to the start view after",card_idle_off:"Never",card_idle_min:"{n} min without a touch",card_idle_hint:"After the wait the card closes the room and shows the start view again.",card_night:"Night dimming",card_night_off:"Off",card_night_sun:"By the sun",card_night_time:"Time range",card_night_range:"Time range (e.g. 22:00-06:00)",card_idle_orbit:"Camera turn as screensaver",card_idle_orbit_hint:"After the return the view turns slowly until someone touches the tablet",card_dashboard:"Button to a dashboard (path)",card_dashboard_label:"Label of the button",card_dashboard_hint:"A button at the top right of the card opens the dashboard or view with this path, e.g. /lovelace/home or /dashboard-house/0. Without a label it shows \u2302.",card_alerts:"Show warnings",card_alerts_hint:"Smoke, gas, CO, water, alarm panel and windows open in the rain: the room pulses, a note appears at the top",card_alert_jump:"Jump to the room of a new warning",card_alert_jump_hint:"The view switches to the floor and room of the warning by itself",card_scenes:"Scene buttons in the room",card_scenes_hint:"Scenes and scripts of the area as buttons under the 3D view while a room is selected",card_sensor_bar:"Own sensors at the top",card_sensor_bar_hint:"The sensors chosen in the editor (Settings) at the top left of the card",card_central_open:"Star menu open and large",card_central_open_hint:"Favourites and own buttons stand open from the start, a size larger",card_keep_camera:"Keep the camera when switching floors",card_keep_camera_hint:"The same side, height and distance on every floor",card_today:'"Today" card',card_today_hint:"Today's appointments and the bins due, top right",card_announcements:"Announcements",card_announcements_hint:'Announcements (action "NextFloor: Announcement") show big on the card, with a chime, and are spoken',weather_short:"Weather",time_of_day:"Time of day",time_of_day_hint:"Shows sun, light, shadows and look at another time of today. Tap again to go back to now.",menu_open:"Menu open",menu_open_hint:"The star menu with favourites and own buttons stands open from the start on this device, a size larger \u2013 for a wall tablet that mostly runs scenes.",keep_camera:"Keep camera",keep_camera_hint:"Switching floors keeps the camera on the same side, height and distance instead of fitting the new floor from the start side.",view_zoom:"Zoom",view_zoom_hint:"How close the fitted views come \u2013 on small tablets the house looks larger.",weather_entity:"Weather entity",weather_effects:"Weather effects in 3D",card_weather_density:"Amount of rain and snow",card_weather_density_hint:"Fewer drops and flakes than the weather reports; clouds, fog and lightning stay",rain_warning:"Warning: window open while it rains",sun_patches:"Sunlight and shadows",sun_patches_hint:"With north set, the sunlight from sun.sun falls through the windows as bright patches on the floor, and the house throws its shadow on the plot. Untick it to keep floor and plot free of sun patches and shadows.",sun_arc:"Sun arc and compass",sun_arc_hint:"Draws today's path of the sun as an arc over the plot, with a ring and the compass points on the ground (north in red). Needs your home's location in Home Assistant.",weather_effect_rain:"Rain",weather_effect_snow:"Snow",weather_effect_fog:"Fog (greys the scene)",weather_effect_clouds:"Clouds dim the sky and the sun",weather_effect_lightning:"Lightning in storms",weather_effect_sky:"Sun and moon in the sky",weather_entity_hint:"Which weather entity drives the sky around the house. Automatic uses the first one found.",weather_hint:"Weather at the house: rain and snow fall with the real wind, clouds drift over the plot with their shadows, lightning, fog, sun and moon",card_weather:"Weather outside",card_weather_hint:"Rain, snow, hail, clouds with shadows, lightning and fog from the first weather entity (weather_entity picks another); fewer particles on the tablet level",alerts:"Warnings",alert_smoke:"Smoke: {name}",alert_gas:"Gas: {name}",alert_co:"Carbon monoxide: {name}",alert_water:"Water: {name}",alert_alarm:"Alarm triggered",alert_alarm_by:"Alarm set off by {cause}",alert_alarm_pending:"Alarm pending",alert_window_rain:"Window open in the rain: {name}",alert_power_outage:"Power outage: {name}",alert_contact_lost:"Contact not answering: {name}",rain_sensor:"Rain sensor (own weather station)",rain_sensor_inverted:"Invert rain sensor",rain_sensor_inverted_hint:"For sensors that read off (or 0) when it rains and on when it is dry.",outage_sensor:"Power outage sensor",outage_hint:'A binary sensor of class power that is off, another binary sensor that is on, a state like "off_grid" or "backup", or a voltage below 50 V raise a warning for the whole house.',contact_warning:"Warn when a door or window contact is unavailable",contact_warning_hint:"When a contact has been unavailable for 10 minutes (empty battery, out of radio reach), the window looks shut in 3D although nobody knows. A note then names the contact. A restart of Home Assistant does not warn.",night_lock_warning:"Warn at night when a door is not locked",night_lock_warning_hint:"Between 10 pm and 6 am a note names the plan's door locks that stand unlocked.",alert_unlocked_night:"Not locked: {name}",motion_markers_active:"Show motion sensors only while they detect something",motion_markers_active_hint:"Applies to motion, occupancy and presence sensors. A sensor whose marker is set to always show stays visible.",room_double_tap:"Double tap on a room",room_double_tap_hint:"A double tap on a room turns its lights off when one is on, otherwise all on. Devices set to ask first always stay out.",room_double_tap_area:"Lamps in the plan and every light of the area",room_double_tap_plan:"Only lamps in the plan",room_double_tap_off:"Switch nothing",card_room_double_tap_auto:"As set in the plan",status_entities:"Own sensors at the top of the 3D view",status_add:"Add a sensor",status_entities_hint:"For example the outside temperature, the alarm or the air quality: they show at the top left with name and value, in an opened room too. A tap opens their details. Up to 12.",announce_tts:"Text-to-speech for announcements",announce_phrases:"Sentences for announcements (one per line)",announce_phrases_hint:`Empty: the sentences that come with NextFloor. Announcements also exist as the action "NextFloor: Announcement" for automations \u2013 on the rooms' speakers and on every open NextFloor screen.`,opening_rain_warning:"Warn when it rains",opening_light_well:"Light well in front",sill_boards:"Sill and board",sill_boards_auto:"Automatic",sill_boards_none:"None",sill_boards_inside:"Inside only",sill_boards_outside:"Outside only",room_names_short:"Room names",room_names_toggle_hint:"Show or hide room names in the 3D view",floor_stack_short_dim:"Dimmed",floor_stack_short_stacked:"Stacked",floor_stack_short_single:"Alone",size_short_w:"W",size_short_d:"D",size_short_h:"H",import_error_not_json:"The file is no JSON.",import_error_not_plan:"The file is no NextFloor plan.",import_other_hint:"From Sweet Home 3D: import the .sh3d file here. Floors, rooms, doors, windows and free walls come over, furniture does not.",import_sh3d_found:"Sweet Home 3D: {floors} floors, {rooms} rooms, {openings} doors and windows, {walls} free walls ({furniture} pieces of furniture are not taken over).",import_dxf_found:"DXF: {rooms} rooms (closed polylines) and {walls} free walls (lines) on one floor.",import_ifc_found:"In the IFC file: {floors} floors and {rooms} rooms (NextFloor draws the walls from the rooms).",import_roomplan_found:"Room scan (RoomPlan): {rooms} rooms, {openings} doors and windows; {skipped} objects were not taken over (you place furniture yourself).",import_error_roomplan_empty:"The room scan has no walls.",import_error_ifc_empty:"The IFC file has no spaces (IfcSpace) with a footprint.",import_error_dxf_empty:"The DXF file has no lines or polylines.",import_error_sh3d:"This is not a Sweet Home 3D file that can be read (it needs Sweet Home 3D 5.3 or newer).",import_error_sh3d_empty:"The Sweet Home 3D file has no rooms or walls.",export_name_template:"template",export_name_backup:"backup",card_floor_stack:"Floors below",floor_stack_dim:"Dimmed",floor_stack_stacked:"Stacked (the house up to here)",floor_stack_single:"Hidden (only this floor)",card_control_walls:"Tall walls/cut",card_control_floors:"Floors apart",card_control_temperature:"Temperature",card_control_humidity:"Humidity",card_control_co2:"CO\u2082",card_controls_hint:"Tall walls/cut, floors apart and temperature, humidity, CO\u2082 to switch",controls_hide:"Hide the controls \u2013 only the 3D view remains",nav_wrap:"Wrap the bar: every floor and room on several lines",bars_unfold:"Switches",nav_row:"Bar in one line (scrolls sideways)",controls_show:"Show the controls again",card_controls_hidden:"Start with the controls hidden",card_controls_hidden_hint:"Only the 3D view; an eye at the bottom left brings bars, values and switches back",card_controls_hide_after:"Hide the controls after",card_hide_after_s:"{n} s without a touch",card_fullscreen_button:"Full screen button",card_fullscreen_button_hint:"Hides the dashboard around the card (e.g. on a wall tablet)",fullscreen:"Full screen",fullscreen_exit:"Exit full screen",card_section_show:"Show",card_floor:"Floor",card_floor_house:"Whole house (tap a floor to open it)",card_height:"Height (pixels)",card_walls:"Walls",card_quality_hint:"\u201CTablet\u201D is the lightest setting \u2013 ideal for Fire tablets and other wall tablets.",card_flows_switch:"Switch in the card",card_flows_on:"Always on",card_flows_off:"Always off",holos:"Cards",holos_hint:"Show or hide the live cards over the house (energy balance, car, media)",card_energy:"Show energy values at the top",card_room_panel:"Room details on tap",card_room_buttons:"Room buttons",card_room_buttons_hint:"A row with one button per room at the top of the card \u2013 tap one to open the room, like tapping it in the model",card_room_panel_hint:"The room's lights and blinds in a side panel",card_explode:"Pull floors apart in the house view",card_roof_fade:"Fade the roof out while zooming in",card_roof_fade_hint:"Off: the roof stays on the house even when the camera comes close.",card_stats:"Performance display (frames per second)",card_stats_hint:"To check how smoothly the card runs on the device",packs:"Furniture packs",lib_badge_light:"Lamp: links to a light and switches in 3D",lib_badge_electric:"Electric: links to an entity and a power sensor (switching, pictures, consumption)",lib_badge_hint:"Items with a symbol link to entities: lamps switch, screens show pictures, appliances show their consumption.",care_bin_today:"Collected today",care_bin_tomorrow:"Collected tomorrow",care_bin_days:"In {n} days",care_mail_yes:"Post is in",care_mail_no:"Empty",care_plant_thirsty:"Thirsty",care_plant_ok:"Well watered",care_time_left:"{time} left",care_entity_bin:"Pickup date (sensor)",care_entity_mail:"Post sensor",care_entity_plant:"Soil moisture (sensor)",care_thirsty_below:"Thirsty below (%)",care_hint_bin:'A sensor with the next pickup: days, a date, "today"/"tomorrow" or the Waste Collection Schedule integration. The bin glows the day before and on the day.',care_hint_mail:"A sensor that reports post in the box (a contact on the flap, say). The mailbox glows then.",care_hint_plant:"A moisture sensor in the soil. Below the threshold the plant glows and says it is thirsty.",lib_cat_lights:"Lights",lib_cat_seating:"Seating",lib_cat_tables:"Tables",lib_cat_storage:"Cabinets & shelves",lib_cat_beds:"Beds",lib_cat_kitchen:"Kitchen",lib_cat_appliances:"Appliances",lib_cat_bath:"Bathroom",lib_cat_media:"TV & audio",lib_cat_office:"Office",lib_cat_tech:"Tech",lib_cat_climate:"Heating & climate",lib_cat_energy:"Energy",lib_cat_garden:"Garden & terrace",lib_cat_plants:"Plants",lib_cat_kids:"Kids",lib_cat_fitness:"Fitness",lib_cat_pets:"Pets",lib_cat_workshop:"Workshop & garage",lib_cat_music:"Music & studio",lib_cat_season:"Season & decoration",lib_cat_pictures:"Pictures & frames",lib_cat_vehicles:"Vehicles",lib_cat_building:"Stairs & building parts",lib_cat_decor:"Decoration & more",lib_favourites:"Favourites",lib_recent:"Recently used",lib_for_room:"Fits {room}",lib_all_rooms:"Show all rooms",lib_linkable:"linkable",lib_lit:"lit",lib_outdoor:"outdoor",lib_fav_add:"Add to favourites",lib_fav_remove:"Remove from favourites",lib_sizes:"Sizes",feature_name_energy:"Energy flow",ext_tab:"Extensions",ext_title:"Extensions",models:"Your own 3D models",models_hint:"For some vehicles NextFloor can show a real 3D model if you own one. Choose the file (.glb) here: NextFloor turns it the right way round, makes it lighter, marks the paint and stores it on your Home Assistant. Without a model the vehicle looks as it did before.",models_licence:"The files are yours and stay on your Home Assistant. NextFloor ships no models; please make sure your model's licence lets you use it in your own installation.",model_add:"Add a model \u2026",model_replace:"Replace the model \u2026",model_remove:"Remove",model_present:"in place",model_missing:"none yet",model_remove_confirm:"Delete the model \u201C{id}\u201D from Home Assistant?",model_removed:"Model \u201C{id}\u201D deleted.",model_uploaded:"Model \u201C{id}\u201D stored ({size}). Reload the panel to see it.",model_upload:"Store on Home Assistant",model_info:"{triangles} triangles, {size} m",model_front:"Front",model_front_hint:"Turn the model until its front faces the viewer (towards the lower left in the picture).",model_paint:"Paint (the colour you pick in the editor)",model_paint_preview:"Colour in the preview",model_detail:"Level of detail",model_detail_light:"Light (tablet)",model_detail_normal:"Normal",model_detail_fine:"Fine",model_result:"Result: {triangles} triangles, {size}",model_error_not_glb:"This is not a .glb file (binary glTF). Export the model as \u201CglTF binary\u201D.",model_error_compressed:"The file is compressed (Draco, Meshopt or KTX). Export it without compression.",model_error_empty:"The file contains nothing three-dimensional.",model_error_unreadable:"The file cannot be read: {detail}",model_error_too_large:"The file is larger than {max}. Choose a lower level of detail.",model_upload_forbidden:"Only administrators may upload models.",model_upload_too_large:"Home Assistant accepts no files over {max}. Choose a lower level of detail.",model_upload_not_glb:"Home Assistant refused the file (not a binary glTF).",model_upload_bad_id:"The model id is not valid.",model_upload_other:"Uploading did not work: {detail}",ext_intro:"Import your own furniture packs, upload your own 3D models and add plugins here.",plugin:"plugin",plugins_title:"Plugins",plugins_intro:"Plugins add your own light animations, devices and cards in the room panel. Enter a plugin's address (a .js file in /config/www, i.e. /local/\u2026, from HACS /hacsfiles/\u2026, or https://\u2026).",plugins_docs:"How to write a plugin",plugins_warning:"Plugins run with the same rights as NextFloor in your browser. Only use plugins from sources you trust.",plugins_off:"off",plugins_error:"error",plugins_loading:"loading \u2026",plugins_nothing_registered:"loaded, but registered nothing",plugins_loaded:"active",plugins_reload_hint:"Takes effect after reloading the page",plugins_remove:"Remove",plugins_none:"No plugins yet.",plugins_from_dashboard:"Registered by a dashboard resource",plugins_add:"Add",plugins_url_invalid:"Enter a .js address under /local/\u2026, /hacsfiles/\u2026 or https://\u2026.",plugins_exists:"This plugin is already in the list.",plugins_limit:"At most 20 plugins.",packs_title:"Furniture packs",packs_intro:"Import your own furniture as a pack (JSON): as a file or pasted below. {n} packs come with NextFloor and are always there.",packs_docs:"Pack format",packs_none:"No packs of your own yet.",community_title:"Community furniture",community_intro:"Furniture others built with the furniture builder and shared \u2013 checked and free. Build your own:",community_builder:"Open the furniture builder",community_how:"How to share yours",community_load:"Load community furniture",community_none:"No community furniture yet \u2013 be the first!",community_install:"Install",community_update:"Update",community_installed:"Installed",community_failed:"The community furniture could not be loaded: {detail}",pack_import:"Import pack files \u2026",pack_paste:"Import JSON",pack_paste_empty:"Paste a pack's JSON first.",pack_paste_not_json:"This is not valid JSON: {detail}",pack_imported:"Imported \u201C{name}\u201D by {publisher} \u2013 {n} items",packs_imported_n:"{n} of {total} packs imported",pack_by:"by {publisher} \xB7 {n} items",pack_remove:"Remove",pack_remove_confirm:"Remove the pack \u201C{name}\u201D? Its furniture stays in the plan as plain boxes.",pack_error_not_a_pack:'This is not a furniture pack ("format": "nfpack" is missing).',pack_error_builtin:"A pack that comes with NextFloor already has this id.",pack_error_invalid_content:"The pack contains invalid furniture: {detail}",pack_error_too_large:"The pack is too large (1 MB at most).",pack_error_needs_update:'This pack needs a newer version of NextFloor. Please update first (HACS \u203A NextFloor \u203A \u22EE \u203A "Update information" \u203A "Download"), restart Home Assistant, then import again.',pack_error_other:"Import failed: {detail}",store_open:"Open plugin store",store_close:"Close plugin store",store_intro:"Reviewed plugins from the community. Each one is looked at before it is added and does not change afterwards.",store_submit:"Submit your own plugin",store_empty:"No plugins in the store yet.",store_failed:"The store could not be loaded ({error}).",store_install:"Install",store_installed:"installed",store_update:"Update",store_confirm:`Install \u201C{name}\u201D by {author}? A plugin runs with the same rights as NextFloor in your browser. The file has been reviewed and its content is fixed: {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",flip_swing:"Reverse opening direction",flip_swing_hint:"The door swings into the room or to the other side",main_leaf:"Main leaf (seen from the room)",contact_main:"Contact main leaf",contact_second:"Contact second leaf",tool_outdoor:"Outdoor",tool_measure:"By measure",hint_measure:"Tap the starting point, then type the wall lengths with their direction on the right",measure:"Room by measure",measure_start:"Tap the starting point in the plan, e.g. a room corner.",measure_from:"Start at {x} / {z} m \u2013 tapping moves the start.",measure_length:"Length of the next wall (m)",measure_close:"Close room",measure_undo:"Remove last wall",measure_gap:"Gap to the start: {gap} m (joined when closing)",measure_hint:"Tip: type a length and press an arrow key. With measured inside dimensions, use \u201CClose gaps\u201D afterwards.",rect_by_size:"Rectangle by size",rect_add:"Add rectangle",dir_up:"Up",dir_down:"Down",dir_left:"Left",dir_right:"Right",hint_outdoor:"Drag to draw an outdoor area (lawn, terrace, pool \u2026)",outdoor:"Outdoor area",outdoor_type:"Type",outdoor_height:"Height (m)",outdoor_offset:"Height offset (m, \u2212 = lower)",outdoor_opacity:"Opacity (%)",outdoor_opacity_hint:"100 = solid. Less makes the area see-through, such as a driveway above a cellar; the outline stays.",outdoor_outline:"Show the outline",outdoor_outline_hint:"Unticked, the area draws no glowing line along its edge \u2013 for large plots made of several lawns.",outdoor_corners_hint:"Corners: a + on an edge adds a corner, dragging shapes the area, \xD7 removes a corner. Drawing and moving snap to nearby corners and edges. Hold Alt to bypass snapping.",outdoor_hint:"Outdoor lights (path light, garden spot, outdoor wall light) light all outdoor areas and the facade.",out_lawn:"Lawn",out_terrace:"Terrace",out_path:"Path",out_driveway:"Driveway",out_street:"Street",out_pavers:"Paving stones",access_room_devices:"Only individually authorized devices are visible here.",access_room_geometry:"No live data is shared for this room.",out_stepping_stones:"Stepping stones",out_natural_stone:"Natural stone path",outdoor_texture_scale:"Texture scale (%)",outdoor_texture_rotation:"Texture rotation (\xB0)",outdoor_texture_hint:"100% is the original size. 200% doubles the pattern size, 50% halves it (5\u20132000%). Rotation changes only this area's texture. Defaults: 100% and 0\xB0.",out_sidewalk:"Sidewalk",out_gravel:"Gravel",out_river:"River",out_stream:"Stream",out_pool:"Pool",out_bed:"Flower bed",out_hedge:"Hedge",out_fence:"Fence",out_wild:"Wild patch",out_pergola:"Pergola / frame",outdoor_open:"Open (leave out the last edge)",outdoor_open_hint:"The edge from the last point back to the first is not drawn \u2013 a fence or pergola leaning against the house.",fence_gates:"Gates in the fence",gate_add:"+ Gate in the fence",gate_edge:"Fence side",gate_kind:"Kind",gate_single:"Garden gate",gate_double:"Double gate",gate_sliding:"Sliding gate",gate_offset:"Middle from the start (m)",gate_width:"Width (m)",gate_entity:"Motor or switch",gate_contact:"Contact (on = open)",fence_gates_hint:"A gate is a gap in the fence with gate posts and a leaf. With a motor (cover, switch, input_boolean, lock) and/or a contact it opens in 3D: garden and double gates swing inwards, a sliding gate runs along the fence.",outdoor_bracing:"X-bracing",outdoor_cut:"Cut out of surrounding areas",outdoor_cut_hint:"Every area that contains this one whole gets a hole here \u2013 a pool in the terrace, a stream or a wild patch in the lawn. The drawing order does not matter. Pools, rivers and streams cut themselves out by default.",outdoor_area_hint:"The Home Assistant area of this surface (garden, terrace, pool): its devices and sensors are listed under Outside, and a pin on the surface opens it.",pool_temp:"Water temperature (optional)",pool_pump:"Pump / filter (optional)",pool_pump_on:"pump on",outdoor_slope:"Slope (m)",outdoor_slope_hint:"Height difference from the high edge to the low edge; the high edge sits at the height offset. Lamps on the area follow.",outdoor_slope_dir:"Falls towards",slope_x:"right (+X)",slope_nx:"left (\u2212X)",slope_z:"down (+Z)",slope_nz:"up (\u2212Z)",north:"North (\xB0 clockwise from up)",north_hint:"North is needed for the sun (light through the windows).",map_on:"Show a real map under the plan",map_lat:"Latitude",map_lon:"Longitude",map_use_ha:"Use Home Assistant's location",map_opacity:"Visibility (%)",map_zoom:"Detail level",map_zoom_coarse:"coarse",map_zoom_fine:"fine",map_move:"Move the map under the plan",map_step:"Step",map_url:"Own tile address (empty = OpenStreetMap)",map_hint:"Your browser loads the map tiles straight from the map server (OpenStreetMap by default, please mind their usage policy); nothing is loaded while the map is off. The plan lies on the map as the compass says \u2013 turn the compass or move the map until the house fits.",compass_title:"Compass",compass_n_short:"N",compass_s_short:"S",compass_swap:"Swap north \u2194 south",compass_swap_hint:"Turns the compass by 180\xB0. The drawing, roof faces and solar fields stay as they are.",compass_hint:"If the compass does not match reality, turn it here \u2013 nothing has to be redrawn. Sunlight, wind and the compass directions of roof faces follow it.",roof:"Roof",roof_none:"No roof",roof_flat:"Flat roof",roof_gable:"Gable roof",roof_custom:"Roof sections (custom)",roof_sections:"Roof sections",roof_sections_hint:"Each roof section covers a rectangle of the house, e.g. the house, the barn or an extension \u2013 each with its own shape, ridge direction, eave height and pitch. Drag in the plan to draw a new one; tap selects it, dragging moves it, the corners resize it.",roof_sections_start:"Create roof sections from the rooms",roof_sections_regen:"Create again from the rooms",roof_sections_off:"Back to one roof",roof_regen_confirm:"Replace all roof sections with a new proposal from the rooms?",roof_section:"Roof section",roof_section_hint:"Heights count from the ground. A side with a lower eave reaches further down (catslide); pent roofs rise from the first side.",roof_shape_gable:"Gable",roof_shape_hip:"Hip",roof_shape_pent:"Pent",roof_shape_flat:"Flat",roof_shape_halfhip:"Half-hip",roof_shape_pyramid:"Pyramid",roof_shape_mansard:"Mansard",roof_shape_parapet:"Parapet",roof_shape:"Shape",roof_end_start:"End at the ridge start",roof_end_end:"End at the ridge end",roof_halfhip:"Half-hip starts at",roof_halfhip_hint:"How high up the gable the hipped part starts, as a share of the gable's height: low = a large hip, high = only the tip is hipped.",roof_axis_x:"Ridge \u2194",roof_axis_z:"Ridge \u2195",roof_eave:"Eave (m)",roof_pitch_short:"Pitch (\xB0)",roof_height:"Height (m)",roof_base:"Top of walls (m)",roof_rotation:"Turn (\xB0)",roof_on_floor:"Sits on floor",roof_on_floor_hint:"Puts the section on this floor's wall tops; base and eaves move along. In the 3D view the roof belongs to this floor.",roof_base_hint:"Below the ceiling height of the floor underneath, that floor's walls end under the roof: knee walls at the eaves, gables up to the ridge, inner walls cut by the slope. Dashed lines in the plan show where 1.5 m and 2 m of headroom remain.",roof_ridge_height:"Ridge height",roof_side_top:"top",roof_side_bottom:"bottom",roof_side_left:"left",roof_side_right:"right",roof_swap:"Swap sides",roof_open:"Canopy (posts instead of walls, see-through)",roof_open_short:"Canopy",roof_dormer:"Dormer",roof_dormer_hint:"A dormer on this side of the roof: 2 m wide, its front at the eave wall, eaves 1.4 m above the roof's eave, gable roof. Then move it and change its width and heights like any section; the main slope opens under it and the attic wall rises up to the dormer \u2013 a window fits there.",roof_outline:"Take the floor's outline",roof_outline_hint:"A flat roof as a free shape: takes the outline of the shown floor's rooms (L- or Z-shaped too) as one surface without seams. The corners can be dragged afterwards.",roof_points_hint:"Free shape: drag the corners in the plan, a + on an edge adds a corner, \xD7 removes one. Back to the rectangle drops the shape.",roof_rect:"Back to the rectangle",roof_open_hint:"For a terrace roof or a carport: posts and beams carry the roof instead of walls, and it is see-through. Where the canopy meets the house wall, it rests on the wall.",roof_swap_hint:"Turns the roof round: the two sides swap eave and pitch, a pent roof rises the other way.",roof_pitch:"Roof pitch (\xB0)",roof_overhang:"Roof overhang (m)",roof_overhang_sides:"Overhang per side",roof_overhang_a:"Overhang eave A (m)",roof_overhang_b:"Overhang eave B (m)",roof_overhang_u0:"Overhang gable start (m)",roof_overhang_u1:"Overhang gable end (m)",roof_overhang_auto:"Back to automatic",roof_overhang_sides_hint:"Without values of your own the overhang is automatic: the same everywhere, except where the roof part meets the house (none there).",roof_ridge:"Ridge",roof_ridge_long:"Along the long side",roof_ridge_short:"Along the short side (e.g. terraced house)",device:"Device",lamp_mount:"Lamp",lamp_ceiling:"Ceiling light",lamp_floor:"Floor lamp",lamp_table:"Table lamp",lamp_wall:"Wall light",marker_height:"Marker height (m)",height_auto:"Automatic height",device_centre:"To room centre",lights_spread:"Spread ceiling lights evenly",devices_search:"Search devices \u2026",devices_more:"+{n} more",devices_less:"less",panel_more:"More devices of the area ({n})",panel_less:"Show less",gaps_close:"Close gaps",gaps_hint:"Join rooms up to 60 cm apart at one shared wall; the gap becomes the interior wall thickness.",gaps_none:"No gaps between rooms found.",gaps_closed:"{n} places closed.",gaps_closed_wall:"{n} places closed, interior wall now {t} m.",fps:"FPS",fps_title:"Performance display (frames per second)",hint_garage:"Tap a wall to add a garage door",opening_garage:"Garage door",garage_hint:"The door follows a garage cover (position or open/closed) or a garage door contact of the room's area.",door_hint:"With a door contact the leaf swings open; without a sensor it stands half open.",hint_door:"Tap a wall to add a door",hint_window:"Tap a wall to add a window",opening_door:"Door",opening_window:"Window",opening_type:"Type",opening_position:"Centre from corner (m)",sill:"Sill height (m)",opening_height:"Height (m)",hinge:"Hinge (seen from the room)",hinge_left:"Left",hinge_right:"Right",cover_entity:"Blind",door_cover:"Drive (motorised door or gate)",cover_position_entity:"Position sensor (live)",cover_position_invert:"Reverse position sensor in 3D (0 = open)",contact_entity:"Contact",sensor_kind:"Sensor type",sensor_kind_contact:"Window contact (open/closed)",sensor_kind_handle:"Handle sensor (open/tilted/closed)",sensor_kind_contact_tilt:"Contact + tilt sensor",handle_entity:"Handle sensor",handle_main:"Handle sensor main leaf",leaf_main:"Main leaf",leaf_second:"Second leaf",tilt_entity:"Tilt sensor",tilt_angle_entity:"Tilt angle sensor (\xB0, optional)",tilt_angle_max:"Angle that counts as fully tilted (\xB0)",tilt_angle_offset:"Offset: angle reported while closed (\xB0)",tilt_angle_invert:"The angle counts the other way round",door_shut:"Show closed without a sensor",door_shut_hint:"A door without a contact stands half open in 3D so it reads as a door. Ticked, it is drawn closed \u2013 front door, carport, side door.",door_angle:"Opening angle",door_angle_default:"Default",door_angle_hint:"How far the leaf opens. With a sensor it opens that far once it reports open; without one it stands that far open (instead of half). Default stays as before.",entity_auto:"Automatic ({name})",entity_auto_none:"Automatic (none found)",entity_none:"None",entity_search:"Type to search \u2026",opening_hint:`Sensor type: window contact (reports open/closed), handle sensor (reports open, tilted and closed \u2013 e.g. a Homematic window handle) or contact + tilt sensor (a second sensor that only reports tilted). Automatic uses the blinds and contacts of the room's area. Position sensor: an entity reporting the blind's position while it moves (e.g. a Homematic "level", 0\u2013100 % or 0\u20131, open = high) \u2013 the blind then moves live in 3D.`,furniture:"Furniture",furniture_add:"Add furniture",studio_new:"Build your own piece",studio_title:"Furniture studio",studio_title_edit:"Furniture studio: change",studio_hint:'Pick a template, set its measurements and fronts and put the piece into the plan. It goes into the "Own furniture" pack and can be changed here again later.',studio_kind:"Template",studio_kind_cabinet:"Cabinet",studio_kind_shelf:"Shelf",studio_kind_lamp:"Lamp",studio_kind_device:"Device",studio_name:"Name",studio_width:"Width (cm)",studio_depth:"Depth (cm)",studio_height:"Height (cm)",studio_doors:"Doors",studio_drawers:"Drawers",studio_shelves:"Shelves",studio_handle:"Handles",studio_handle_bar:"Bar",studio_handle_knob:"Knob",studio_handle_none:"None",studio_base:"Base",studio_base_plinth:"Plinth",studio_base_legs:"Legs",studio_base_none:"None",studio_back:"Back panel",studio_lamp:"Kind",studio_lamp_floor:"Floor lamp",studio_lamp_table:"Table lamp",studio_lamp_pendant:"Pendant",studio_lamp_wall:"Wall light",studio_display:"Display on the front (shows the media player)",studio_mount:"Stands",studio_mount_floor:"On the floor",studio_mount_surface:"On furniture",studio_mount_wall:"On the wall",studio_color_body:"Body",studio_color_lamp_body:"Base and frame",studio_color_front:"Fronts",studio_color_boards:"Boards",studio_color_shade:"Shade",studio_color_display:"Display frame",studio_color_white:"White",studio_color_wood:"Wood",studio_color_metal:"Metal",studio_color_dark:"Dark",studio_color_glass:"Glass",studio_color_accent:"Accent",studio_color_own:"Own colour",studio_color_plan:"Colour of the plan",studio_place:"Put into the plan",studio_save:"Save the change",studio_open:"Change in the studio",studio_error:"Could not save: {detail}",studio_pack_name:"Own furniture",studio_pack_publisher:"Furniture studio",furniture_search:"Search furniture \u2026",furniture_search_none:"Nothing found. Try another word \u2013 English or German.",furniture_type:"Item",rotation:"Rotation (\xB0)",tilt_x:"Tilt front/back (\xB0)",tilt_z:"Tilt sideways (\xB0)",strip_tilt:"Tilt about its length (\xB0)",strip_upright:"Upright",strip_rise:"Rise along its length (\xB0)",strip_upright_hint:"The strip stands on end: its length runs up from the height above the floor \u2013 along a door frame, as a light column. The tilt lays a lying strip against a slope (90\xB0 = its face points sideways).",rotate_left:"\u21BA 90\xB0",rotate_right:"\u21BB 90\xB0",height_m:"Height (m)",furn_sofa:"Sofa",furn_armchair:"Armchair",furn_table:"Table",furn_chair:"Chair",furn_bed:"Bed",furn_nightstand:"Nightstand",furn_wardrobe:"Wardrobe",furn_shelf:"Shelf",furn_kitchen:"Kitchen unit",furn_worktop:"Worktop",furn_fridge:"Fridge",furn_fridge_smart:"Smart fridge (side by side)",furn_door_left:"Door sensor left (freezer side)",furn_door_right:"Door sensor right (fridge side)",fridge_hint:"While a door sensor reports open, the door swings open in 3D.",furn_stove:"Stove",furn_sink:"Sink",furn_bathtub:"Bathtub",furn_shower:"Shower",furn_wc:"WC",furn_washbasin:"Washbasin",furn_desk:"Desk",furn_tv_board:"TV board",furn_plant:"Plant",furn_rug:"Rug",furn_stairs:"Stairs",furn_stairwell:"Floor opening",stairwell_hint:"A hole in this floor, for example above the staircase or for a gallery; from above you look through it. The opening must lie within one room; several openings may overlap (for an L shape, for example). Stairs on the floor below that reach up here open the floor by themselves as well.",tool_hole:"Floor opening",tool_stairs:"Stairs",hint_stairs:"Drag where the stair should stand \u2013 it runs along the long side; set shape, turn and build on the right afterwards",tool_roof:"Roof",tool_energy:"Energy",tool_wall:"Wall",hint_wall:"Drag to draw a single wall (partition, half wall) \xB7 Shift keeps it straight \xB7 Alt without snapping",free_wall:"Wall",wall_length:"Length (m)",wall_thickness:"Wall thickness (m)",wall_height:"Height (m)",wall_height_full:"Full room height",wall_slope:"Sloping",wall_slope_start:"Height at the start (m)",wall_slope_end:"Height at the end (m)",wall_slope_hint:"Sloping wall: the top runs straight from the height at the start of the wall (the corner with the lower number) to the height at its end. Both may be above the floor height, for example for a lean-to room with high clerestory windows.",wall_slope_off:"Back to a level wall",wall_none:"No wall",wall_none_hint:"Leave this wall out altogether: for open floor plans whose rooms are one space but separate in Home Assistant.",edge_thickness:"Thickness (m)",wall_thickness_hint:"Thickness of this wall, e.g. 0.365 on a thick outer wall or 0.115 on a light partition. A wall between two rooms takes the thicker setting.",wall_thickness_reset:"Thickness as set for the house",wall_heights:"Wall heights",wall_n:"Wall {a}\u2013{b}",wall_view:"Wall view",wall_view_hint:"The wall from the front: drag its doors, windows and furniture or type their distance.",wall_view_prev:"Previous wall",wall_view_next:"Next wall",wall_view_left:"From the left (m)",wall_view_height:"Above the floor (m)",wall_part:"part {n}",wall_split_hint:"Split the wall here: the part gets a height of its own, e.g. 2.5 m next to 1.7 m in line",wall_split_at:"Split point from corner (m)",wall_join_hint:"Remove the split point: the part joins the one before it again",wall_exterior_short:"exterior wall",room_wall_hint:"A lower height turns the wall into a parapet or a counter. If two rooms share the wall, the lower setting applies. Windows and doors in it end at the wall height.",free_wall_hint:"A free-standing wall, e.g. a partition. Where it meets a room wall, the corner is mitred. Drag the handles to move its ends, drag the line to move the whole wall.",free_wall_slope:"\u25E2 Sloping",free_wall_slope_hint:"The wall gets higher or lower from one end to the other: the height above is at its start, the one here at its end.",free_wall_height_end:"Height at the end (m)",arc:"Arc",arc_hint:"Bends the wall into an arc. A room sharing the wall bends along, doors and windows move with it; Undo takes the arc back.",arc_bulge:"Bulge (m)",arc_bulge_hint:"How far the middle of the wall bulges: positive outwards, negative into the room.",arc_apply:"Bend",arc_too_wide:"A door or window in this wall is too wide for this curve. Make the curve flatter or the opening narrower.",stairwell_outside:"This opening reaches across a room boundary and is therefore not cut. Move it fully into one room or make it smaller.",hint_hole:"Drag to draw a floor opening (stairwell, gallery)",hint_roof:"Drag to draw a roof section \xB7 tap selects \xB7 drag moves \xB7 corners resize",hint_energy:"Tap a solar field to select it \xB7 drag to move it, also onto another roof face \xB7 new fields with + Solar field on the right",furn_parking:"Parking spot",furn_group_vehicles:"Parking",parking_entity:'Sensor "car present"',parking_vehicle:"Vehicle",parking_vehicle_none:"None",parking_no_pack:'No vehicle pack imported \u2013 vehicles come from the "Vehicles" pack (Extensions \u2192 Furniture packs).',parking_scale:"Size (%)",parking_type_entity:"Vehicle type sensor (optional)",parking_types:"State \u2192 vehicle",parking_type_state:"State (e.g. van)",parking_add_type:"+ Mapping",parking_hint:'Without a sensor the vehicle always stands there. With one it appears as soon as the sensor reports "on", "home" or "present". A vehicle type sensor (e.g. from an AI camera analysis) picks the model: when its state matches a mapping \u2013 also as a word in the text \u2013 that vehicle is shown, otherwise the default one.',parking_too_tall:"The vehicle ({car} m) is taller than the room ({room} m).",furn_lamp_ceiling:"Ceiling light",furn_lamp_downlight:"Downlight",furn_lamp_spot:"Surface spot",furn_lamp_panel:"LED panel",furn_lamp_uplight:"Floor uplight",furn_lamp_bollard:"Path light",furn_lamp_garden:"Garden spot",furn_radiator:"Radiator",furn_robot_vacuum:"Robot vacuum",furn_entity_vacuum:"Robot vacuum",furn_entity_mower:"Robot mower",pet_room_sensor:"The pet's room sensor (optional)",pet_room_hint:"A sensor naming the room the pet is in \u2013 Bermuda or ESPresense with a tag on its collar: in 3D it then roams that room.",furn_entity_water:"Valve or switch",device_temp:"Device temperature",device_temp_hint:"A temperature sensor of the device (inverter, battery, PC \u2026): its value shows on the pin in the 3D view, from 60 \xB0C the pin is highlighted.",fridge_temp:"Fridge temperature",freezer_temp:"Freezer temperature",fridge_temp_hint:"The pin shows the temperatures. Above 8 \xB0C in the fridge or \u221212 \xB0C in the freezer it lights up as a warning.",spray_reach:"Reach of the water (m)",spray_hint:"While the valve is open or the switch is on, the sprinkler throws water in arcs around it.",furn_robot_room:"Current room (sensor)",robot_cal_none:"Not calibrated yet \u2014 with nothing tying the robot's grid to the plan, the lanes stay invented.",robot_cal_done:"Calibrated: one map cell measures {m} m.",robot_cal_do:"Calibrate from where the robot is now",robot_cal_doing:"Tap the plan where the robot is right now.",robot_cal_need:"The robot's map is not reporting a position \u2014 is the integration running?",robot_cal_hint:"The dock is the anchor: the plan knows where it stands, the camera knows where the robot and its dock lie in their grid. If the map names its rooms like the plan does, \u201CCalibrate from the rooms\u201D is all it takes. Otherwise: stop the robot at least 1.5 m away \u2014 pause the clean \u2014 and tap it on the plan. If the rooms come out flipped, set the tick.",robot_cal_mirror:"The robot's map is mirrored (rooms come out flipped)",robot_cal_forget:"Remove the calibration",robot_cal_nudge:"Fine-tune by hand: the arrows move the map by 10 cm, \u27F2 \u27F3 turn it by 1\xB0, \u2212 + change its size by 1 %.",robot_cal_nudge_move:"Move the map",robot_cal_nudge_turn:"Turn the map",robot_cal_nudge_grow:"Make the map larger or smaller",robot_cal_rooms:"Calibrate from the rooms (the map knows {n} rooms)",robot_cal_rooms_none:"Too few rooms have the same name in the plan as on the robot's map ({n} found, at least 2 needed). Name them alike \u2014 or calibrate from the robot's position.",robot_cal_rooms_bad:"The rooms with matching names lie differently in the plan than on the robot's map \u2014 is a room mixed up? Otherwise calibrate from the robot's position.",robot_hint:"While the robot cleans in Home Assistant it drives lanes in 3D through the room it reports (a \u201Ccurrent room\u201D sensor, matched by room or area name), else through the room of its dock. With the robot's own map calibrated below, the track shows where it has really driven instead; without it the lanes are a guess. It drives back to the dock when it returns.",furn_lamp_pendant:"Pendant light",furn_ceiling_fan:"Ceiling fan",furn_fan_entity:"Fan",fan_hint:"The light is the fan's light kit (leave it empty if it has none). The fan is found in the room or chosen here: in 3D the blades turn as fast as it runs, its icon switches it, swiping up/down changes the speed, a long press opens the quick menu. The height is how far it hangs from the ceiling (more = a longer downrod).",room_ceiling:"Ceiling height",room_ceiling_tip:"Lower than the floor (a bathroom under the stairs) or higher (a living room open up to the roof): ceiling lights, fans, LED strips and ceiling devices hang from here, and the room's walls are this high.",room_ceiling_through:"The ceiling ({ceiling} m) is above the floor height ({floor} m): the room reaches into the floor above, its walls rise with it, and the floor above stays open over it. The editor of the upper floor shows the area hatched.",room_floor_offset:"Floor level (m)",room_floor_offset_hint:"When this room's floor lies lower or higher than the floor (a sunken entrance: \u22120.39), its floor, walls, doors and windows and what stands in it move with it; its ceiling stays. Add the steps as a stair.",room_inner:"Inside {w} \xD7 {d}",room_inner_hint:"Measured from wall to wall: inner walls take half their thickness, outer walls stand outside the outline.",floor_heating:"Underfloor heating (optional)",floor_heating_hint:"While the thermostat heats (or the valve is open, the switch on), the room's floor glows warm in 3D.",room_announce_speaker:"Speaker for announcements",room_announce_quiet:"Quiet time for announcements",room_announce_hint:"Without a choice, the speaker placed in the room talks, else a voice assistant, an Echo or a speaker of its area (never a TV). During the quiet time, announcements to several rooms leave this room out; one meant only for it still gets through.",ceiling_here:"Ceiling here",ceiling_here_hint:"Height of the ceiling right at this spot, e.g. in a sloping ceiling. Empty = the room's ceiling.",ceiling_slope:"Up to the roof slope",ceiling_slope_hint:"The ceiling here lies under the roof slope: the lamp hangs from its underside, right above where it stands.",furn_lamp_floor:"Floor lamp",furn_lamp_table:"Table lamp",furn_lamp_wall:"Wall light",furn_led_strip:"LED strip",furn_group_lights:"Lights",furn_entity_light:"Light or switch",furn_color_entity:"Colour and brightness from (optional)",furn_color_entity_hint:"For lights that a relay (Shelly, switch actuator) turns on and off while the bulb itself knows its colour and brightness: on/off comes from the switch above, colour and brightness from this entity.",lamp_extra_light:"Bulb {n} (optional)",lamp_extra_hint:"A fixture with several lights \u2013 main light, night light, ambient ring: while the main light is off it glows in 3D with the next light that is on, a little dimmer. Switch the lights one by one in the room panel.",furn_entity_climate:"Heating (thermostat)",lamp_hint:"Tap the lamp in 3D to switch it, long press for the quick menu. Switches work too (e.g. a relay for the ceiling light) \u2013 the lamp shines while it is on. Table lamps stand on the furniture below them.",lamp_hint_pendant:"Height = drop below the ceiling. Tap in 3D to switch, long press for details.",theme:"Look",version_hint:"Installed version of NextFloor \u2013 the frontend; the integration in Home Assistant reports {backend}",accent:"Accent colour",accent_hint:"An accent colour of your own: lines and glowing edges in the neon look, buttons and pins \u2013 \u21BA brings the neon cyan back",accent_reset:"Back to cyan",furn_colors_card:"Furniture colours of this card",furn_color_house:"House colour",theme_neon:"Neon",theme_blueprint:"Blueprint",theme_day:"Day",theme_auto:"Auto",clock:"Clock",clock_none:"None",clock_top_left:"Top left",clock_top_right:"Top right",clock_bottom_left:"Bottom left",clock_bottom_right:"Bottom right",glass_walls:"Glass walls",glass_walls_hint:"How opaque the walls you look through into the rooms are: left almost invisible, right opaque. For this screen.",screen_name:"Name of this screen",screen_name_hint:'Announcements show on every open NextFloor screen. With a name (e.g. "Hallway"), an announcement can go to this screen only. Unticked, this screen stays silent.',announce_on:"Announcements on this screen are on",announce_muted:"Announcements on this screen are muted",lock3d_on:"Lock 3D (no turning, zooming or panning; taps still work)",lock3d_off:"Unlock 3D",walk:"Walk through the house",travel:"Time travel: replay the last 24 hours or 7 days",travel_play:"Play",travel_pause:"Pause",travel_loading:"Loading history \u2026",travel_failed:"The history could not be loaded.",travel_speed:"Speed",travel_speed_min:"1 min/s",travel_speed_10min:"10 min/s",travel_speed_hour:"1 h/s",travel_days:"days",travel_live:"Live",card_travel_button:"Button for time travel",walk_stop:"Stop walking",walk_hint:"Drag: look around \xB7 W A S D / arrows or stick: walk \xB7 wheel: step",card_walk_button:"Button to walk through",card_lock_button:"Button for the 3D lock",backdrop:"Own background",backdrop_color:"Colour",backdrop_image:"Picture (/local/\u2026 or https://\u2026)",backdrop_dim:"Dim",backdrop_hint:"Instead of the look's sky the house stands in front of a colour or a picture of your own. A picture in /config/www is reachable at /local/\u2026.",furnish:"Furnish",split_3d:"3D beside",plan_dims:"Measurements",plan_dims_hint:"Labels every room edge with its length.",mount_height:"Height above the floor (m)",side_open:"Open the sidebar",side_close:"Close",side_details:"Details of the selection",side_pin:"Pin",side_pinned:"Pinned",side_pin_hint:"Pinned, the sidebar stays open; otherwise it folds away beside the 3D view while nothing is selected",split_3d_hint:"Live 3D next to the plan: drag and turn furniture and devices there \u2013 with undo, saved with the plan",size_w:"Width (m)",size_d:"Depth (m)",size_h:"Height (m)",furnish_hint:"Drag furniture, lamps and devices \xB7 furniture snaps to walls \xB7 tap one to turn it, set its height and mount",done:"Done",heatmap:"Heatmap",heat_off:"Normal",heat_short_temperature:"Temp.",heat_short_humidity:"Humidity",heat_short_co2:"CO\u2082",heat_short_mould:"Mould",heat_short_power:"Power",heat_short_comfort:"Comfort",heat_short_sun:"Sun",heat_short_wifi:"Wi-Fi",heat_short_values:"Values",heat_temperature:"Temperature",heat_humidity:"Humidity",heat_co2:"CO\u2082",heat_mould:"Mould",heat_power:"Power use",heat_comfort:"Comfort score",heat_sun:"Sun today",room_sun_hours:"{h} h of sun today ({facing})",open_since:"open for {time}",presence_now:"someone here",presence_last:"last seen {time} ago",comfort_n:"Comfort {n}",empty_lights_hint:"{n} lights on, nobody here for {min} min.",empty_lights_off:"Lights off",open_heating_hint:"{n} windows open while the heating runs.",open_heating_off:"Heating off",room_clean:"Cleaning (script or button)",room_clean_hint:`A script or button that sends the robot vacuum to this room (e.g. your robot integration's room cleaning). The room panel then shows "\u{1F9F9} Clean".`,room_clean_run:"Clean",room_clean_run_hint:"Sends the robot vacuum to this room.",shade_hint:"Sun on {n} windows at {temp} \u2013 lower the blinds?",shade_close:"Lower",room_sun_year:"Sun over the year",room_sun_year_hint:"The hours of sun through the room's outside windows on the 15th of every month.",room_energy:"today {today} \xB7 month {month}",room_energy_hint:"From the statistics of the power sensors of the room's devices; the month's cost at the house's tariff.",heat_summer:"summer",heat_winter:"winter",air_co2:"air it (CO\u2082)",air_humidity:"air it (damp)",air_mould:"risk of mould \u2013 air it",room_curve_hint:"The room's temperature over the last 24 hours",heat_values:"Values at the room names",heat_wifi:"Wi-Fi",wifi_aps:"{n} access points \xB7 {clients} devices",wifi_network:"Network: {online} online \xB7 {offline} offline",wifi_none:"Place access points or routers from the packs (Smart home 2) and link them to an entity of their device.",wifi_clients:"{n} devices",heat_none_found:"No matching sensors in the rooms' areas.",markers:"Markers",markers_none:"None",markers_important:"Important",markers_all:"All",furn_stool:"Stool",furn_coffee_table:"Coffee table",furn_tv_wall:"TV (wall)",furn_sideboard:"Sideboard",furn_table_round:"Round table",furn_bench:"Bench",furn_corner_bench:"Corner bench",furn_bar_stool:"Bar stool",furn_kitchen_wall:"Wall cabinet",furn_kitchen_tall:"Tall unit with oven",furn_island:"Kitchen island",furn_dishwasher:"Dishwasher",furn_bunk_bed:"Bunk bed",furn_dresser:"Chest of drawers",furn_washer:"Washing machine",furn_dryer:"Dryer",furn_office_chair:"Office chair",furn_tall_cabinet:"Tall cabinet",furn_coat_rack:"Coat rack",furn_group_living:"Living",furn_group_dining:"Dining",furn_group_energy:"Energy & solar",energy_devices:"Devices",wallbox_charging:"charging",wallbox_plugged:"plugged in",furn_soc:"State of charge (%)",furn_export:"Export power (W, separate sensor, optional)",furn_export_hint:"If your meter reports import and export in two sensors (e.g. Growatt, Tibber Pulse), take the import sensor as power above and the export sensor here. A signed sensor does not need this.",meter_parent:"Hangs off meter",meter_parent_none:"none (main meter)",meter_main:"Main meter",meter_unmetered:"{w} unmetered",meter_device_hint:"If the device sits behind a sub-meter (e.g. a balcony plant in a flat), its power counts towards that flat. The sub-meter has to measure both ways for this (\u2212 = feeding back); if it only counts import, the flat's consumption comes out too high while there is a surplus.",meter_sub_power:"Power of the branch (W, + = drawn, \u2212 = fed back)",meter_floors:"Feeds the floors",meter_sub_hint:"A sub-meter measures its branch, e.g. a flat. Devices on the ticked floors hang off it in 3D instead of the main meter; what the main meter counts beyond that shows as \u201CCommon (rest)\u201D in the balance.",furn_charge:"Charging power (W, separate sensor, optional)",furn_charge_hint:"If your battery reports charging and discharging in two sensors (e.g. Anker Solix), take the discharging sensor as power above and the charging sensor here. A signed sensor does not need this.",furn_wallbox_status:"Status (charging, plugged in)",charging_data:"Charging data",charging_card:"Charging station as a floating 3D card",charging_hint:"Linked charging data appears on the floating card and in the room menu, even without a power reading. Unlinked rows stay hidden. Native date/time profiles and Integer associations retain their Symcon display. Auto detects Unix timestamps without a time profile; numeric durations without a unit use seconds. Change the format to override this. These readings are display-only.",charging_start:"Start time",charging_end:"End time",charging_duration:"Charging duration",charging_energy:"Charged energy",charging_lock:"Lock status",charging_time_format:"Time format",charging_duration_unit:"Duration unit",charging_auto:"Automatic",charging_value:"Unchanged Symcon value",charging_seconds:"Seconds",charging_minutes:"Minutes",charging_hours:"Hours",charging_unix_seconds:"Unix time (seconds)",charging_unix_ms:"Unix time (milliseconds)",energy_only_note:"\u26A1 Energy: only solar fields and energy devices can be moved here; rooms and furniture are locked.",roof_only_note:"\u{1F3E0} Roof: only roof sections and roof windows can be moved here; rooms and furniture are locked.",energy_devices_hint:"Meter, inverters, home batteries, wallboxes and the grid connection are added here: on the floor chosen above, movable in the plan. With a power sensor they show their watts; the meter takes the grid sensor, a string picks its inverter. Several inverters and batteries (say a balcony plant on top) work too: each gets its own sensor.",energy_routes:"Cable routes",energy_routes_hint:"Where a cable really runs: the flow then follows your points instead of an arc through the house. Without a route it keeps the arc. Consumers keep their arc.",route_conn_solar:"{name} \u2192 inverter",route_conn_battery:"Battery \u2194 house",route_conn_inverter:"Inverter \u2192 house",route_conn_grid:"Grid \u2194 house",route_conn_meter:"{name} \u2194 parent meter",route_conn_device:"{name} \u2194 sub-meter",route_points:"{n} points",route_none:"direct arc",route_draw:"Draw route",route_redraw:"Redraw",route_drawing:"Tap the points the cable runs through on the plan, from one end to the other; switch floors in between where it goes through a ceiling. {n} points.",route_undo:"Last point",route_done:"Done",route_cable:"Show as cable",route_cable_hint:"Draws the route as a visible cable, not just as the faint line under the particles.",solar_fields:"Solar fields",solar_hint:"Put modules on the roof: they lie in the slope of the roof face; on a flat roof they stand on frames. Drag a field in the plan to move it.",solar_no_roof:"Solar fields need a roof: a gable or flat roof under Settings, or roof sections here in the Roof tool.",solar_face_gone:"roof face missing",solar_summary:"{n} modules \xB7 {kwp} kWp",solar_add:"Solar field",solar_field:"Solar field",solar_face:"Roof face",solar_rows:"Rows",solar_cols:"Modules per row",solar_portrait:"Portrait",solar_landscape:"Landscape",solar_u:"Distance from the edge (m)",solar_v:"Distance from the eave (m)",solar_tilt:"Tilt of the frames (\xB0)",solar_rack_ew:"East-west racks",solar_rack_ew_hint:"Every second row faces the other way, the pairs stand back to back \u2013 low and close, as on many flat roofs.",solar_rack_tilt:"Rack (\xB0 more tilt)",solar_flip:"Lean the other way",solar_partial:"only {n} of {total} fit on the face",solar_form_hint:"Modules that would reach beyond the roof face are left out. \u201CFill face\u201D puts as many modules on the roof as fit. kWp counted with 400 W per module.",solar_fit:"Fill face",roof_windows:"Roof windows",roof_window:"Roof window",chimneys:"Chimneys",chimney:"Chimney",chimney_shape:"Shape",chimney_brick:"Brick",chimney_round:"Round",chimney_wide:"Wide, two flues",chimney_steel:"Steel flue pipe",chimney_diameter:"Diameter (m)",chimney_depth:"Depth (m)",chimney_height:"Height above the roof (m)",chimney_hint:"The height counts from the upper side, where the chimney leaves the roof. Drag it in the plan or in the 3D view, also onto another roof face.",roof_windows_hint:"Roof windows lie in the roof face, with a blind and contacts like windows. Drag them in the plan, also onto another roof face.",roof_window_tilt:"Tilt contact",roof_window_name:"Name (optional)",roof_window_motor:"Window motor (cover, optional)",roof_window_motor_hint:"A window motor (Velux, Roto, Fakro) reports its position as a cover: the sash opens in 3D as far as the motor stands. A contact or tilt contact still works without a motor.",roof_window_hint:"Open, the sash swings out, hinged at the top; tilted, a little; and the frame glows warm; the blind comes down over the glass from the top. In a roof section the window cuts a hole into the slope, so the attic looks out through it.",solar_ground:"Free-standing (garden, garage roof \u2026)",solar_add_ground:"Free-standing",solar_base:"Height of the surface (m, 0 = ground)",solar_add_wall:"On a wall",solar_wall:"Wall",solar_v_wall:"Height above the floor (m)",solar_tilt_wall:"Tilt away from the wall (\xB0, 90 = canopy)",solar_flip_wall:"Standing off at the bottom instead of the top",solar_rotation:"Rotation (\xB0)",solar_name:"Name",solar_name_hint:"e.g. string 1 south",solar_module_w:"Module width (m)",solar_module_h:"Module height (m)",solar_wp:"Module power (Wp)",solar_string:"String",solar_strings:"Strings",solar_string_none:"No string",solar_string_new:"New string",solar_string_n:"String {n}",solar_string_name:"Name of the string",solar_string_entity:"PV power of the string",solar_string_inverter:"Inverter",solar_string_inverter_none:"No inverter chosen",inverter_strings:"Strings on this inverter: {names}",inverter_strings_none:"No string on this inverter yet \u2013 assign it at a solar field under String \u203A Inverter.",solar_string_inverter_missing:"No inverter in the plan yet (add one below under Devices)",solar_string_hint:"Fields in the same string belong together, also on different roofs (e.g. 5 modules on the house and 5 on the garage). Sensor and inverter count for the whole string.",solar_string_sum:"{fields} fields \xB7 {n} modules \xB7 {kwp} kWp",solar_face_size:"Roof face {w} \xD7 {h} m (along the eave \xD7 up the slope)",solar_cols_hint:"One number for rows of equal length, or a list for rows of their own: \u201C4, 4, 3\u201D (from the eave).",solar_align_left:"Left",solar_align_center:"Centre",solar_align_right:"Right",solar_look_black:"Full black",solar_look_blue:"Blue",solar_pick:"Modules on/off one by one",solar_pick_all:"All on again",solar_pick_hint:"Tap a module in the plan to take it away or put it back. Removed ones are dashed.",solar_entity:"PV power of this field (e.g. its string)",solar_main:"Main roof",solar_section:"Section {n}",solar_flat:"flat roof",compass_n:"north",compass_ne:"north-east",compass_e:"east",compass_se:"south-east",compass_s:"south",compass_sw:"south-west",compass_w:"west",compass_nw:"north-west",furn_meter:"Electricity meter",furn_grid_point:"Grid connection",grid_point_hint:"The grid connection stands here: the handover point to the utility, e.g. at the end of the driveway. Movable in the plan.",furn_model:"Model",inverter_std:"Standard (wall unit with display)",inverter_slim:"Slim and tall (light strip)",inverter_hybrid:"Hybrid (round dial, fans)",battery_std:"Tower (stacked modules)",battery_wall:"Wall battery (flat, hanging)",battery_cube:"Compact (balcony battery)",furn_inverter:"Solar inverter",furn_home_battery:"Home battery",furn_wallbox:"Wallbox",furn_heating_manifold:"Heating/cooling manifold",furn_buffer_tank:"Buffer tank",furn_freshwater_station:"Fresh water station",furn_group_kitchen:"Kitchen",furn_group_sleeping:"Sleeping",furn_group_bath:"Bath & laundry",furn_group_work:"Work & other",furn_entity:"Device (switch, plug \u2026)",furn_state_entity:"State from (optional)",furn_state_entity2:"Second state (the other half)",furn_tap:"Tapping the item",furn_tap_default:"As usual",furn_tap_hint:"An own action like the star menu's own buttons, e.g. a browser_mod popup with your card.",furn_show_when:"Only show while \u2026",furn_show_when_state:"\u2026 is in state (empty = on)",furn_show_when_invert:"The other way round: show while it is not",furn_show_when_hint:"Seasonal decoration that only stands in December: a helper (input_boolean), a calendar or a sensor decides whether the piece shows in 3D. Separate several states with commas. The editor always shows it.",picture_upload:"Upload a photo",picture_replace:"Upload another photo",picture_stored:"An own photo is stored.",picture_url:"\u2026 or picture address",picture_entity:"\u2026 or an entity's picture",picture_border:"Mat (%)",picture_fit:"Photo",picture_fit_cover:"fills the frame",picture_fit_contain:"shown whole",picture_hint:"Your photo in the frame, in 3D and on the wall tablet. Uploaded photos are stored with the plan in a smaller size; an image entity (a photo of the day) or a camera shows its current picture.",furn_state_split:"Halves",furn_state_left_right:"Left / right",furn_state_top_bottom:"Bottom / top (bunk bed)",furn_state_hint:"The item glows while the entity reports on, occupied or home \u2013 a bed with an occupancy mat, an armchair, the sauna. Two entities light the halves: left and right, bottom and top for a bunk bed.",furn_entity_tv:"TV (media player or smart plug)",fix:"Fix",unfix:"Release",fix_hint:"Fixed: cannot be moved by accident any more (key L, right-click or long press)",fixed_drag_hint:"\u{1F512} Fixed \u2013 release it first to move it (lock in the form, right-click or key L)",fixed_delete_confirm:"This item is fixed. Delete it anyway?",lock_plan:"\u{1F512} Floor plan",lock_plan_hint:"Lock the floor plan: rooms, walls, doors, windows and outdoor areas cannot be moved by accident. Furniture and devices stay free.",start_view:"Start view",start_view_hint:"The 3D view, the card and the kiosk open the house with this view, e.g. from the garden side. Turn, zoom and move the house in the 3D pane on the right until it fits, then remember it.",start_view_card:"If a card should open with a different view, put this line into its YAML configuration.",start_view_set:"Remember the current 3D view as the start",start_view_reset:"Default",start_view_saved:"An own start view is saved.",ctx_rotate:"Turn 90\xB0",devices_placed_in:"in {room}",devices_narrow:"{n} more \u2013 narrow the search",climate:"Room climate",climate_temperature:"Temperature",climate_humidity:"Humidity",climate_co2:"CO\u2082",climate_hint:"These sensors count for the heatmap and the room panel. \u201CAutomatic\u201D takes the sensors of the area and the ones placed in the room, but no device temperatures (3D printer, heat pump, flow \u2026).",climate_more:"\u2026 and another sensor (averaged)",plan_locked:"Floor plan locked",plan_lock:"Lock floor plan",plan_unlock:"Unlock floor plan",opening_mark:"Highlight in 3D",opening_mark_open:"When open",opening_mark_closed:"When closed (e.g. WC)",opening_mark_hint:"A highlighted window or door glows warm. \u201CWhen closed\u201D needs a contact; without a sensor nothing is highlighted.",window_opens:"Opens",window_opens_turn:"Turn and tilt (inwards)",window_opens_slide:"Sliding (sliding window, lift-and-slide door)",window_opens_top:"Top-hung (bottom swings out)",window_opens_hint:"Sliding: the pane on the hinge side slides in front of the fixed one; with two leaves the middle two slide outwards. Top-hung windows open with their contact or a tilt sensor.",marker_show:"Marker in 3D",marker_show_hint:"Automatic follows the None / Important / All switch of the 3D view. Always show and Hide apply regardless (except with None).",pin_shift:"Move the pin",pin_shift_up:"\u2191 up",pin_shift_hint:"When devices stand close together, push the pin a little aside or up here (in metres); the device itself stays where it is.",marker_show_auto:"Automatic",marker_show_always:"Always show",marker_show_no_power:"Without watts",marker_show_active:"Only while active",marker_show_never:"Hide",marker_icon:"Own symbol (Material Design icon)",device_name:"Own name (optional)",show_name:"Show the name under the marker in 3D",card_marker_names:"Own names at the markers",card_marker_names_hint:"Every device with an own name shows it small under its marker \u2013 three thermometers in the garden stay apart.",card_tap_in_room:"Switch devices only in the opened room",card_tap_in_room_hint:"In the house and floor views a tap opens the floor or room, even on a device or its marker. In the opened room it switches the device. A long press always opens its menu or details.",card_markers_outside:"Choose the markers outside the opened room",card_markers_outside_hint:`In the house, on the floor and in the other rooms only the ticked kinds; in the opened room all, as set above. A device's own "always" and "never" come first.`,marker_kind_light:"Lights",marker_kind_cover:"Blinds",marker_kind_climate:"Heating",marker_kind_media:"Media",marker_kind_switch:"Switches",marker_kind_fan:"Fans",marker_kind_lock:"Locks",marker_kind_binary:"Contacts and detectors",marker_kind_sensor:"Sensors",marker_kind_tap:"Furniture with an action",marker_kind_other:"Other",device_name_hint:'A name for the plan and the room panel only, e.g. "Island accent light" \u2013 the entity in Home Assistant stays as it is.',device_simple:"Switch only in the room panel",device_simple_hint:"The room panel shows only the switch for this lamp, without brightness, colour temperature and colours.",floor_turn:"Turn 90\xB0",floor_shift_all:"Take every floor along (whole house)",floor_shift_all_hint:"Shift and turn act on every floor with the roof sections, outdoor areas, energy devices and meter \u2013 the whole house moves as one.",floor_turn_hint:"Turns everything on the floor by 90\xB0 clockwise about the middle of its rooms \u2013 when a floor was drawn the wrong way round. Three times = 270\xB0.",marker_icon_hint:"The name of a Material Design icon as in Home Assistant, e.g. mdi:thermometer or mdi:water-alert. Empty = the symbol of the device kind.",furn_power:"Power sensor (W)",furn_links_hint:"With a power sensor the item shows its watts and takes part in the energy flow.",furn_links_hint_tv:"The screen glows while the TV is on, in the colour of the app (Netflix, YouTube \u2026); the label shows the app or title.",stairs_hint:"The stair rises towards the back (away from the marked front edge) and opens the ceiling of the floor above.",stair_shape:"Shape",stair_shape_straight:"Straight",stair_shape_quarter:"Quarter turn (winders)",stair_shape_l:"L with landing",stair_shape_half:"Half turn (winders)",stair_shape_u:"U with landing",stair_shape_spiral:"Spiral",stair_turn:"Turns (walking up)",stair_turn_left:"To the left",stair_turn_right:"To the right",stair_build:"Build",stair_build_solid:"Solid (concrete)",stair_build_stringer:"On stringers",stair_build_mono:"Mono stringer (spine)",stair_build_cantilever:"Cantilevered (floating)",stair_risers:"Closed risers",stair_steps:"Risers",stair_run_width:"Flight width (m)",stair_landing_after:"Risers up to the landing",stair_landing_hint:"The landing lies {h} cm above the floor; the other risers come after it.",stair_rail:"Railing",stair_rail_none:"None",stair_rail_left:"Left",stair_rail_right:"Right",stair_rail_both:"Both sides",stair_down:"Leads down",stair_down_hint:"The stair starts on this floor and leads down, for example into a cellar that need not be drawn. It opens the floor of this level.",stair_measures:"{steps} risers of {rise} cm \xB7 going {going} cm \xB7 step measure {measure} cm",stair_uncomfortable:"uncomfortable (step measure 59\u201365 cm, rise at most 21 cm)",stair_up_note:"The stair starts at the marked front edge. The floor above opens only where less than 2.2 m of headroom is left above the steps.",stair_down_note:"You step onto the stair at the marked front edge and walk down. The plan draws it dashed; this floor opens above the steps.",stair_opening:"Floor opening",stair_opening_headroom:"By headroom (only where needed)",stair_opening_full:"Over the whole stair",stair_opening_none:"None (hatch, closed stairwell)",stair_opening_hint:"How much of the floor the stair reaches it opens: the floor above, or its own floor for a stair going down. By headroom opens only above the steps that lack 2.2 m.",stair_up_note_plain:"The stair starts at the marked front edge and rises towards the back.",stair_upgrade:"Set the shape",stair_upgrade_hint:"Turns this into a stair with a shape (winding, L, U, spiral), build, railing and number of steps.",floor_lights:"{n} lights on",floor_open:"{n} open",floor_persons:"{n} people",energy_consumption:"Consumption",energy_grid_import:"Grid import",energy_grid_export:"Export",energy_solar:"Solar",energy_battery:"Battery",energy_tariff:"Tariff",energy:"Energy",energy_meter:"Meter",energy_grid:"Grid (W, + = import)",energy_solar_sensor:"Solar production (W)",energy_battery_sensor:"Battery power (W, + = discharging)",energy_battery_soc:"Battery charge (%)",energy_tariff_sensor:"Tariff (e.g. \u20AC/kWh)",energy_gas:"Gas meter (optional)",energy_water:"Water meter (optional)",energy_meters_hint:"Gas and water show with the house's balance \u2013 in the energy bar and on the house card: a sensor with the flow now (m\xB3/h, l/min) or today's reading.",energy_gas_short:"Gas",energy_water_short:"Water",energy_invert:"Invert sign",energy_hint:"Consumers are placed devices with a power sensor (W) \u2013 the sensor itself or one of the same device.",energy_balance:"Energy balance",energy_balance_hint:"Grid, solar and battery come from the devices in the plan: meter, inverter and home battery. Here you can choose other sensors, flip signs and set the house consumption.",energy_rest:"Common (rest)",energy_advanced:"Advanced energy mode",energy_advanced_on:"Use sub-meters",energy_show_unmetered:"Show unmetered use at sub-meters",energy_show_unmetered_hint:"A sub-meter's label then shows what its floors use and how much of it no placed device measures, e.g. \u201C500 W \xB7 450 W unmetered\u201D. Otherwise it shows the meter's reading.",energy_advanced_hint:"For sub-meters, e.g. one per flat behind a main meter: a meter can then hang off another one and feed its own floors. Off = the first meter is the grid connection, further ones are consumers.",energy_consumption_sensor:"House consumption (W, else from the balance)",energy_import_prefs:"Take over from the energy dashboard",energy_import_done:"{n} sensors taken over \u2013 please check the signs.",energy_import_none:"No matching power sensors (W) were found in the energy dashboard \u2013 please choose them by hand.",energy_import_failed:"Home Assistant's energy dashboard is not set up.",tool_meter:"Meter",hint_meter:"Tap the spot of the meter",presence:"Presence",ble:"Bluetooth locating",ble_hint:"Locate a Bluetooth tag (key fob, watch, phone) by room: walk through the rooms with it and record each room. NextFloor then compares how strongly Home Assistant's Bluetooth scanners (ESPHome proxies, Shelly devices with Bluetooth switched on, adapters on the server) hear it. Every tag gets a sensor whose state is the room name.",ble_unavailable:"Home Assistant's Bluetooth integration is not running. Without it there are no scanners.",ble_scanners:"{n} Bluetooth scanners in Home Assistant. The more scanners in different rooms, the more exact.",ble_add:"Add a tag or device",ble_trackers:"Phones and watches (Private BLE Device)",ble_devices:"Bluetooth devices found",ble_name:"Name (optional)",ble_refresh:"Reload the list",ble_add_button:"Add",ble_learn:"Learn rooms",ble_close:"Close",ble_spots:"{n} recordings",ble_now:"Now",ble_unknown:"unknown",ble_none_heard:"No scanner hears the tag right now. Hold it near a scanner and wait a moment; a tag only sends every few seconds.",ble_no_address:"This phone or watch has no known address right now. Check Home Assistant's Private BLE Device integration.",ble_one_scanner:"Only one scanner hears the tag. Telling rooms apart takes at least two, better three or more.",ble_learn_room:"Record a room",ble_record:"Record ({s} s)",ble_recording:"Recording \u2026 {s} s left",ble_forget_room:"Forget the room",ble_learn_hint:"Pick the room, press Record and walk slowly through the whole room with the tag in your hand, into the corners too. Recording again replaces the room. Learn every room you want to locate the tag in.",ble_sensor_hint:`The sensor "{name}" (device NextFloor) shows the room. Under Presence you can pick it as a person's room sensor.`,presence_hint:"Room sensor per person (e.g. ESPresense, Bermuda): its state names the room or area.",presence_sensor:"Room sensor",presence_room:"Default room",presence_room_none:"\u2013 none \u2013",presence_add:"Another entity (helper switch, tracker)",no_persons:"There are no people in Home Assistant."},lo=globalThis,so=globalThis.__NF_SHARED_TEXTS__?lo.__nextfloorBuiltin?.de??{}:Zh,ao=globalThis.__NF_SHARED_TEXTS__?lo.__nextfloorBuiltin?.en??{}:Yh;lo.__nextfloorBuiltin??={de:so,en:ao};var el=()=>typeof w=="object"&&w||{},Jh=globalThis,Ar=Jh.__nextfloorTexts??=new Map;function tl(n){let e=n.toLowerCase().split("-")[0];return e!=="de"&&e!=="en"&&e in el()?e:void 0}function nl(n){let e=tl(n),t=e===void 0?void 0:Ar.get(e);return t instanceof Promise?void 0:t}function Er(n,e){let t=tl(n?.language??navigator.language);if(t===void 0)return!1;let r=Ar.get(t);return r===void 0&&(r=fetch(new URL(`./lang/${t}.json?v=${el()[t]}`,import.meta.url)).then(i=>i.ok?i.json():{}).catch(()=>({})).then(i=>{Ar.set(t,i&&typeof i=="object"?i:{})}),Ar.set(t,r)),r instanceof Promise?(r.then(()=>e.requestUpdate()),!0):!1}function rl(n,e){return nl(n)?.[e]}function M(n,e,t={}){let r=n?.language??navigator.language,i=r.startsWith("de"),o=(i?void 0:nl(r)?.[e])??(i?so:ao)[e]??ao[e]??so[e]??e;for(let[s,a]of Object.entries(t))o=o.replace(`{${s}}`,String(a));return o}function L(n,e,t=2){return e.toLocaleString(n?.language??void 0,{maximumFractionDigits:t})}var il={light:"M8.5 17.5h7M9.5 20.5h5M12 2.5a6.5 6.5 0 0 0-3.5 12v1.5h7V14.5A6.5 6.5 0 0 0 12 2.5z",switch:"M6 5h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2zM12 7.5v9M9 12h6",fan:"M12 11.5c-1-3.5 0-7 2.5-7s2 4-2.5 7zm.5.5c3.5-1 7 0 7 2.5s-4 2-7-2.5zm-.5.5c1 3.5 0 7-2.5 7s-2-4 2.5-7zm-.5-.5c-3.5 1-7 0-7-2.5s4-2 7 2.5z",cover:"M3.5 3.5h17v3h-17zM6 6.5v12M18 6.5v12M8.5 9.5h7M8.5 12.5h7M8.5 15.5h7",climate:"M12 15V5.5a2.5 2.5 0 0 0-5 0V15a4.5 4.5 0 1 0 5 0zM9.5 9v7M15 5.5h5M15 9.5h4",media:"M3.5 5.5h17v11h-17zM8 20.5h8M12 16.5v4M10 8.5v5l4.5-2.5z",lock:"M5.5 10.5h13v9.5h-13zM8 10.5V7.5a4 4 0 0 1 8 0v3M12 14v3",sensor:"M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM12 7.5v4.5l3.5 2",binary:"M5.5 20.5v-17h10v17M3.5 20.5h14M9 20.5v-13h4.5v13M12.5 14h.01",scene:"M5.5 18.5l8-8M14 3.5l1 2.5 2.5 1-2.5 1-1 2.5-1-2.5-2.5-1 2.5-1zM18.5 12l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z",script:"M8.5 3.5h8.5a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H7.5a2 2 0 0 1-2-2v-2h9M8.5 3.5a2 2 0 0 0-2 2v10M9.5 8.5h6M9.5 11.5h4"},Rr=n=>il[n];function He(n){return``}function Lt(n){return``}function Qh(n){let e=n?.attributes;return{temperature:"\u{1F321}",humidity:"\u{1F4A7}",carbon_dioxide:"\u2601",illuminance:"\u2600",power:"\u26A1",energy:"\u26A1"}[String(e?.device_class)]??(e?.unit_of_measurement==="\xB0C"?"\u{1F321}":"\u25C9")}function zr(n,e=[]){return e.flatMap(t=>{if(!t.entity||t.entity==="none")return[];let r=n.states[t.entity],i="\u2013";if(r&&!C(r)){let o=r.attributes;if(typeof o.symcon_formatted=="string"&&o.symcon_formatted.trim())i=o.symcon_formatted;else{let s=o.symcon_numeric_value??r.state,a=typeof s=="number"||typeof s=="string"&&s.trim()?Number(s):NaN;i=Number.isFinite(a)?`${L(n,a,n.entities?.[t.entity]?.display_precision??(o.symcon_variable_type===1?0:1))}${o.unit_of_measurement?` ${o.unit_of_measurement}`:""}`:String(s??"\u2013")}}return[{id:t.id,entity:t.entity,icon:t.icon?.trim()||Qh(r),label:t.label?.trim()||O(n,t.entity),text:i}]})}function wn(n,e=[]){return zr(n,e).map(t=>`${t.icon} ${t.label&&e.find(r=>r.id===t.id)?.label?`${t.label}: `:""}${t.text}`).join(" \xB7 ")}function ol(n,e,t){let r=e.color_entity&&e.color_entity!=="none"?e.color_entity:t;return r?n.states[r]:void 0}function Tr(n,e){if(n.animations_enabled===!1||e?.state!=="on")return;let t=e.attributes.effect;if(typeof t!="string"||!n.effect_animations||!Object.prototype.hasOwnProperty.call(n.effect_animations,t))return;let r=n.effect_animations[t];return r==="rainbow"||r==="pulse"||r==="flicker"||js(r)?r:void 0}var ot=(n,e)=>M(n,e),Xh=(n,e)=>ot(n,e?"state_on":"state_off");function Fr(n,e){let t=`state_${e}`,r=M(n,t);return r===t?e:r}var em=new Set(["door","window","opening","garage_door"]),tm=new Set(["playing","paused","on","idle"]);function nm(n,e){if(e.state!=="on")return ot(n,"state_off");let t=e.attributes.brightness;return typeof t=="number"?`${Math.round(t/255*100)} %`:ot(n,"state_on")}function sl(n,e){let t=e.attributes.current_position,r=e.state==="opening"||e.state==="closing";return typeof t=="number"&&!r?`${t} %`:Fr(n,e.state)}function rm(n,e){let t=e.attributes.current_temperature,r=typeof t=="number"?`${L(n,t,1)} ${n?ie(n):"\xB0C"}`:null;return e.state==="off"?r?`${r} \xB7 ${ot(n,"state_off")}`:ot(n,"state_off"):r??Fr(n,e.state)}function im(n,e){let t=[e.attributes.app_name,e.attributes.media_title,e.attributes.source].find(r=>typeof r=="string"&&r!=="");return tm.has(e.state)&&t?t:Fr(n,e.state)}function om(n,e){let t=e.state==="on";return em.has(String(e.attributes.device_class))?ot(n,t?"state_open":"state_closed"):ot(n,t?"state_detected":"state_clear")}function sm(n,e,t=new Date){let r=new Date(e.state);if(Number.isNaN(r.getTime()))return"\u2013";let i=n?.language??navigator.language,s=r.toDateString()===t.toDateString()?{hour:"2-digit",minute:"2-digit"}:{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"};return new Intl.DateTimeFormat(i,s).format(r)}function am(n,e){if(e.entity_id.startsWith("event."))return sm(n,e);let t=Number(e.state);if(!Number.isFinite(t))return e.state;let r=n?.entities?.[e.entity_id]?.display_precision??1,i=e.attributes.unit_of_measurement;return`${L(n,t,r)}${typeof i=="string"&&i?` ${i}`:""}`}function ae(n,e){if(!e||C(e))return ot(n,"state_unavailable");switch(P(e.entity_id)){case"light":return nm(n,e);case"switch":case"fan":return e.entity_id.startsWith("valve.")?sl(n,e):Xh(n,e.state==="on");case"cover":return sl(n,e);case"climate":return rm(n,e);case"media":return im(n,e);case"lock":return Fr(n,e.state);case"binary":return om(n,e);case"sensor":return am(n,e);default:return""}}var lm=(n,e,t)=>n.rooms.find(r=>r.points.length>=3&&H([e,t],r.points))??null;function co(n,e){return!n||e==null||e===1?n:{...n,level:Math.min(1.5,Math.max(.02,n.level*e))}}function cm(n,e,t){let r=n.states[t.entity_id],i=P(t.entity_id)??Dt(t.entity_id,r);if(!i||!r)return null;let o=t.outside?null:lm(e,t.x,t.z),s=o?.area_id?n.areas?.[o.area_id]?.name:void 0,a={id:t.entity_id,floorId:e.id,roomId:o?.id??null,x:t.x,z:t.z,y:t.y??It(i,ke(e,t.x,t.z),t.mount??null)+(i==="light"&&(t.mount??"ceiling")==="ceiling"?0:lr(e,t.x,t.z)),lamp:i==="light"?t.mount??"ceiling":null,ceiling:ke(e,t.x,t.z),rotation:t.rotation??0,icon:t.icon?He(t.icon):Lt(i),name:t.name||O(n,t.entity_id,s),ownName:t.name||void 0,showName:!!t.show_name,text:[ae(n,r),wn(n,t.values)].filter(Boolean).join(" \xB7 "),active:i==="cover"&&!!t.cover_inverted!=(!!t.position&&!!t.position_inverted)&&!C(r)?!ne(r):ne(r),unavailable:C(r),glow:i==="light"?co(Be(r),t.glow_scale):null,effect:i==="light"?Tr(t,r):void 0,show:t.marker??void 0,fixed:!!t.locked};return a.wedge=Js({hass:n,entityId:t.entity_id,state:r},{floorId:e.id,roomId:a.roomId,x:a.x,z:a.z,y:a.y,rotation:a.rotation??0},t.plugin??void 0),uo(n,a,r,!!t.icon)}function uo(n,e,t,r){let i=qs({hass:n,entityId:e.id,state:t});if(!i)return e;let o=i.icon&&!r?i.icon.trimStart().startsWith("t.placements.map(r=>cm(n,t,r)).filter(r=>r!==null))}var ll=n=>n.floors.flatMap(e=>e.placements.map(t=>t.entity_id));function Se(n,e){n.dispatchEvent(new CustomEvent("hass-more-info",{detail:{entityId:e},bubbles:!0,composed:!0}))}function cl(n,e){return n.callService(e.split(".")[0],"toggle",{entity_id:e})}function hl(n,e,t=!1){if(t)return!1;if(!Array.isArray(n.screens)||!n.screens.length)return!0;let r=(e??"").trim().toLocaleLowerCase();return!!r&&n.screens.some(i=>i.trim().toLocaleLowerCase()===r)}var Ot=globalThis.__nfAnnounced??new Set;globalThis.__nfAnnounced=Ot;function ml(n){let e=`${n.time}|${n.message}`;return Ot.has(e)?!1:(Ot.add(e),Ot.size>50&&Ot.delete(Ot.values().next().value),!0)}var pl=n=>Math.min(3e4,Math.max(6e3,n.split(/\s+/).length*600+2e3));function um(){try{let n=globalThis.AudioContext??globalThis.webkitAudioContext;if(!n)return Promise.resolve();let e=new n,t=(r,i)=>{let o=e.createOscillator(),s=e.createGain();o.type="sine",o.frequency.value=r,s.gain.setValueAtTime(1e-4,e.currentTime+i),s.gain.exponentialRampToValueAtTime(.25,e.currentTime+i+.03),s.gain.exponentialRampToValueAtTime(1e-4,e.currentTime+i+.9),o.connect(s).connect(e.destination),o.start(e.currentTime+i),o.stop(e.currentTime+i+1)};return t(880,0),t(660,.35),new Promise(r=>setTimeout(()=>{e.close().catch(()=>{}),r()},1400))}catch{return Promise.resolve()}}function dm(n,e){let t=globalThis.speechSynthesis,r=globalThis.SpeechSynthesisUtterance;if(!t||!r)return;let i=new r(e);i.lang=n.language||"en",t.cancel(),t.speak(i)}async function fl(n,e){if(await um(),e.audio)try{let t=e.audio.startsWith("/")&&n.hassUrl?n.hassUrl(e.audio):e.audio;await new Audio(t).play();return}catch{}dm(n,e.message)}function gl(n,e){return n.connection.subscribeMessage(e,{type:"nextfloor/announcements/subscribe"}).then(t=>()=>{t().catch(()=>{})},()=>()=>{})}var ul=/^(media_player|assist_satellite)\./;function hm(n,e){return e?Object.values(n.entities??{}).filter(t=>!t.hidden&&(t.area_id??(t.device_id?n.devices?.[t.device_id]?.area_id:null))===e).map(t=>t.entity_id):[]}function dl(n,e){let t=n.states[e];return!t||t.state==="unavailable"?!1:e.startsWith("notify.")?n.entities?.[e]?.platform==="alexa_devices"&&e.endsWith("_announce"):t.state==="off"||t.state==="unknown"?!1:t.attributes.device_class!=="tv"}function mm(n,e,t){if(t.announce_speaker==="none")return null;if(t.announce_speaker)return t.announce_speaker;if(e&&t.points.length>=3){let o=[...e.placements.filter(s=>ul.test(s.entity_id)).map(s=>({id:s.entity_id,x:s.x,z:s.z})),...e.furniture.filter(s=>s.entity&&ul.test(s.entity)).map(s=>({id:s.entity,x:s.x,z:s.z}))].find(s=>H([s.x,s.z],t.points)&&dl(n,s.id));if(o)return o.id}let r=hm(n,t.area_id);for(let i of["assist_satellite.","notify.","media_player."]){let o=r.filter(s=>s.startsWith(i)&&dl(n,s)).sort()[0];if(o)return o}return null}var _l=(n,e,t)=>mm(n,e,t)!==null,bl=n=>!!n?.services?.nextfloor?.announce;var yl=[{key:"supply_vsr",label:"Zuluft-VSR",types:[0,1,2],control:!0},{key:"extract_vsr",label:"Abluft-VSR",types:[0,1,2],control:!0},{key:"supply_temperature",label:"Zulufttemperatur",types:[1,2]},{key:"extract_temperature",label:"Ablufttemperatur",types:[1,2]},{key:"reheat",label:"NHR (Nachheizregister)",types:[0,1,2],control:!0},{key:"status",label:"Raumstatus",types:[1]}];var ve=Q` :host { --nf-text: var(--primary-text-color, #e1e1e1); --nf-muted: var(--secondary-text-color, #9b9b9b); --nf-accent: var(--primary-color, #03a9f4); --nf-accent-text: var(--text-primary-color, #ffffff); --nf-surface: var(--ha-card-background, var(--card-background-color, #1c1c1c)); --nf-bg: var(--primary-background-color, #111111); --nf-bg2: var(--secondary-background-color, #1c1c1c); /* floating bars and cards over the 3D view: the card colour, a little see-through */ --nf-chrome: color-mix(in srgb, var(--nf-surface) var(--nf-chrome-mix, 84%), transparent); --nf-chrome-solid: var(--nf-surface); --nf-line: var(--divider-color, rgba(255, 255, 255, 0.12)); /* quiet fills for buttons and fields, and the tonal accent of an active control */ --nf-fill: color-mix(in srgb, var(--nf-text) 7%, transparent); --nf-fill-strong: color-mix(in srgb, var(--nf-text) 13%, transparent); --nf-tonal: color-mix(in srgb, var(--nf-accent) 20%, transparent); --nf-soft: var(--info-color, #4a90e2); --nf-warm: var(--state-light-active-color, #ffa726); --nf-danger: var(--error-color, #db4437); --nf-good: var(--success-color, #43a047); --nf-radius: var(--ha-card-border-radius, 12px); --nf-shadow: var(--ha-card-box-shadow, 0 1px 2px rgba(0, 0, 0, 0.18), 0 6px 20px rgba(0, 0, 0, 0.2)); --nf-font: var(--primary-font-family, Roboto, "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif); --nf-title-font: var(--nf-font); font-family: var(--nf-font); color: var(--nf-text); } `,Dr=Q` :host([readable]) { --secondary-text-color: var(--primary-text-color, #e1e1e1); --divider-color: color-mix(in srgb, var(--primary-text-color, #e1e1e1) 40%, transparent); --nf-chrome-mix: 97%; } :host([readable]) nf-room-panel, :host([readable]) .nf-nav, :host([readable]) .nf-overlay { zoom: 1.2; } `,Pe=Q` /* a group of switches: one rounded pill, the active one tinted with the accent */ .nf-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--nf-chrome); box-shadow: var(--nf-shadow); backdrop-filter: blur(10px); } .nf-seg button, .nf-chip { font: inherit; font-size: 14px; font-weight: 500; border: none; background: none; color: var(--nf-muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; min-height: 36px; transition: background 0.15s, color 0.15s; } .nf-seg button:hover:not(:disabled), .nf-chip:hover { background: var(--nf-fill); color: var(--nf-text); } /* on a small stage (a small window, a zoomed browser, a dashboard column) the switches at the bottom take less room */ @container nf ((max-width: 1360px) or (max-height: 640px)) { :is(.nf-overlay, .nf-card-controls) .nf-seg { padding: 3px; } :is(.nf-overlay, .nf-card-controls) :is(.nf-seg button, .nf-chip) { font-size: 12.5px; padding: 5px 10px; } } .nf-time-slider { display: inline-flex; align-items: center; padding: 4px 10px; } .nf-time-slider input { width: 160px; accent-color: var(--nf-accent); } .nf-seg button[aria-pressed="true"], .nf-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--nf-accent) 24%, var(--nf-chrome-solid)); color: var(--nf-accent); font-weight: 600; } .nf-seg button:disabled { opacity: 0.4; cursor: default; } /* a single pill, like the chips of the Mushroom cards */ .nf-chip { background: var(--nf-chrome); color: var(--nf-text); box-shadow: var(--nf-shadow); backdrop-filter: blur(10px); } button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--nf-accent); outline-offset: 2px; } /* the round icon badge every row and card starts with */ .nf-ico { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--nf-tonal); color: var(--nf-accent); --mdc-icon-size: 20px; } .nf-ico.nf-warm { background: color-mix(in srgb, var(--nf-warm) 22%, transparent); color: var(--nf-warm); } .nf-ico.nf-off { background: var(--nf-fill); color: var(--nf-muted); } .nf-btn { font: inherit; font-size: 14px; font-weight: 500; border: none; background: var(--nf-fill); color: var(--nf-text); border-radius: var(--nf-radius); padding: 7px 14px; cursor: pointer; min-height: 36px; transition: background 0.15s; } .nf-btn:hover { background: var(--nf-fill-strong); } .nf-btn.nf-danger { color: var(--nf-danger); } .nf-btn.nf-primary { background: var(--nf-accent); color: var(--nf-accent-text); } .nf-btn.nf-primary:hover { background: color-mix(in srgb, var(--nf-accent) 88%, var(--nf-text)); } .nf-field { display: grid; gap: 4px; font-size: 12px; color: var(--nf-muted); } .nf-field input, .nf-field select, .nf-field textarea { font: inherit; font-size: 14px; color: var(--nf-text); background: var(--nf-fill); border: none; border-bottom: 1px solid var(--nf-line); border-radius: 10px 10px 4px 4px; padding: 8px 10px; min-width: 0; } .nf-field input:focus, .nf-field select:focus, .nf-field textarea:focus { border-bottom-color: var(--nf-accent); } .nf-field input[type="range"] { padding: 0; accent-color: var(--nf-accent); } .nf-field select option { background: var(--nf-chrome-solid); color: var(--nf-text); } /* fingers need 40 px */ @media (pointer: coarse) { .nf-seg button, .nf-chip, .nf-btn { min-height: 40px; } } `;function Hr(n){return n?.themes?.darkMode===!1?"light":"dark"}function xn(n,e){let t=new Set;return e.flatMap(r=>{let i=String(n?.states[r]?.attributes.symcon_source_entity||r),o=n?.states[i]?.attributes,s=Number(o?.symcon_id);return!s||!o?.symcon_archive||t.has(s)?[]:(t.add(s),[i])})}var vl,ho=class extends X{static properties={hass:{attribute:!1},ids:{attribute:!1},label:{attribute:!1},busy:{state:!0},error:{state:!0}};constructor(){super(),this.ids=[],this.label="",this.busy=!1,this.error=""}async open(e){e.stopPropagation(),this.busy=!0,this.error="";try{let t=new URL("./nextfloor-trend.js?v=84417e0b2573",import.meta.url).href;await(await(vl??=import(t).catch(i=>{throw vl=void 0,i}))).openTrend(this.hass,this.ids,this.label)}catch(t){this.error=t instanceof Error?t.message:String(t)}finally{this.busy=!1}}render(){if(!xn(this.hass,this.ids).length)return f;let e=this.label?`Trend anzeigen: ${this.label}`:"Trend anzeigen";return p`${this.error?p`${this.error}`:f}`}static styles=Q`:host{position:relative;display:inline-flex;flex:0 0 18px;width:18px;height:18px;vertical-align:middle;margin-left:3px;font-weight:normal;line-height:0}button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;padding:2px;border:0;border-radius:3px;background:transparent;color:var(--nf-accent,#40c8ff);opacity:.8;cursor:pointer}svg{display:block;flex-shrink:0}button:hover,button:focus-visible{opacity:1;background:#40c8ff18}button:focus-visible{outline:1px solid currentColor;outline-offset:1px}button:disabled{opacity:.4}span{position:absolute;right:0;top:22px;z-index:10;box-sizing:border-box;width:200px;padding:8px;border:1px solid #ff9b9b50;border-radius:6px;background:var(--nf-chrome-solid,#1c1c1c);font:12px/1.4 system-ui;color:#ff9b9b;white-space:normal}`};customElements.get("nf-trend-button")||customElements.define("nf-trend-button",ho);function U(n,e,t=""){let r=xn(n,e);return r.length?p``:f}var mo=class extends X{static properties={hass:{attribute:!1},room:{attribute:!1},_pending:{state:!0},_error:{state:!0}};constructor(){super(),this._pending=new Set,this._error=""}async send(e,t,r,i){if(W(this.hass,e)){this._pending=new Set([...this._pending,e]),this._error="";try{await this.hass.callService(t,r,{entity_id:e,...i})}catch(o){this._error=o instanceof Error?o.message:String(o)}finally{this._pending=new Set([...this._pending].filter(o=>o!==e))}}}value(e,t,r){let i=this.hass.states[t],o=ge(i),s=i?.attributes,a=r&&!!s?.symcon_has_action&&o!==null&&!this._pending.has(t);return p`
${e}${De(i)}${U(this.hass,[t],e)} ${r&&s?.symcon_has_action&&s.symcon_variable_type===0?p``:r&&s?.symcon_has_action&&[1,2].includes(Number(s.symcon_variable_type))?p`{let c=l.target;c.value.trim()&&c.checkValidity()&&this.send(t,"symcon","set_value",{value:Number(c.value)})}} />`:f}
`}schedule(e){let t=this.hass.states[e];if(!t?.attributes.symcon_schedule)return p`

Schaltuhr nicht verfügbar

`;let r=t.attributes.actions??[],i=t.attributes.groups??[],o=Number(t.attributes.next_run??0),s=r.find(c=>c.id===t.attributes.next_action),a=["Mo","Di","Mi","Do","Fr","Sa","So"],l=c=>`${String(c.hour).padStart(2,"0")}:${String(c.minute).padStart(2,"0")}${c.second?`:${String(c.second).padStart(2,"0")}`:""}`;return p`
${String(t.attributes.friendly_name??"Schaltuhr")} ${o>0?p`

Nächster Schaltpunkt: ${new Date(o*1e3).toLocaleString(this.hass.language)}${s?` \xB7 ${s.name}`:""}

`:f} ${i.length?i.map(c=>p`
${a.filter((u,h)=>c.days&1<
${[...c.points].sort((u,h)=>u.hour*3600+u.minute*60+u.second-(h.hour*3600+h.minute*60+h.second)).map(u=>{let h=r.find(m=>m.id===u.action);return p`${h?.name||"Aktion"}`})}
`):p`

Keine Schaltpunkte vorhanden.

`}
`}render(){if(!this.hass||!this.room)return f;let e=yl.filter(i=>i.key!=="status"&&this.room.hvac?.[i.key]&&this.room.hvac[i.key]!=="none"),t=this.room.hvac?.schedules??[],r=this.room.floor_heating&&this.room.floor_heating!=="none"?this.room.floor_heating:null;return p`${r||e.length?p`

Raumklima

${r?this.value("Fu\xDFbodenheizung",r,!0):f}${e.map(i=>this.value(i.label,this.room.hvac[i.key],!!i.control))}
`:f} ${t.length?p`

Schaltuhren

${t.map(i=>this.schedule(i))}
`:f} ${this._error?p``:f}`}static styles=[ve,Pe,Q` :host { display:block; } section { margin:18px 0; } h3 { font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--nf-muted); margin:0 0 8px; } .value { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; padding:10px 0; border-bottom:1px solid var(--nf-line); } .value b { font-size:13px; color:var(--nf-muted); } .value input,.value button { grid-column:2; max-width:110px; min-width:0; } input[type=number] { background:var(--nf-fill); color:var(--nf-text); border:1px solid var(--nf-line); border-radius:8px; padding:6px 8px; font:inherit; box-sizing:border-box; } .schedule { margin:8px 0; padding:10px; border:1px solid var(--nf-line); border-radius:10px; } summary { cursor:pointer; font-weight:600; } .nf-check { margin-top:10px; } .next,.missing { color:var(--nf-muted); font-size:12px; } .schedule-group { padding:10px 0; border-top:1px solid var(--nf-line); font-size:12px; } .points { display:flex; gap:6px 14px; flex-wrap:wrap; margin-top:8px; } .point { display:inline-flex; align-items:center; gap:6px; } .point time { font-variant-numeric:tabular-nums; } .dot { width:8px; height:8px; border-radius:50%; } .error { color:var(--nf-danger,#ff6b7a); font-size:12px; } `]};customElements.get("nf-room-hvac")||customElements.define("nf-room-hvac",mo);var pm=new Set(["on","home","open","true","active","playing","heat","heating"]);function je(n,e){let t=e.show_when;if(!t?.entity||!n)return!0;let r=n.states[t.entity];if(!r||C(r))return!0;let i=String(r.state).toLowerCase(),o=(t.state??"").split(",").map(a=>a.trim().toLowerCase()).filter(Boolean),s=o.length?o.includes(i):pm.has(i)||Number.isFinite(Number(i))&&Number(i)>0;return t.invert?!s:s}function po(n,e){let t=[];for(let r of e.floors)for(let i of r.furniture)je(n,i)||t.push(i.id);return t.sort()}function wl(n,e){if(!e.length)return n;let t=new Set(e);return{...n,floors:n.floors.map(r=>r.furniture.some(i=>t.has(i.id))?{...r,furniture:r.furniture.filter(i=>!t.has(i.id))}:r)}}function le(n,e){if(!Oi(e))return M(n,`furn_${e}`);let t=ee(e);return t?fm(t,e,n?.language??navigator.language):M(n,"pack_missing_item")}function fm(n,e,t){return n.name[t.split("-")[0]]??rl(t,e)??aa(n,t)}var te=(n,e)=>[n[0]-e[0],n[1]-e[1]],Ie=(n,e)=>[n[0]+e[0],n[1]+e[1]],$e=(n,e)=>[n[0]*e,n[1]*e],de=(n,e)=>n[0]*e[0]+n[1]*e[1],qe=(n,e)=>n[0]*e[1]-n[1]*e[0],Ze=n=>Math.hypot(n[0],n[1]),Me=n=>{let e=Ze(n)||1;return[n[0]/e,n[1]/e]},fo=n=>[-n[1],n[0]],go=n=>[n[1],-n[0]];function xl(n){let e=n.heightEnd!==void 0;return{...n,a:n.b,b:n.a,left:n.right,right:n.left,roomLeft:n.roomRight,roomRight:n.roomLeft,height:e?n.heightEnd:n.height,heightEnd:e?n.height:void 0}}function gm(n,e){let t=n.map(r=>({...r}));for(let r of e){let i=t.find(o=>o.room_id===r.room_id&&o.edge===r.edge&&(Math.abs(o.t1-r.t0)<1e-6||Math.abs(r.t1-o.t0)<1e-6));i?(i.t0=Math.min(i.t0,r.t0),i.t1=Math.max(i.t1,r.t1)):t.push({...r})}return t}function _m(n,e,t){if(n.a===e.b)return!1;let r=Me(te(t[n.b],t[n.a])),i=Me(te(t[e.b],t[e.a]));return Math.abs(qe(r,i))>1e-6||de(r,i)<=0||n.free||e.free||n.heightEnd!==void 0||e.heightEnd!==void 0?!1:n.height===e.height&&n.exterior===e.exterior&&n.roomLeft===e.roomLeft&&n.roomRight===e.roomRight&&Math.abs(n.left-e.left)<=1e-9&&Math.abs(n.right-e.right)<=1e-9}function kl(n,e,t=new Set){let r=n.slice();for(;;){let i=new Map;r.forEach((s,a)=>{for(let l of[s.a,s.b])i.set(l,[...i.get(l)??[],a])});let o=null;for(let[s,a]of i){if(a.length!==2||t.has(s))continue;let l=r[a[0]].b===s?r[a[0]]:xl(r[a[0]]),c=r[a[1]].a===s?r[a[1]]:xl(r[a[1]]);if(!_m(l,c,e))continue;let u={...l,b:c.b,sources:gm(l.sources,c.sources)};o=[...r.filter((h,m)=>m!==a[0]&&m!==a[1]),u];break}if(!o)return r;r=o}}function Sl(n,e){let t=new Map;n.forEach((i,o)=>{let s=Me(te(e[i.b],e[i.a])),a=[[i.a,{key:`${o}:a`,d:s,left:i.left,right:i.right,angle:Math.atan2(s[1],s[0])}],[i.b,{key:`${o}:b`,d:$e(s,-1),left:i.right,right:i.left,angle:Math.atan2(-s[1],-s[0])}]];for(let[l,c]of a)t.set(l,[...t.get(l)??[],c])});let r=new Map;for(let[i,o]of t){let s=e[i];o.sort((l,c)=>l.angle-c.angle);for(let l of o)r.set(l.key,{left:Ie(s,$e(fo(l.d),l.left)),right:Ie(s,$e(go(l.d),l.right))});if(o.length<2)continue;let a=4*Math.max(...o.map(l=>Math.max(l.left,l.right)))+1e-9;o.forEach((l,c)=>{let u=o[(c+1)%o.length],h=Ie(s,$e(fo(l.d),l.left)),m=Ie(s,$e(go(u.d),u.right)),d=qe(l.d,u.d);if(Math.abs(d)<1e-4)return;let g=Ie(h,$e(l.d,qe(te(m,h),u.d)/d));Ze(te(g,s))>a||(r.get(l.key).left=g,r.get(u.key).right=g)})}return r}function $l(n,e){let t=n.filter((r,i)=>Ze(te(r,n[(i+1)%n.length]))>e);for(;;){if(t.length<=3)return t;let r=t.findIndex((i,o)=>{let s=t[(o+t.length-1)%t.length],a=t[(o+1)%t.length],[l,c]=[te(i,s),te(a,i)];return Math.abs(qe(Me(l),Me(c)))<1e-7&&de(l,c)>0});if(r===-1)return t;t=t.filter((i,o)=>o!==r)}}function bm(n){let e=[];return{points:e,idOf(t){let r=e.findIndex(i=>Math.abs(i[0]-t[0])<=n&&Math.abs(i[1]-t[1])<=n);return r>=0?r:(e.push([t[0],t[1]]),e.length-1)}}}function ym(n,e){let t=[];for(let r of n){let i=r.points;if(i.length<3||Math.abs(bt(i))<1e-6)continue;let o=bt(i)>0,s=i.map(a=>e.idOf(a));s.forEach((a,l)=>{let c=s[(l+1)%s.length];a!==c&&t.push(o?{u:a,v:c,room:r.id,edge:l,forward:!0}:{u:c,v:a,room:r.id,edge:l,forward:!1})})}return t}function vm(n,e,t){let r=[];for(let i of n){let[o,s]=[e[i.u],e[i.v]],a=te(s,o),l=Ze(a),c=$e(a,1/l),u=e.map((m,d)=>({id:d,rel:te(m,o)})).filter(({id:m,rel:d})=>m!==i.u&&m!==i.v&&de(d,c)>t&&de(d,c)({t:de(d,c),id:m})).sort((m,d)=>m.t-d.t),h=[{t:0,id:i.u},...u,{t:l,id:i.v}];for(let m=0;m+1({room_id:n.room,edge:n.edge,t0:n.t0,t1:n.t1});function wm(n,e){let t=new Map(n.map(a=>[a.id,a])),r=new Map;for(let a of e){let l=`${a.room}:${a.edge}`;r.set(l,[...r.get(l)??[],a.t0].sort((c,u)=>c-u))}let i=a=>{let l=t.get(a.room)?.wall_heights?.[a.edge];return Array.isArray(l)?l[(r.get(`${a.room}:${a.edge}`)??[]).indexOf(a.t0)]??null:l},o=a=>{let l=t.get(a.room),[c,u]=[l?.wall_heights?.[a.edge],l?.wall_slopes?.[a.edge]];if(!l||typeof c!="number"||typeof u!="number"||c<=0||u<=0)return null;let[h,m]=[l.points[a.edge],l.points[(a.edge+1)%l.points.length]];return{from:c,to:u,length:Math.hypot(m[0]-h[0],m[1]-h[1])}},s=a=>{let l=o(a);if(!l||l.length<1e-9){let u=i(a);return typeof u=="number"&&u>0?[u,u]:[null,null]}let c=u=>l.from+(l.to-l.from)*u/l.length;return a.forward?[c(a.t0),c(a.t1)]:[c(a.t1),c(a.t0)]};return{heightsOf(a){let[l,c]=[1/0,1/0];for(let h of a){let[m,d]=s(h),[g,_]=h===a[0]?[m,d]:[d,m];g!==null&&(l=Math.min(l,g)),_!==null&&(c=Math.min(c,_))}let u=a.map(h=>t.get(h.room)?.ceiling);if(u.every(h=>typeof h=="number"&&h>0)){let h=Math.max(...u);l===1/0&&(l=h),c===1/0&&(c=h)}return{...l<1/0?{a:l}:{},...c<1/0?{b:c}:{}}},thicknessOf(a){let l=a.map(c=>{let u=t.get(c.room)?.wall_thickness?.[c.edge];return Array.isArray(u)?u[(r.get(`${c.room}:${c.edge}`)??[]).indexOf(c.t0)]:u}).filter(c=>typeof c=="number"&&c>0);return l.length?Math.max(...l):void 0},hasNoWall:a=>a.some(l=>i(l)===0)}}function Al(n){let e=t=>Math.round(t*1e6)/1e6;return n.a===void 0||n.b===void 0?n.a!==void 0?{height:e(n.a)}:n.b!==void 0?{height:e(n.b)}:{}:Math.abs(n.a-n.b)<1e-6?{height:e(n.a)}:{height:e(n.a),heightEnd:e(n.b)}}function xm(n,e,t,r){let i=wm(e,n),o=new Map;for(let l of n){let c=l.um!==c&&m.u===c.v&&m.v===c.u&&m.room!==c.room);for(let m of l)m!==c&&m!==u&&m.room!==c.room&&r.push(`overlap:${c.room}:${m.room}`);let h=u?[c,u]:[c];if(i.hasNoWall(h)){u&&a.push([c.room,u.room]);continue}if(u){let m=i.thicknessOf(h)??t.interior;s.push({a:c.u,b:c.v,left:m/2,right:m/2,exterior:!1,roomLeft:c.room,roomRight:u.room,sources:h.map(Ml),...Al(i.heightsOf(h))})}else s.push({a:c.u,b:c.v,left:0,right:i.thicknessOf(h)??t.exterior,exterior:!0,roomLeft:c.room,roomRight:null,sources:[Ml(c)],...Al(i.heightsOf(h))})}return{drafts:s,open:a}}function km(n,e){let t=o=>Me(te(e[o.b],e[o.a])),r=n.filter(o=>!o.exterior&&!o.free),i=new Map;for(let o of r){if(i.has(o))continue;let s=[o];i.set(o,s);for(let a=0;a1e-6||l.add(de(s,d)>0?"left":"right")}if(l.size!==1)continue;let c=[...l][0];for(let u of o){let h=u.left+u.right,m=de(t(u),s)>0,d=c==="left"===m;[u.left,u.right]=d?[0,h]:[h,0]}}}var Sm=(n,e)=>{let t=o=>Math.round(o*100),[r,i]=n[0]Math.hypot(y.b[0]-y.a[0],y.b[1]-y.a[1])>.05),l=a.map(y=>[o.idOf(y.a),o.idOf(y.b)]),c=new Set;for(let y of n){let $=y.points;$.length<3||(y.wall_splits??[]).forEach((S,A)=>{if(!S||A>=$.length)return;let z=$[A],x=te($[(A+1)%$.length],z),D=Ze(x);for(let T of S)T>r&&T{let[S,A]=l[$];if(S===A)return;let z=[(y.a[0]+y.b[0])/2,(y.a[1]+y.b[1])/2],x=n.find(T=>T.points.length>=3&&H(z,T.points))?.id??null,D=(y.thickness??e.interior)/2;d.push({free:y.id,a:S,b:A,left:D,right:D,exterior:!1,roomLeft:x,roomRight:x,sources:[],height:typeof y.height=="number"&&y.height>0?y.height:void 0,...typeof y.height=="number"&&y.height>0&&typeof y.height_end=="number"&&y.height_end>0&&Math.abs(y.height_end-y.height)>1e-6?{heightEnd:y.height_end}:{}})});let g=kl(d,o.points,c),_=Sl(g,o.points);return{walls:g.map((y,$)=>{let[S,A]=[o.points[y.a],o.points[y.b]],[z,x]=[_.get(`${$}:a`),_.get(`${$}:b`)],D=$l([z.right,x.left,A,x.right,z.left,S],1e-6);return{id:Sm(S,A),a:[S[0],S[1]],b:[A[0],A[1]],left:y.left,right:y.right,exterior:y.exterior,roomLeft:y.roomLeft,roomRight:y.roomRight,sources:y.sources,footprint:D,...y.free?{free:y.free}:{},...y.height!==void 0?{height:y.height}:{},...y.heightEnd!==void 0?{heightEnd:y.heightEnd}:{}}}),warnings:[...new Set(i)],open:m}}function El(n,e,t){let r=n.points[e];return Ie(r,$e(Me(te(n.points[(e+1)%n.points.length],r)),t))}function Rl(n,e,t){if(n.wall){let i=t.find(a=>a.id===n.wall);if(!i||Math.hypot(i.b[0]-i.a[0],i.b[1]-i.a[1])<.05)return null;let o=Me(te(i.b,i.a));return{room:{id:n.room_id,name:"",area_id:null,points:[i.a,i.b,Ie(i.a,[-o[1],o[0]])]},edge:0}}let r=e.find(i=>i.id===n.room_id);return r&&n.edgede(te(e,n.a),Me(te(n.b,n.a)));function Tl(n,e,t){if(!e.wall)return $m(n,t.room,t.edge,e.offset);let r=n.find(i=>i.free===e.wall);return r?{wall:r,s:zl(r,El(t.room,0,e.offset))}:null}function $m(n,e,t,r){for(let i of n)if(i.sources.some(s=>s.room_id===e.id&&s.edge===t&&r>=s.t0-1e-6&&r<=s.t1+1e-6))return{wall:i,s:zl(i,El(e,t,r))};return null}var kn=n=>n&&n!=="none"?n:null,Sn=(n,e)=>{e&&!n.includes(e)&&n.push(e)},Fl=n=>new Map(n.floors.flatMap(e=>e.furniture.filter(t=>t.type==="meter").map(t=>[t.id,t])));function Dl(n,e){if(!n.energy.advanced||e.type!=="meter"||!e.parent_meter)return null;let t=Fl(n),r=new Set([e.id]);for(let i=t.get(e.parent_meter);i;i=t.get(i.parent_meter??"")){if(r.has(i.id))return null;r.add(i.id)}return t.has(e.parent_meter)?e.parent_meter:null}function $n(n){return new Set([...Fl(n).values()].filter(e=>Dl(n,e)).map(e=>e.id))}function Pr(n,e){return!n.energy.advanced||!e.parent_meter?null:$n(n).has(e.parent_meter)?e.parent_meter:null}function Hl(n,e,t){let r=n.energy.show_unmetered?e.subMeters?.find(i=>i.id===t):void 0;return!r||r.use===null?null:{use:r.use,unmetered:r.unmetered!==null&&r.unmeteredkn(t.power)){let t={grid:null,gridExport:null,solar:[],battery:[],charge:[],batteries:[],soc:[]};for(let r of n.floors.flatMap(i=>i.furniture)){let i=e(r),o=r.type==="meter"?Dl(n,r):null;if(o)(t.subMeters??=[]).push({id:r.id,parent:o,power:i,invert:!!r.meter_invert,floors:r.meter_floors??[],solar:[],batteries:[]});else if(r.type==="meter")t.grid??=i,t.gridExport??=kn(r.export);else if(r.type==="inverter")Sn(t.solar,i);else if(r.type==="home_battery"){let s=kn(r.charge);Sn(t.battery,i),Sn(t.charge,s),Sn(t.soc,kn(r.soc)),(i||s)&&t.batteries.push({power:i,charge:s})}}for(let r of t.subMeters?n.floors.flatMap(i=>i.furniture):[]){let i=r.type==="inverter"||r.type==="home_battery"?t.subMeters?.find(a=>a.id===Pr(n,r)):void 0,o=i?e(r):null;i&&r.type==="inverter"&&Sn(i.solar,o);let s=kn(r.charge);i&&r.type==="home_battery"&&(o||s)&&i.batteries.push({power:o,charge:s})}return t}function Z(n,e=!1){let t=n?.attributes.symcon_id?_e(n):n?Number(n.state):null;if(t===null||!Number.isFinite(t))return null;let r={kW:1e3,MW:1e6}[String(n.attributes.unit_of_measurement??"W")]??1;return e?-t*r:t*r}var Mm=(n,e)=>e.startsWith("sensor.")&&n.states[e]?.attributes.device_class==="power";function we(n,e){if(Mm(n,e))return e;let t=n.entities?.[e]?.device_id;if(!t)return null;let r=Zi(n,t),i=r?rt(n,e):null,o=wr(n,t).filter(s=>s!==e);return(r?o.find(s=>i!==null&&rt(n,s)===i):o[0])??null}function Mn(n,e){let{grid:t,solar:r,battery:i}=e.energy,o=new Set([t,r,i].filter(a=>!!a)),s=[];for(let a of e.floors)for(let l of a.placements){let c=we(n,l.entity_id);!c||o.has(c)||(o.add(c),s.push({id:l.entity_id,powerEntity:c,floorId:a.id,x:l.x,z:l.z,power:Math.max(0,Z(n.states[c])??0)}))}return s}var Pl=n=>{let e=n.filter(t=>t!==null);return e.length?e.reduce((t,r)=>t+r,0):null};function Am(n,e,t){let r=e.grid??t.grid,i=r?Z(n.states[r],e.grid_invert):null;if(!e.grid&&t.gridExport){let o=Math.max(0,Z(n.states[t.gridExport])??0);return Math.max(0,i??0)-o}return i}function Em(n,e,t){return e.solar?Z(n.states[e.solar]):t.solar.length?Pl(t.solar.map(r=>Z(n.states[r]))):null}function Ir(n,e,t){return e.charge?(e.power?Math.max(0,Z(n.states[e.power])??0):0)-Math.max(0,Z(n.states[e.charge])??0):e.power?Z(n.states[e.power],t):null}function Rm(n,e,t){return e.battery?Z(n.states[e.battery],e.battery_invert):Pl(t.batteries.map(r=>Ir(n,r,e.battery_invert)))}function An(n,e,t,r=Ye(e)){let i=e.energy,o=Am(n,i,r),s=Em(n,i,r),a=Rm(n,i,r),l=(i.battery_soc?[i.battery_soc]:r.soc).map(g=>Number(n.states[g]?.state)).filter(Number.isFinite),c=l.length?l.reduce((g,_)=>g+_,0)/l.length:null,u=i.tariff?n.states[i.tariff]:void 0,h=Number(u?.state),m=i.consumption?Z(n.states[i.consumption]):null;m===null&&(o!==null||s!==null||a!==null)&&(m=(o??0)+Math.max(0,s??0)+(a??0)),m===null&&t.length>0&&(m=t.reduce((g,_)=>g+_.power,0));let d={grid:o,solar:s===null?null:Math.max(0,s),battery:a,soc:c,tariff:u&&Number.isFinite(h)?{value:h,unit:String(u.attributes.unit_of_measurement??"")}:null,consumption:m===null?null:Math.max(0,m)};return r.subMeters?{...d,...zm(n,r,d.consumption,i.battery_invert,t)}:d}function zm(n,e,t,r,i){let o=e.subMeters??[],s=new Map;for(let m of o)for(let d of m.floors)s.has(d)||s.set(d,m.id);let a=new Set([e.grid,e.gridExport,...e.solar,...e.battery,...e.charge,...o.flatMap(m=>[m.power,...m.solar,...m.batteries.flatMap(d=>[d.power,d.charge])])]),l=m=>i.filter(d=>s.get(d.floorId)===m&&!a.has(d.powerEntity)).reduce((d,g)=>d+g.power,0),c=new Map(o.map(m=>[m.id,m.power?Z(n.states[m.power],m.invert):null])),u=o.map(m=>{let d=c.get(m.id)??null,g=m.solar.reduce(($,S)=>$+Math.max(0,Z(n.states[S])??0),0),_=m.batteries.reduce(($,S)=>$+(Ir(n,S,r)??0),0),b=o.filter($=>$.parent===m.id).reduce(($,S)=>$+(c.get(S.id)??0),0),y=d===null?null:Math.max(0,d+g+_-b);return{id:m.id,parent:m.parent,power:d,solar:g,battery:_,use:y,unmetered:y===null?null:Math.max(0,y-l(m.id))}}),h=u.reduce((m,d)=>m+(d.use??0),0);return{subMeters:u,rest:t===null?null:Math.max(0,t-h)}}var Tm=(n,e="Station 1")=>({id:n,name:e,has_valve:!0}),Il=n=>n.has_valve!==!1;function Cr(n){let e=n.hydronic??{};return e.stations?.length?e.stations.slice(0,16):[{...Tm("station-1"),flow:e.flow,return:e.return,hot_water:e.hot_water,cold_water:e.cold_water,pump:e.pump}]}var Fm=["heating_manifold","buffer_tank","freshwater_station"],st=n=>Fm.includes(n),Dm=(n,e="Heizkreis")=>({id:n,name:e,kind:"heating",has_pump:!0,has_valve:!0});function Hm(n){return{card:!0,...n==="heating_manifold"?{circuits:[Dm("c1","Heizkreis 1")]}:{},...n==="buffer_tank"?{sensors:Array.from({length:7},(e,t)=>({id:`s${t+1}`,name:`F\xFChler ${t+1}`,entity:null,level:1-t/6}))}:{}}}function _o(n){return{...Hm(n.type),...n.hydronic}}var bo=n=>n.has_pump!==!1,Pm=n=>n.kind!=="pump"&&n.has_valve!==!1;var Bt=n=>!!n&&n!=="none",En=n=>[n?.command,n?.feedback];function Cl(n){if(!st(n.type))return[];let e=_o(n);return[...new Set([e.status,...n.type==="freshwater_station"?[]:[e.flow,e.return],...n.type==="heating_manifold"?(e.circuits??[]).flatMap(t=>[t.status,t.flow,t.return,t.power,t.mode_entity,...bo(t)?En(t.pump):[],...Pm(t)?En(t.valve):[]]):[],...n.type==="buffer_tank"?(e.sensors??[]).map(t=>t.entity):[],...n.type==="freshwater_station"?[e.circulation_temperature,...En(e.circulation),...Cr(n).flatMap(t=>[t.status,t.flow,t.return,t.hot_water,t.cold_water,t.power,...En(t.pump),...Il(t)?En(t.valve):[]])]:[]].filter(Bt))]}var Lr=(n,e)=>String(n.states[e]?.attributes.symcon_source_entity||e);function Nr(n,e){let t=n.states[Lr(n,e)]?.attributes;return t?.device_class==="power"||/^[km]?w$/i.test(String(t?.unit_of_measurement??"").trim())}function yo(n,e){let t=new Map;if(!B(n))return t;let r=Ge(n,[e]),i=(o,s,a,l,c)=>{if(!Bt(c))return;let u=e.rooms.find(m=>m.points.length>=3&&H([a,l],m.points));if(!u)return;let h=t.get(u.id)??[];h.push({id:o,name:s,source:Lr(n,c)}),t.set(u.id,h)};for(let o of e.furniture){if(!je(n,o))continue;let s=o.name||le(n,o.type),a=(o.values??[]).find(u=>Bt(u.entity)&&Nr(n,u.entity)),l=r.get(o.id)?.entity,c=o.power==="none"?null:o.power||r.get(o.id)?.power||(l&&Nr(n,l)?l:null);if(i(`furniture:${o.id}`,s,o.x,o.z,c||a?.entity),!c&&!a){let u=new Set;for(let h of o.gang_entities??[]){if(!Bt(h))continue;let m=we(n,h);!m||u.has(Lr(n,m))||(u.add(Lr(n,m)),i(`furniture:${o.id}:${h}`,`${s} \xB7 ${O(n,h)}`,o.x,o.z,m))}}if(st(o.type))for(let u of _o(o).circuits??[])bo(u)&&i(`furniture:${o.id}:${u.id}`,`${s} \xB7 ${u.name||"Pumpe"}`,o.x,o.z,u.power);if(o.type==="freshwater_station")for(let u of Cr(o))i(`furniture:${o.id}:station:${u.id}`,`${s} \xB7 ${u.name}`,o.x,o.z,u.power)}for(let o of e.placements){if(o.outside)continue;let s=(o.values??[]).find(l=>Bt(l.entity)&&Nr(n,l.entity)),a=Nr(n,o.entity_id)?o.entity_id:we(n,o.entity_id);i(`device:${o.entity_id}`,o.name||O(n,o.entity_id),o.x,o.z,a||s?.entity)}return t}var Ce={electricity:"Strom",water:"Wasser",gas:"Gas",heating:"Heizen",cooling:"K\xFChlen"},Rn={electricity:"\u26A1",water:"\u{1F4A7}",gas:"\u{1F525}",heating:"\u2668",cooling:"\u2744"},Br=n=>n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/ß/g,"ss").replace(/[^a-z0-9]+/g," ").trim(),Im="{485D0419-BE97-4548-AA9C-C083EB82E61E}",Cm=n=>n.object_type!==0&&!(n.object_type===1&&n.module_id?.toUpperCase()===Im)?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"}[Br(n.name)]??null,Or=n=>/^symcon-category-(\d+)$/.exec(n??"")?.[1],wo=n=>/\b(heute|tag|tagesverbrauch|today|daily)\b/.test(n)?"day":/monat|month/.test(n)?"month":/jahr|year/.test(n)?"year":"total",Vr=(n,e)=>String(n.states[e]?.attributes.symcon_source_entity||e);function Ol(n){let e=String(n?.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 Nm(n,e){if(!e.entity_id||e.object_type!==2&&e.object_type!==6)return null;let t=Vr(n,e.entity_id),r=n.states[t];if(!r||![1,2].includes(Number(r.attributes.symcon_variable_type)))return null;let i=Br(e.name),o=Ol(r),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"?wo(i):"total";return{metric:l,source:t,period:u,group:`${l}|${o?.unit??String(r.attributes.unit_of_measurement??"")}|${u}`,score:/^gesamt(leistung|verbrauch|energie)$/.test(i)?110:c?100:(l==="power"?s:a)?70:20}}var Nl=new WeakMap,Ll=new WeakMap;function Wl(n){let e=Nl.get(n);if(e)return e;let t={nodes:new Map(n.map(r=>[r.object_id,r])),children:new Map};for(let r of n){let i=t.children.get(r.parent_id)??[];i.push(r),t.children.set(r.parent_id,i)}return Nl.set(n,t),t}function xo(n,e,t){if(!B(n))return[];let r=[e.area_id,...e.sub_areas??[]].map(Or).filter(m=>!!m);if(!r.length)return[];let i=new Set(t.filter(m=>m.id!==e.id).flatMap(m=>[m.area_id,...m.sub_areas??[]]).map(Or).filter(m=>!!m&&!r.includes(m))),o=`${r.join(",")}|${[...i].sort().join(",")}`,s=Ll.get(n)??new Map;Ll.set(n,s);let a=s.get(o);if(a)return a;let l=Wl(n.symconObjects),c=[],u=new Set,h=(m,d,g)=>{if(u.has(m)||i.has(String(m)))return;u.add(m);let _=l.nodes.get(m);if(!_)return;let b=Cm(_),y=b??d,$=new Set(b&&b!==d?[]:g),S=l.children.get(m)??[];if(y){let A=S.map(z=>Nm(n,z)).filter(z=>z!==null);for(let z of new Set(A.map(x=>x.group))){if($.has(z))continue;let x=A.filter(R=>R.group===z),D=Math.max(...x.map(R=>R.score)),T=x.filter(R=>R.score===D);for(let R of D>=100?T.slice(0,1):T)c.push({kind:y,metric:R.metric,id:R.source,period:R.period});$.add(z)}}for(let A of S)(A.object_type===0||A.object_type===1)&&h(A.object_id,y,$)};for(let m of r)h(Number(m),null,new Set);return s.set(o,c),c}function wt(n,e,t=!1){let r=new Map,i=new Set;for(let o of e){let s=Vr(n,o.id),a=`${o.kind}|${o.metric}|${s}`;if(i.has(a))continue;i.add(a);let l=n.states[s],c=Ol(l),u=c?.metric===o.metric?c.unit:String(l?.attributes.unit_of_measurement??"").trim(),h=`${o.kind}|${o.metric}|${u}|${o.period}`,m=r.get(h)??{kind:o.kind,metric:o.metric,unit:u,value:null,period:o.period,sources:[],manual:t,incomplete:!1},d=_e(l);d===null?m.incomplete=!0:m.value=(m.value??0)+d*(c?.metric===o.metric?c.factor:1),m.sources.push(s),r.set(h,m)}return[...r.values()]}function Wr(n,e){return We.flatMap(t=>["power","energy"].flatMap(r=>{let i=e.utility_meters?.[t]?.[r];if(!i||i==="none")return[];let o=Vr(n,i);return[{kind:t,metric:r,id:o,period:r==="energy"?wo(Br(String(n.states[o]?.attributes.friendly_name??""))):"total"}]}))}function Bl(n,e){return B(n)?wt(n,Wr(n,e),!0):[]}function Vt(n,e,t=[]){let r=Bl(n,e);return r.length?r:wt(n,xo(n,e,t))}function Kt(n,e,t=e.rooms,r=!1){if(!B(n))return[];let i=r?yo(n,e):new Map,o=new Map;for(let a of e.rooms){let l=[...new Set([a.area_id,...a.sub_areas??[]].filter(c=>!!Or(c)))];!l.length&&(Wr(n,a).length||i.get(a.id)?.length)&&l.push("unassigned");for(let c of l){let u=o.get(c)??{seed:a,members:[]};c===l[0]&&u.members.push(a),o.set(c,u)}}let s=Wl(n.symconObjects).nodes;return[...o].map(([a,l])=>{let c=s.get(Number(Or(a))),u=a==="unassigned"?[]:wt(n,xo(n,{...l.seed,area_id:a,sub_areas:null},t)),h=wt(n,l.members.flatMap(g=>Wr(n,g)),!0),m=g=>u.some(_=>_.kind===g.kind&&_.metric===g.metric&&_.unit===g.unit&&_.period===g.period),d=l.members.map(g=>({id:g.id,name:g.name,readings:Bl(n,g),devices:(i.get(g.id)??[]).map(_=>({id:_.id,name:_.name,readings:wt(n,[{kind:"electricity",metric:"power",id:_.source,period:"total"}],!0)}))})).filter(g=>g.readings.length||g.devices.length);return{id:a,name:a==="unassigned"?"Nicht zugeordnet":c?.name||n.areas?.[a]?.name||"Bereich nicht verf\xFCgbar",path:c?.path||"",readings:[...u,...h.filter(g=>!m(g))],rooms:d}}).filter(a=>a.readings.length||a.rooms.length)}function vo(n,e,t,r){let i=e.utility_meters?.[t],o=i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:t==="electricity"&&r==="power"?e.power_entity:null;return o&&o!=="none"?Vr(n,o):null}function Ne(n,e,t=e.rooms){let r=Kt(n,e,t).flatMap(o=>o.readings.flatMap(s=>s.sources.map(a=>({kind:s.kind,metric:s.metric,period:s.period,id:a})))),i=[];for(let o of We)for(let s of["power","energy"]){let a=vo(n,e,o,s);i.push(...wt(n,a?[{kind:o,metric:s,id:a,period:s==="energy"?wo(Br(String(n.states[a]?.attributes.friendly_name??""))):"total"}]:r.filter(l=>l.kind===o&&l.metric===s),!!a))}return i}function Vl(n,e){let t=e.flatMap(i=>i.rooms),r=e.flatMap(i=>Ne(n,i,t).flatMap(o=>o.sources.map(s=>({kind:o.kind,metric:o.metric,period:o.period,id:s}))));return wt(n,r)}function Kl(n,e){let t=e.flatMap(r=>r.rooms);return[...new Set(e.flatMap(r=>[...r.rooms.flatMap(i=>xo(n,i,t).map(o=>o.id)),...r.rooms.flatMap(i=>Wr(n,i).map(o=>o.id)),...[...yo(n,r).values()].flatMap(i=>i.map(o=>o.source)),...We.flatMap(i=>[vo(n,r,i,"power"),vo(n,r,i,"energy")]).filter(i=>!!i)]))]}function Gt(n){return n.metric==="power"?n.unit==="m\xB3/h"?"Durchfluss":"Leistung":{total:"Verbrauch",day:"Verbrauch heute",month:"Verbrauch Monat",year:"Verbrauch Jahr"}[n.period]}function Le(n,e){let t=e.incomplete?"Err: ":"";if(e.value===null)return`${t}\u2013`;let r=e.unit==="W"&&Math.abs(e.value)>=1e3?e.value/1e3:e.value,i=e.unit==="W"&&Math.abs(e.value)>=1e3?"kW":e.unit,o=Number.isInteger(r)?0:Math.min(6,Math.max(2,1-Math.floor(Math.log10(Math.abs(r)))));return`${t}${L(n,r,o)}${i?` ${i}`:""}`}var ko=class extends X{static properties={hass:{attribute:!1},readings:{attribute:!1}};constructor(){super(),this.readings=[]}render(){return p`${We.filter(e=>this.readings.some(t=>t.kind===e)).map(e=>p`

${Rn[e]} ${Ce[e]}

${this.readings.filter(t=>t.kind===e).map(t=>p`
this.hass.states[r]?.attributes.symcon_path||this.hass.states[r]?.attributes.friendly_name||r).join(` `)}`}> ${Gt(t)}${t.manual?p` · Zähler`:""}${Le(this.hass,t)}${U(this.hass,t.sources,`${Ce[t.kind]} \xB7 ${Gt(t)}`)}
`)}
`)}`}static styles=Q` :host { display:block; color:var(--nf-text); font:inherit; } section { padding:10px 0; border-bottom:1px solid var(--nf-line,#ffffff20); } section:last-child { border:0; } h4 { font:inherit; font-weight:600; margin:0 0 6px; } .reading { display:flex; justify-content:space-between; gap:16px; margin:4px 0; } .reading span { color:var(--nf-muted,#aaa); } b { white-space:nowrap; font-variant-numeric:tabular-nums; } small { font-size:.85em; } `};customElements.get("nf-utility-report")||customElements.define("nf-utility-report",ko);var $o=Math.PI/180,jl=3,ql=.1,So=1/6,Zl=(n,e)=>[Math.sin((e+n)*$o),-Math.cos((e+n)*$o)],Lm=["N","NE","E","SE","S","SW","W","NW"];function Om(n,e,t){return Yl(n,e,t).map(r=>r.normal)}function Yl(n,e,t){let r=[];for(let i of n.openings){if(i.room_id!==e.id||i.type==="garage")continue;let o=Rl(i,n.rooms,n.walls??[]),s=o?Tl(t,i,o):null;if(!s||!s.wall.exterior)continue;let{wall:a}=s,l=Math.hypot(a.b[0]-a.a[0],a.b[1]-a.a[1]);if(l<1e-6)continue;let c=[-(a.b[1]-a.a[1])/l,(a.b[0]-a.a[0])/l],u=a.roomLeft===e.id?c:[-c[0],-c[1]];r.push({opening:i,normal:[-u[0],-u[1]]})}return r}function Wm(n,e){let t=((Math.atan2(n[0],-n[1])/$o-e)%360+360)%360;return Lm[Math.round(t/45)%8]}var Gl=new WeakMap;function Jl(n,e){let t=Gl.get(e);return t||(t=Wt(e.rooms,{exterior:n.settings.wall_exterior,interior:n.settings.wall_interior},e.walls??[]).walls,Gl.set(e,t)),t}var Ul=new WeakMap;function Ut(n,e,t,r,i=new Date){let o=`${t.id}|${i.toISOString().slice(0,10)}|${n.settings.north??0}|${r.latitude},${r.longitude},${r.zone??""}`,s=Ul.get(e);s||Ul.set(e,s=new Map);let a=s.get(o);if(a)return a;let l=Bm(n,e,t,r,i);return s.set(o,l),l}function Bm(n,e,t,r,i){let o=n.settings.north??0,s=Om(e,t,Jl(n,e)),a=[...new Set(s.map(c=>Wm(c,o)))];if(!s.length)return{hours:0,facing:a};let l=0;for(let c=So/2;c<24;c+=So){let u=_t(zt(c,r.zone,i),r.latitude,r.longitude);if(u.elevationm[0]*h[0]+m[1]*h[1]>ql)&&l++}return{hours:Math.round(l*So*10)/10,facing:a}}function Ql(n,e,t,r,i=new Date().getFullYear()){return Array.from({length:12},(o,s)=>Ut(n,e,t,r,new Date(Date.UTC(i,s,15,12))).hours)}function Xl(n,e,t,r,i=new Date){let o=_t(i,r.latitude,r.longitude);if(o.elevationa.normal[0]*s[0]+a.normal[1]*s[1]>ql).map(a=>a.opening)}var ec=n=>6.112*Math.exp(17.62*n/(243.12+n));function jt(n,e,t=4){if(n===null||e===null)return null;let r=Math.min(100,e*ec(n)/ec(n-t));return Math.round(Math.min(100,Math.max(0,(r-65)/20*100)))}function Kr(n,e,t){return t!==null&&t>=70?"mould":n!==null&&n>=1e3?"co2":e!==null&&e>=65?"humidity":null}function xt(n=new Date,e=50){let t=n.getMonth(),r=t>=4&&t<=8;return e<0?!r:r}function Gr(n,e,t,r=!1){let i=[];if(n!==null){let[s,a]=r?[22,26]:[20,23],l=na?n-a:0;i.push(Math.max(0,100-l*15))}if(e!==null){let s=e<40?40-e:e>60?e-60:0;i.push(Math.max(0,100-s*4))}if(t!==null&&i.push(Math.max(0,Math.min(100,100-(t-800)/600*100))),!i.length)return null;let o=i.reduce((s,a)=>s+a,0)/i.length;return Math.round(Math.min(o,Math.min(...i)+30))}var Vm={temperature:{deviceClass:"temperature",unit:"\xB0C",stops:[[16,[.2,.45,1]],[20,[.15,.85,.75]],[22.5,[.95,.8,.3]],[26,[1,.28,.18]]]},humidity:{deviceClass:"humidity",unit:"%",stops:[[30,[.95,.6,.2]],[45,[.3,.88,.5]],[60,[.2,.78,1]],[75,[.32,.4,.98]]]},co2:{deviceClass:"carbon_dioxide",unit:"ppm",stops:[[450,[.3,.88,.5]],[800,[.98,.84,.3]],[1200,[1,.5,.2]],[1600,[.98,.25,.25]]]},mould:{deviceClass:"",unit:"%",stops:[[0,[.3,.88,.5]],[40,[.98,.84,.3]],[70,[1,.5,.2]],[100,[.75,.2,.55]]]},comfort:{deviceClass:"",unit:"",stops:[[0,[.98,.25,.25]],[40,[1,.5,.2]],[65,[.98,.84,.3]],[85,[.3,.88,.5]],[100,[.2,.8,.7]]]},power:{deviceClass:"power",unit:"W",stops:[[0,[.25,.4,.6]],[100,[.3,.88,.5]],[500,[.98,.84,.3]],[1500,[1,.5,.2]],[3e3,[.98,.25,.25]]]},sun:{deviceClass:"",unit:"h",stops:[[0,[.22,.3,.55]],[2,[.35,.6,.85]],[4,[.98,.84,.3]],[7,[1,.62,.2]],[10,[1,.42,.25]]]}},Km={deviceClass:"temperature",unit:"\xB0C",stops:[[19,[.2,.45,1]],[22.5,[.15,.85,.75]],[25.5,[.95,.8,.3]],[29,[1,.28,.18]]]};function Ur(n,e=!1){return n==="temperature"&&e?Km:Vm[n]}var Gm=(n,e,t)=>[n[0]+(e[0]-n[0])*t,n[1]+(e[1]-n[1])*t,n[2]+(e[2]-n[2])*t];function tc(n,e,t=!1){let{stops:r}=Ur(n,t),i=r.findIndex(([c])=>e<=c);if(i===-1)return r[r.length-1][1];if(i===0)return r[0][1];let[o,s]=r[i-1],[a,l]=r[i];return Gm(s,l,(e-o)/(a-o))}function Mo(n,e,t,r){let i=Vt(n,r,e.floors?.flatMap(s=>s.rooms)??t.rooms).filter(s=>s.kind==="electricity"&&s.metric==="power");if(i.length)return i.find(s=>s.unit==="W")?.value??null;let o=null;for(let s of Ao(n,e,t,r)){let a=Z(n.states[s]);a!==null&&(o=(o??0)+Math.max(0,a))}return o}function Ao(n,e,t,r){let i=Vt(n,r,e.floors?.flatMap(h=>h.rooms)??t.rooms).filter(h=>h.kind==="electricity"&&h.metric==="power");if(i.length)return i.filter(h=>h.unit==="W").flatMap(h=>h.sources);let{grid:o,solar:s,battery:a}=e.energy,l=new Set([o,s,a].filter(Boolean)),c=new Set,u=(h,m)=>r.points.length>=3&&H([h,m],r.points);for(let h of t.placements){let m=u(h.x,h.z)?we(n,h.entity_id):null;m&&c.add(m)}for(let h of t.furniture){if(!u(h.x,h.z))continue;let m=h.power&&h.power!=="none"?h.power:h.entity&&h.entity!=="none"?we(n,h.entity):null;m&&c.add(m);for(let d of h.gang_entities??[]){let g=d&&d!=="none"?we(n,d):null;g&&c.add(g)}}return[...c].filter(h=>!l.has(h))}function nc(n,e,t){let r=new Map;for(let i of e.floors)for(let o of i.rooms){if(t==="power"){let a=Mo(n,e,i,o);a!==null&&r.set(o.id,a);continue}if(t==="comfort"){let a=Gr(Y(n,i,o,"temperature"),Y(n,i,o,"humidity"),Y(n,i,o,"co2"),xt(new Date,n.config?.latitude));a!==null&&r.set(o.id,a);continue}if(t==="sun"){let{latitude:a,longitude:l,time_zone:c}=n.config??{};if(a===void 0||l===void 0||i.layer)continue;r.set(o.id,Ut(e,i,o,{latitude:a,longitude:l,zone:c}).hours);continue}let s=t==="mould"?jt(Y(n,i,o,"temperature"),Y(n,i,o,"humidity")):Y(n,i,o,t);s!==null&&r.set(o.id,s)}return r}function rc(n,e=!1){let{stops:t}=Ur(n,e),r=t[0][0],i=t[t.length-1][0]-r;return`linear-gradient(90deg, ${t.map(([s,a])=>`rgb(${a.map(l=>Math.round(l*255)).join(",")}) ${Math.round((s-r)/i*100)}%`).join(", ")})`}function zn(n,e=0){let t=new Date(n);return t.setHours(0,0,0,0),t.setDate(t.getDate()-e),t.getTime()}function Um(n,e,t){let r=Array.from({length:7},(u,h)=>zn(t,6-h)),i=u=>Math.min(24,Math.max(0,(Math.min(t,u+864e5)-u)/36e5)),o=(u,h)=>{if(!u)return null;let m=(n[u]??[]).find(d=>Math.abs(new Date(d.start).getTime()-h)<3*36e5);return typeof m?.mean=="number"?m.mean:null},s=(u,h,m=1)=>{let d=u.map(g=>o(g,h)).filter(g=>g!==null);return d.length?d.reduce((g,_)=>g+_,0)*m:null},a=(u,h)=>u===null?null:Math.round(u*i(h)/1e3*10)/10,l=r.map(u=>a(s(e.solar,u),u)),c=r.map(u=>{if(e.consumption)return a(o(e.consumption,u),u);let h=[s(e.solar,u),s(e.grid?[e.grid]:[],u,e.gridInvert?-1:1),s(e.battery,u,e.batteryInvert?-1:1)];return h.every(m=>m===null)?null:a(Math.max(0,h.reduce((m,d)=>m+(d??0),0)),u)});return{days:r,solar:l,use:c}}async function ic(n,e,t=Date.now()){let r=[...new Set([...e.solar,...e.battery,e.grid,e.consumption].filter(s=>!!s))];if(!r.length)return null;let i=await n.callWS({type:"recorder/statistics_during_period",start_time:new Date(zn(t,6)).toISOString(),end_time:new Date(t).toISOString(),statistic_ids:r,period:"day",types:["mean"],units:{power:"W"}}),o=Um(i,e,t);return o.solar.some(s=>s!==null)||o.use.some(s=>s!==null)?o:null}var jm=864e5,oc=36e5;function qm(n){let e=new Date(zn(n));return e.setDate(1),e.getTime()}function Zm(n,e,t){let r=zn(t),[i,o,s]=[0,0,!1];for(let l of e)for(let c of n[l]??[]){if(typeof c.mean!="number")continue;let u=new Date(c.start).getTime(),h=Math.min(24,Math.max(0,(Math.min(t,u+jm)-u)/oc)),m=Math.max(0,c.mean)*h/1e3;o+=m,Math.abs(u-r)<3*oc&&(i+=m),s=!0}let a=l=>Math.round(l*100)/100;return s?{today:a(i),month:a(o)}:null}async function sc(n,e,t=Date.now()){if(!e.length)return null;let r=await n.callWS({type:"recorder/statistics_during_period",start_time:new Date(qm(t)).toISOString(),end_time:new Date(t).toISOString(),statistic_ids:[...e],period:"day",types:["mean"],units:{power:"W"}});return Zm(r,e,t)}function ac(n,e){if(!e||!Number.isFinite(e.value))return null;let t=/^\s*([^/\s]+)\s*\/\s*kWh\s*$/i.exec(e.unit);if(!t)return null;let r=/^(ct|cent|cents|c)$/i.test(t[1]),i=r||/^eur$/i.test(t[1])?"\u20AC":t[1];return{value:Math.round(n*e.value*(r?1:100))/100,currency:i}}var cc=20,lc=new WeakMap;function Ym(n){let e=n.entities??{},t=lc.get(e);if(!t){t=new Map;for(let[r,i]of Object.entries(e))i.device_id&&r.startsWith("sensor.")&&n.states[r]?.attributes.device_class==="battery"&&!t.has(i.device_id)&&t.set(i.device_id,r);lc.set(e,t)}return t}function Jm(n,e){let t=n.entities?.[e]?.device_id,r=t?Ym(n).get(t):void 0;if(r){let s=Number(n.states[r]?.state);if(Number.isFinite(s))return s}let i=n.states[e]?.attributes;if(!i||i.battery_level===void 0&&i.battery===void 0)return null;let o=Number(i.battery_level??i.battery);return Number.isFinite(o)?o:null}function Qm(n){let e=[],t=r=>typeof r=="string"&&/^[a-z_]+\.[a-z0-9_]+$/.test(r);for(let r of n.placements)e.push({entity:r.entity_id,x:r.x,z:r.z,room:null});for(let r of n.furniture)for(let i of[r.entity,r.power])t(i)&&e.push({entity:i,x:r.x,z:r.z,room:null});for(let r of n.openings)for(let i of[r.contact,r.contact2,r.tilt,r.tilt2,r.cover,r.cover2,r.lock])t(i)&&e.push({entity:i,x:NaN,z:NaN,room:r.room_id});return e}var Xm=(n,e,t)=>n.rooms.find(r=>r.points.length>=3&&H([e,t],r.points));function uc(n,e){let t=new Set,r=[];for(let i of e.floors)for(let o of Qm(i)){let s=n.entities?.[o.entity]?.device_id??o.entity;if(t.has(s))continue;let a=Jm(n,o.entity);a!==null&&(t.add(s),r.push({entity:o.entity,level:a,floorId:i.id,roomId:o.room??Xm(i,o.x,o.z)?.id??null}))}return r.sort((i,o)=>i.level-o.level)}var dc=n=>n.toLowerCase().replace(/[_-]+/g," ").replace(/\s+/g," ").trim(),ep=new Set(["","unknown","unavailable","not home","away"]);function tp(n,e,t){let r=dc(t);if(ep.has(r))return null;for(let i of e.floors)for(let o of i.rooms){let s=o.area_id?n.areas?.[o.area_id]?.name:void 0;if([o.name,o.area_id,s].map(l=>dc(l??"")).includes(r))return{floorId:i.id,room:o}}return null}function np(n,e){if(!e)return null;for(let t of n.floors){let r=t.rooms.find(i=>i.id===e);if(r)return{floorId:t.id,room:r}}return null}function rp(n){let e=n.split(/\s+/).filter(Boolean);return e.length===0?"?":(e.length===1?e[0].slice(0,2):e[0][0]+e[e.length-1][0]).toUpperCase()}function ip(n,e){let[t,r]=Fe(n.points),i=e*1.15-Math.PI/2+.9;return[t+.75*Math.cos(i),r+.75*Math.sin(i)]}function hc(n,e){let t=[],r=new Map;for(let{person:i,sensor:o,room:s,name:a}of e.presence){let l=n.states[i],c=o?n.states[o]:void 0;if(!l||(B(n)?ce(l)!==!0:l.state!=="home"&&l.state!=="on"))continue;let u=(!B(n)&&c?tp(n,e,c.state):null)??np(e,s);if(!u)continue;let h=r.get(u.room.id)??0;r.set(u.room.id,h+1);let[m,d]=ip(u.room,h),g=a?.trim()||String(l.attributes.friendly_name??i),_=l.attributes.entity_picture;t.push({id:i,name:g,initials:rp(g),picture:typeof _=="string"?_:null,floorId:u.floorId,roomId:u.room.id,x:m,z:d})}return t}function op(n,e){let t=new Set;for(let r of e.rooms)for(let i of yt(n,j(n,r)))P(i)==="light"&&t.add(i);for(let r of e.placements)P(r.entity_id)==="light"&&t.add(r.entity_id);return[...t].filter(r=>n.states[r]?.state==="on").length}function sp(n,e,t){let r=o=>!!o&&n.states[o]?.state==="on",i=0;for(let o of e.openings){let s=t.get(o.id);if(s)if(o.type==="garage")(Ke(n,s,"garage").cover??1)<.95&&i++;else if(o.type==="door")(r(s.contact)||r(s.contact2))&&i++;else{let a=Ke(n,s,"window");Math.max(a.open,a.tilt,a.open2,a.tilt2)>.5&&i++}}return i}function mc(n,e,t,r){return new Map(e.floors.map(i=>{let o=B(n)?Ne(n,i,e.floors.flatMap(s=>s.rooms)).find(s=>s.kind==="electricity"&&s.metric==="power"&&s.unit==="W"):void 0;return[i.id,{rooms:i.rooms.length,lightsOn:op(n,i),open:sp(n,i,t),persons:r.filter(s=>s.floorId===i.id).length,power:B(n)?o?.value??null:i.power_entity?Z(n.states[i.power_entity]):null,...o?{powerLabel:Le(n,o)}:{},temps:ap(n,i)}]}))}function ap(n,e){let t=e.rooms.map(r=>Y(n,e,r,"temperature")).filter(r=>r!==null);return t.length>=2?[Math.min(...t),Math.max(...t)]:null}function pc(n,e){let t=[e.rooms===1?M(n,"floor_rooms_one"):M(n,"floor_rooms",{n:e.rooms})];if(e.lightsOn>0&&t.push(M(n,"floor_lights",{n:e.lightsOn})),e.open>0&&t.push(M(n,"floor_open",{n:e.open})),e.persons>0&&t.push(M(n,"floor_persons",{n:e.persons})),e.temps&&n){let[i,o]=e.temps.map(s=>L(n,ue(n,s),0));t.push(i===o?`${i} ${ie(n)}`:`${i}\u2013${o} ${ie(n)}`)}let r=e.powerLabel??(e.power!=null?kt(n,e.power):null);return r&&t.push(`\u26A1 ${r}`),t.join(" \xB7 ")}function kt(n,e){let t=Math.abs(e);return t>=1e3?`${L(n,e/1e3,t>=1e4?1:2)} kW`:`${Math.round(e)} W`}function Eo(n){let e=Math.max(0,Math.floor(n/6e4));return e<60?`${e} min`:`${Math.floor(e/60)}:${String(e%60).padStart(2,"0")} h`}function jr(n){if(n.state!=="on")return{entity:n.entity_id,on:!1};let e=n.attributes,t={entity:n.entity_id,on:!0};typeof e.brightness=="number"&&(t.brightness=e.brightness);let r=String(e.color_mode??"");return Array.isArray(e.rgb_color)&&!["color_temp","brightness","onoff"].includes(r)?t.rgb=e.rgb_color.slice(0,3):typeof e.color_temp_kelvin=="number"&&(t.kelvin=e.color_temp_kelvin),t}function qr(n){let e=n.filter(r=>!r.on).map(r=>r.entity);return[...n.filter(r=>r.on).map(r=>({service:"turn_on",data:{entity_id:r.entity,...r.brightness!==void 0?{brightness:r.brightness}:{},...r.rgb?{rgb_color:r.rgb}:r.kelvin?{color_temp_kelvin:r.kelvin}:{}}})),...e.length?[{service:"turn_off",data:{entity_id:e}}]:[]]}function fc(n,e){let t=[...n.lights].filter(r=>r.on).sort((r,i)=>(i.brightness??255)-(r.brightness??255))[0];return e.map((r,i)=>({...n.lights[i]??t??{entity:r,on:!1},entity:r}))}var lp=n=>n.slice(0,n.indexOf(".")),cp=new Set(["switch","fan","input_boolean"]);function Tn(n){let e=[],t=new Map,r=[],i=[];for(let l of n){if(!l)continue;let c=lp(l.entity_id);c==="light"&&l.state==="on"?e.push(l):cp.has(c)&&l.state==="on"?t.set(c,[...t.get(c)??[],l.entity_id]):c==="media_player"&&l.state==="playing"?r.push(l.entity_id):c==="media_player"&&(l.state==="on"||l.state==="idle")&&i.push(l.entity_id)}let o=[],s=[];e.length&&(o.push({domain:"light",service:"turn_off",data:{entity_id:e.map(l=>l.entity_id)}}),s.push(...qr(e.map(jr)).map(l=>({domain:"light",service:l.service,data:l.data}))));for(let[l,c]of t)o.push({domain:l,service:"turn_off",data:{entity_id:c}}),s.push({domain:l,service:"turn_on",data:{entity_id:c}});r.length&&(o.push({domain:"media_player",service:"media_pause",data:{entity_id:r}}),s.push({domain:"media_player",service:"media_play",data:{entity_id:r}})),i.length&&(o.push({domain:"media_player",service:"turn_off",data:{entity_id:i}}),s.push({domain:"media_player",service:"turn_on",data:{entity_id:i}}));let a=e.length+[...t.values()].reduce((l,c)=>l+c.length,0)+r.length+i.length;return{off:o,undo:s,count:a}}function gc(n){let e=new Set,t=r=>{typeof r=="string"&&/^(light|switch|fan|input_boolean|media_player)\./.test(r)&&e.add(r)};for(let r of n.placements)t(r.entity_id);for(let r of n.furniture){t(r.entity);for(let i of r.extra_lights??[])t(i)}return[...e]}var up=/^(light|switch|cover|binary_sensor|lock|media_player|vacuum|fan|climate|lawn_mower|input_boolean|person|device_tracker|alarm_control_panel)\./;var _c=n=>[...new Set([...n].filter(e=>up.test(e)))].slice(0,200);function dp(n){let e=new Map;for(let[t,r]of Object.entries(n)){let i={},o=[];for(let s of r)s.a&&(i=s.a),o.push({t:Math.round((s.lu??s.lc??0)*1e3),state:s.s,attributes:i});o.sort((s,a)=>s.t-a.t),e.set(t,o)}return e}async function Fn(n,e,t,r,i=!1){if(e.length===0)return new Map;let o=await n.callWS({type:"history/history_during_period",start_time:new Date(t).toISOString(),end_time:new Date(r).toISOString(),entity_ids:e,include_start_time_state:!0,significant_changes_only:!1,minimal_response:i,no_attributes:i});return dp(o)}function hp(n,e){let[t,r]=[0,n.length-1],i=null;for(;t<=r;){let o=t+r>>1;n[o].t<=e?(i=n[o],t=o+1):r=o-1}return i}function qt(n,e,t){let r={...n.states};for(let[i,o]of e){let s=hp(o,t);if(!s)continue;let a=n.states[i];r[i]={...a??{entity_id:i},entity_id:i,state:s.state,attributes:{...a?.attributes??{},...s.attributes}}}return{...n,states:r}}function bc(n,e,t,r=400){let i=[];for(let s of n.values())for(let a=1;a=e&&s[a].t<=t&&i.push(s[a].t);if(i.sort((s,a)=>s-a),i.length<=r)return i;let o=i.length/r;return Array.from({length:r},(s,a)=>i[Math.floor(a*o)])}function yc(n,e){let t=new Set,r=new Proxy(n.states,{get(i,o){return typeof o=="string"&&t.add(o),i[o]}});return e({...n,states:r}),[...t].filter(i=>i.includes(".")&&i in n.states)}function vc(n,e,t,r,i,o=96){let s=[],a=[];for(let l=0;l{if(s===null){o=!1;return}let l=a/(n.length-1)*e,c=t-Math.max(0,Math.min(r,s))/r*t;i+=`${o?"L":"M"}${l.toFixed(1)},${c.toFixed(1)}`,o=!0}),i}var wc=n=>n==="wallbox"||/^pack:[^:]+:(wallbox|ev_charger|ev_bike_charger|charging_station)$/.test(n),xc=[["soc","\u{1F50B}","furn_soc"],["start","\u25B6","charging_start"],["end","\u25A0","charging_end"],["duration","\u23F1","charging_duration"],["energy","\u26A1","charging_energy"],["lock","\u{1F510}","charging_lock"]],kc=n=>!!n&&n!=="none",Ro=n=>/^[+-]?\d+(?:[.,\s]\d{3})*(?:[.,]\d+)?$/.test(n.trim()),mp=(n,e)=>String(n.states[e]?.attributes.symcon_source_entity||e);function Sc(n){return wc(n.type)?[...new Set(xc.map(([e])=>n.charging?.[e]).filter(kc))]:[]}function Zt(n,e,t=""){if(ge(e)===null)return"\u2013";let r=e?.attributes.symcon_formatted;if(typeof r=="string"&&r.trim())return t&&/^[-+]?\d+(?:[.,]\d+)?$/.test(r.trim())?`${r} ${t}`:r;let i=_e(e);return i===null?De(e):`${L(n,i,Number.isInteger(i)?0:2)}${e?.attributes.unit_of_measurement||t?` ${e?.attributes.unit_of_measurement||t}`:""}`}function pp(n,e,t="auto"){if(ge(e)===null)return"\u2013";if(t==="value")return Zt(n,e);let r=_e(e),i=ge(e),o=null;if(t!=="auto")o=r===null?null:r*(t==="seconds"?1e3:1);else{let s=e?.attributes.symcon_formatted;if(typeof s=="string"&&s.trim()&&!Ro(s))return s;r!==null&&r>=1e8?o=r<1e11?r*1e3:r:typeof i=="string"&&/^\d{4}-\d\d-\d\d[T ]\d\d:\d\d/.test(i)&&(o=Date.parse(i))}return o===null||!Number.isFinite(o)||!Number.isFinite(new Date(o).getTime())?Zt(n,e):new Date(o).toLocaleString(n.language||"de",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function fp(n,e,t="auto"){if(ge(e)===null)return"\u2013";if(t==="value")return Zt(n,e);let r=_e(e);if(r===null)return Zt(n,e);if(t==="auto"){let o=e?.attributes.symcon_formatted,s=String(e?.attributes.unit_of_measurement??"").trim();if(typeof o=="string"&&o.trim()&&!Ro(o)&&!(s&&o.trim().endsWith(s)&&Ro(o.trim().slice(0,-s.length).trim())))return o;t=/^(min|minute[n]?|minutes)$/i.test(s)?"minutes":/^(h|std\.?|stunde[n]?|hours?)$/i.test(s)?"hours":"seconds"}let i=Math.round(Math.abs(r)*(t==="hours"?3600:t==="minutes"?60:1));return Number.isSafeInteger(i)?`${r<0?"\u2212":""}${Math.floor(i/3600)}:${String(Math.floor(i/60)%60).padStart(2,"0")}:${String(i%60).padStart(2,"0")}`:Zt(n,e)}function Zr(n,e){if(!wc(e.type))return[];let t=e.charging;return xc.flatMap(([r,i,o])=>{let s=t?.[r];if(!kc(s))return[];let a=mp(n,s),l=n.states[a],c=r==="start"||r==="end"?pp(n,l,t?.[`${r}_format`]):r==="duration"?fp(n,l,t?.duration_unit):Zt(n,l,r==="soc"?"%":"");return[{id:r,entity:a,icon:i,label:M(n,o),text:c}]})}var gp=4,_p=8,bp=[[255,181,71],[255,236,210],[55,224,255],[91,124,255],[255,95,210],[120,255,150]],Yt=n=>p``,Yr={previous:"M6 6h2v12H6zM20 6v12l-10-6z",play:"M8 5v14l11-7z",pause:"M7 5h4v14H7zM13 5h4v14h-4z",next:"M16 6h2v12h-2zM4 6v12l10-6z"},zo=n=>p``,yp=24,vp=10,To=class extends X{static properties={hass:{attribute:!1},room:{attribute:!1},floor:{attribute:!1},confirmEntities:{attribute:!1},phrases:{attribute:!1},outside:{attribute:!1},_showAll:{state:!0},_said:{state:!0},_folded:{state:!0},_curve:{state:!0},_moodName:{state:!0},_undo:{state:!0},_energy:{state:!0},_sunYear:{state:!0},rooms:{attribute:!1},building:{attribute:!1}};saidTimer;memo=null;curveFor="";undoTimer;constructor(){super(),this.room=null,this.floor=null,this.phrases=null,this.outside=null,this._said=null,this._showAll=!1,this._folded=!1,this._curve=null,this._moodName=null,this._undo=null,this._energy=null,this._sunYear=!1,this.rooms=null,this.building=null}fireMoods(e,t){this.dispatchEvent(new CustomEvent("mood-change",{detail:{roomId:e.id,moods:t},bubbles:!0,composed:!0}))}runMood(e){for(let t of qr(e))this.call("light",t.service,t.data)}renderMoods(e,t){let r=e.moods??[],i=!!this.rooms&&!!this.hass.user?.is_admin;if(!r.length&&!i)return f;let o=(this.rooms??[]).filter(l=>l.id!==e.id&&l.area_id),s=l=>j(this.hass,l).filter(c=>c.startsWith("light.")),a=()=>{let l=(this._moodName??"").trim()||this.t("mood_new");this.fireMoods(e,[...r,{id:`mood_${Date.now().toString(36)}`,name:l,lights:t.map(jr)}]),this._moodName=null};return p`
${r.map(l=>p` ${o.length?p``:f} ${i?p``:f} `)} ${i?this._moodName===null?p``:p`this._moodName=l.target.value} @keydown=${l=>l.key==="Enter"&&a()} /> `:f}
`}async loadCurve(e){let t=ye(this.hass,this.floor,e,"temperature"),r=t.length?t:j(this.hass,e).filter(s=>s.startsWith("climate."));if(!r.length)return;let i=Date.now(),o=i-24*36e5;try{let s=await Fn(this.hass,r,o,i,!!t.length);if(this.room?.id!==e.id)return;let a=[];for(let l=1;l<=96;l++){let c=qt(this.hass,s,o+(i-o)*l/96),u=r.map(h=>h.startsWith("climate.")?Number(c.states[h]?.attributes.current_temperature):Number(c.states[h]?.state)).filter(Number.isFinite);a.push(u.length?u.reduce((h,m)=>h+m,0)/u.length:null)}this._curve=a.some(l=>l!==null)?a:null}catch{this._curve=null}}async loadEnergy(e){if(!this.floor||!this.building)return;if(B(this.hass)){this._energy=null;return}let t=Ao(this.hass,this.building,this.floor,e);try{let r=await sc(this.hass,t);this.room?.id===e.id&&(this._energy=r)}catch{this._energy=null}}renderEmptyLights(e,t){if(!t.length||!this.room)return f;let r=j(this.hass,e).map(s=>this.hass.states[s]).filter(s=>!!s&&s.entity_id.startsWith("binary_sensor.")&&["motion","occupancy","presence"].includes(String(s.attributes.device_class)));if(!r.length||r.some(s=>s.state!=="off"))return f;let i=Math.max(...r.map(s=>Date.parse(String(s.last_changed??""))||0)),o=Math.floor((Date.now()-i)/6e4);return!i||o 💡 ${this.t("empty_lights_hint",{n:t.length,min:o})} `}renderOpenWhileHeating(e){let t=this.room;if(!t||!this.floor)return f;let r=e.filter(a=>a.attributes.hvac_action==="heating"||a.state==="heat"&&a.attributes.hvac_action===void 0);if(!r.length)return f;let i=a=>!!a&&a!=="none"&&this.hass.states[a]?.state==="on",o=this.floor.openings.filter(a=>a.room_id===t.id&&[a.contact,a.contact2,a.tilt,a.tilt2].some(i));if(!o.length)return f;let s=()=>{for(let a of r){if(!W(this.hass,a.entity_id))continue;(a.attributes.hvac_modes??[]).includes("off")?this.call("climate","set_hvac_mode",{entity_id:a.entity_id,hvac_mode:"off"}):typeof a.attributes.min_temp=="number"&&this.call("climate","set_temperature",{entity_id:a.entity_id,temperature:a.attributes.min_temp})}};return p`
🪟 ${this.t("open_heating_hint",{n:o.length})}
`}renderShade(){let e=this.room,{latitude:t,longitude:r}=this.hass.config??{};if(!e||!this.floor||!this.building||t===void 0||r===void 0)return f;let i=Y(this.hass,this.floor,e,"temperature");if(i===null||i{let l=a&&a!=="none"?this.hass.states[a]:void 0;if(!l||C(l))return!1;let c=l.attributes.current_position;return typeof c=="number"?c>30:l.state==="open"},s=[...new Set(Xl(this.building,this.floor,e,{latitude:t,longitude:r}).flatMap(a=>[a.cover,a.cover2].filter(o)))].filter(a=>W(this.hass,a));return s.length?p`
☀ ${this.t("shade_hint",{n:s.length,temp:`${L(this.hass,ue(this.hass,i),1)} ${ie(this.hass)}`})}
`:f}renderSunYear(){let e=this.room,{latitude:t,longitude:r}=this.hass.config??{};if(!e||!this.floor||!this.building||t===void 0||r===void 0)return f;let i={latitude:t,longitude:r};if(!Ut(this.building,this.floor,e,{...i,zone:this.hass.config?.time_zone}).facing.length)return f;let s=p``;if(!this._sunYear)return s;let a=Ql(this.building,this.floor,e,i),l=Math.max(1,...a),c=Array.from({length:12},(u,h)=>new Date(2026,h,15).toLocaleDateString(this.hass.language,{month:"narrow"}));return p`${s} `}renderEnergy(){let e=this._energy;if(!e||e.month<=0)return f;let t=this.building?.energy.tariff,r=t?this.hass.states[t]:void 0,i=r?{value:Number(r.state),unit:String(r.attributes.unit_of_measurement??"")}:null,o=ac(e.month,i),s=a=>`${L(this.hass,a,a<10?2:1)} kWh`;return p`

⚡ ${this.t("room_energy",{today:s(e.today),month:s(e.month)})}${o?` \xB7 ${L(this.hass,o.value,2)} ${o.currency}`:""}

`}renderCurve(){let e=this._curve;if(!e)return f;let t=e.filter(c=>c!==null),r=Math.min(...t),i=Math.max(...t),o=Math.max(1,i-r),s=e.map(c=>c===null?null:c-r+o*.1),a=Dn(s,220,36,o*1.2),l=c=>`${L(this.hass,ue(this.hass,c),1)}\xB0`;return p`
24 h · ${l(r)} – ${l(i)}
`}willUpdate(e){let t=e.get("room");e.has("room")&&t?.id!==this.room?.id&&(this._folded=!1,this._undo=null),this.room&&this.hass&&this.curveFor!==this.room.id&&(this.curveFor=this.room.id,this._curve=null,this._energy=null,this.loadCurve(this.room),this.loadEnergy(this.room))}updated(e){e.has("_folded")&&this.toggleAttribute("folded",this._folded)}t(e,t){return M(this.hass,e,t)}call(e,t,r){(Array.isArray(r.entity_id)?r.entity_id:[r.entity_id]).some(o=>typeof o!="string"||!W(this.hass,o))||this.hass.callService(e,t,r)}renderClean(e){let t=e.clean_entity,r=t?this.hass.states[t]:void 0;if(!t||!r||!W(this.hass,t))return f;let i=t.slice(0,t.indexOf(".")),o=()=>i==="script"?this.call("script","turn_on",{entity_id:t}):this.call(i,"press",{entity_id:t});return p`
`}allOff(e){let t=Tn(e.filter(r=>W(this.hass,r.entity_id)));for(let r of t.off)this.call(r.domain,r.service,r.data);this._undo=t.undo,clearTimeout(this.undoTimer),this.undoTimer=setTimeout(()=>this._undo=null,1e4)}undoAllOff(){for(let e of this._undo??[])this.call(e.domain,e.service,e.data);this._undo=null,clearTimeout(this.undoTimer)}renderAllOff(e){if(this._undo)return p`
${this.t("all_off_done")}
`;let{count:t}=Tn(e.filter(r=>W(this.hass,r.entity_id)));return t<2?f:p`
`}get areaName(){return this.room?.area_id?this.hass.areas?.[this.room.area_id]?.name:void 0}placedAs(e){for(let t of this.building?.floors??[])for(let r of t.placements)if(r.entity_id===e)return r}name(e){return this.placedAs(e)?.name?.trim()||O(this.hass,e,this.areaName)}nameButton(e){return p``}askFor(e){return!this.confirmEntities?.has(e)||confirm(this.t("confirm_switch",{name:this.name(e)}))}toggle(e,t,r){let i=()=>{this.confirmEntities?.has(e.entity_id)&&!confirm(this.t("confirm_switch",{name:this.name(e.entity_id)}))||r()};return p``}outsideRoom=null;render(){let e=!this.room&&this.outside?this.outside:null;e&&!this.outsideRoom&&(this.outsideRoom={id:"nf-outside",name:this.t("outside_area"),area_id:null,points:[],floor_material:"grass"});let t=this.room??(e?this.outsideRoom:null);if(!t||!this.hass)return f;let r=e??j(this.hass,t),i=this.memo,{shown:o,more:s}=e?{shown:e,more:[]}:i&&i.entities===this.hass.entities&&i.floor===this.floor&&i.room===t?i:this.memo={entities:this.hass.entities,floor:this.floor,room:t,...this.floor?Va(this.hass,this.floor,t):{shown:r,more:[]}},a=Yi(this.hass,s).map(x=>x.primary),l=a.length,c=[t.floor_heating,...Object.values(t.hvac??{}).flat()].filter(x=>!!x&&x!=="none"),u=new Set(c.map(x=>this.hass.states[x]?.attributes.symcon_id).filter(Boolean)),h=(this._showAll?[...o,...a]:o).filter(x=>!B(this.hass)||!u.has(this.hass.states[x]?.attributes.symcon_id)),m=x=>h.filter(D=>x.includes(P(D))).map(D=>this.hass.states[D]),d=m(["light"]),g=m(["cover"]),_=m(["climate"]),b=m(["media"]),y=m(["switch","fan","lock"]),$=m(["sensor","binary"]),S=m(["scene","script"]),A=t.symcon_read_room===!1?[]:this.facts(_),z=d.filter(x=>x.state==="on");return p`

${t.name}

${A.length?p`

${A.map((x,D)=>p`${D?" \xB7 ":f}${x}`)}

`:f} ${this.renderEnergy()} ${this.renderSunYear()} ${this.renderShade()} ${this.renderOpenWhileHeating(_)} ${this.renderEmptyLights(t,z)} ${this.renderCurve()}
x.rooms))}> ${this.renderAllOff([...d,...b,...y])} ${this.renderClean(t)} ${t.symcon_read_room===!1?p`

${this.t(h.length?"access_room_devices":"access_room_geometry")}

`:!t.area_id&&!e&&!(B(this.hass)&&c.length)?p`

${this.t("panel_no_area")}

`:!h.length&&!(B(this.hass)&&c.length)?p`

${this.t("panel_empty")}

`:f} ${S.length?this.section("panel_scenes",[p`
${S.map(x=>p``)}
`]):f} ${d.length?this.section("panel_lights",[...d.map(x=>W(this.hass,x.entity_id)?this.lightRow(x):this.sensorRow(x)),...t&&d.some(x=>W(this.hass,x.entity_id))?[this.renderMoods(t,d)]:[]],p`${d.some(x=>x.state!=="on"&&W(this.hass,x.entity_id))?p``:f}${z.some(x=>W(this.hass,x.entity_id))?p``:f}`):f} ${g.length?this.section("panel_covers",g.map(x=>W(this.hass,x.entity_id)?this.coverRow(x):this.sensorRow(x)),g.length>1&&fr(g.filter(x=>W(this.hass,x.entity_id)),this.confirmEntities).length?p``:f):f} ${B(this.hass)?p``:f} ${_.length?this.section("panel_climate",_.map(x=>W(this.hass,x.entity_id)?this.climateRow(x):this.sensorRow(x))):f} ${b.length?this.section("panel_media",b.map(x=>W(this.hass,x.entity_id)?this.mediaRow(x):this.sensorRow(x))):f} ${y.length?this.section("panel_switches",y.map(x=>W(this.hass,x.entity_id)?this.switchRow(x):this.sensorRow(x))):f} ${$.length?this.section("panel_sensors",$.map(x=>this.sensorRow(x))):f} ${this.extraValues(t)} ${!B(this.hass)&&bl(this.hass)&&_l(this.hass,this.floor,t)?this.announceSection(t):f} ${this.pluginSections(t,h)} ${l?p``:f}
`}extraValues(e){if(!this.floor)return f;let t=[...this.floor.placements.filter(r=>!r.outside&&H([r.x,r.z],e.points)).map(r=>({name:r.name||O(this.hass,r.entity_id),rows:zr(this.hass,r.values)})),...this.floor.furniture.filter(r=>H([r.x,r.z],e.points)).map(r=>({name:r.name||(r.entity&&r.entity!=="none"?O(this.hass,r.entity):le(this.hass,r.type)),rows:[...Zr(this.hass,r),...zr(this.hass,r.values)]}))].filter(r=>r.rows.length);return t.length?this.section("device_values",t.map(r=>p`
${r.name}${r.rows.map(i=>p`
${i.icon}${i.label}${i.text}${U(this.hass,[i.entity],i.label)}
`)}
`)):f}facts(e){let t=[],r=this.room;if(!r)return t;let i=(T,R)=>{let E=Y(this.hass,this.floor,r,T);if(E===null)return null;if(T==="temperature")return`${L(this.hass,ue(this.hass,E),1)} ${ie(this.hass)}`;let I=ye(this.hass,this.floor,r,T)[0],N=this.hass.states[I]?.attributes.unit_of_measurement??R;return`${L(this.hass,E,1)} ${N}`},o=e.find(T=>typeof T.attributes.current_temperature=="number"),s=i("temperature","\xB0C");s?t.push(p`${s}${U(this.hass,ye(this.hass,this.floor,r,"temperature"),"Temperatur")}`):o&&r.climate?.temperature!=="none"&&t.push(p`${L(this.hass,o.attributes.current_temperature,1)} ${ie(this.hass)}${U(this.hass,[o.entity_id],"Temperatur")}`);let a=i("humidity","%");a&&t.push(p`${a}${U(this.hass,ye(this.hass,this.floor,r,"humidity"),"Luftfeuchte")}`);let l=Y(this.hass,this.floor??null,r,"illuminance");l!==null&&t.push(p`☀ ${L(this.hass,l,0)} lx${U(this.hass,ye(this.hass,this.floor,r,"illuminance"),"Helligkeit")}`);let c=Vt(this.hass,r,this.building?.floors.flatMap(T=>T.rooms)).find(T=>T.kind==="electricity"&&T.metric==="power"&&T.unit==="W"),u=!c&&this.floor&&this.building?Mo(this.hass,this.building,this.floor,r):null;c?t.push(p`⚡ ${Le(this.hass,c)}${U(this.hass,c.sources,"Leistung")}`):u!==null&&t.push(`\u26A1 ${kt(this.hass,u)}`);let h=this.floor?this.floor.openings.filter(T=>T.room_id===r.id).flatMap(T=>[T.contact,T.contact2,T.tilt,T.tilt2]).map(T=>T&&T!=="none"?this.hass.states[T]:void 0).filter(T=>T?.state==="on").map(T=>Date.parse(String(T.last_changed??""))).filter(Number.isFinite):[];h.length&&t.push(`\u{1FA9F} ${this.t("open_since",{time:Eo(Date.now()-Math.min(...h))})}`);let m=j(this.hass,r).map(T=>this.hass.states[T]).filter(T=>!!T&&T.entity_id.startsWith("binary_sensor.")&&["motion","occupancy","presence"].includes(String(T.attributes.device_class)));if(m.length)if(m.some(T=>T.state==="on"))t.push(`\u{1F6B6} ${this.t("presence_now")}`);else{let T=Math.max(...m.map(R=>Date.parse(String(R.last_changed??""))||0));T>0&&t.push(`\u{1F6B6} ${this.t("presence_last",{time:Eo(Date.now()-T)})}`)}let d=this.building?uc(this.hass,this.building).filter(T=>T.roomId===r.id&&T.level`${this.name(T.entity)} ${Math.round(T.level)} %`).join(", ")})}`);let g=(this.building?.settings.circuits??[]).filter(T=>T.rooms.includes(r.id)).map(T=>T.name),_=this.building?.settings.room_facts_off??[];g.length&&!_.includes("circuits")&&t.push(`\u{1F50C} ${g.join(", ")}`);let{latitude:b,longitude:y,time_zone:$}=this.hass.config??{};if(this.floor&&b!==void 0&&y!==void 0&&this.building&&!_.includes("sun")){let T=Ut(this.building,this.floor,r,{latitude:b,longitude:y,zone:$});T.facing.length&&t.push(`\u2600 ${this.t("room_sun_hours",{h:L(this.hass,T.hours,1),facing:T.facing.join(", ")})}`)}let S=Y(this.hass,this.floor,r,"temperature"),A=Y(this.hass,this.floor,r,"humidity"),z=Kr(Y(this.hass,this.floor,r,"co2"),A,jt(S,A));z&&!_.includes("air")&&t.push(`\u{1F4A8} ${this.t(`air_${z}`)}`);let x=Gr(S,A,Y(this.hass,this.floor,r,"co2"),xt(new Date,this.hass.config?.latitude)),D=r.hvac?.status;return D&&D!=="none"?t.push(p`${De(this.hass.states[D])}${U(this.hass,[D],"Raumstatus")}`):x!==null&&(S!==null||A!==null)&&!_.includes("comfort")&&t.push(`\u{1F60A} ${this.t("comfort_n",{n:x})}`),t}announceSection(e){let t=this.phrases?.length?this.phrases:[1,2,3,4,5].map(o=>this.t(`announce_phrase_${o}`)),r=o=>{let s=o.trim();s&&(clearTimeout(this.saidTimer),this.hass.callService("nextfloor","announce",{message:s,rooms:[e.id],on_screens:!1}).then(()=>this._said={text:this.t("announce_sent",{message:s}),failed:!1},a=>this._said={text:this.t("announce_failed",{error:a?.message??String(a)}),failed:!0}),this.saidTimer=setTimeout(()=>this._said=null,6e3))},i=o=>{o.preventDefault();let s=o.currentTarget.querySelector("input");r(s.value),s.value=""};return this.section("panel_announce",[p`
${t.map(o=>p``)}
${this._said?p`

${this._said.text}

`:f}`])}pluginSections(e,t){return Xs({hass:this.hass,room:{id:e.id,name:e.name,area_id:e.area_id??null},entities:t}).map(i=>p`

${i.title}

${typeof i.content=="string"?p`

${i.content}

`:i.content}
`)}section(e,t,r=f){return p`

${this.t(e)}

${r}
${t}
`}lightRow(e){let t=e.attributes,r=e.state==="on",i=t.supported_color_modes??[],o=i.some(d=>d!=="onoff"),s=i.includes("color_temp"),a=i.some(d=>["hs","rgb","rgbw","rgbww","xy"].includes(d)),l=typeof t.brightness=="number"?Math.round(t.brightness/255*100):100,c=t.min_color_temp_kelvin??2200,u=t.max_color_temp_kelvin??6500,h=e.entity_id,m=!!this.placedAs(h)?.simple;return p`
${Yt("light")} ${this.nameButton(h)} ${this.stateOf(e)}${U(this.hass,[e.entity_id])} ${this.toggle(e,r,()=>this.call("light","toggle",{entity_id:h}))} ${o&&!m?p``:f} ${r&&s&&!m?p``:f} ${r&&a&&!m?p`
${bp.map(d=>p``)}
`:f}
`}coverRow(e){let t=$r(this.hass,this.building?.floors??[],e.entity_id);e=Mr(this.hass,e,t);let r=e.attributes,i=r.supported_features??0,o=e.entity_id,s=C(e)&&!gn(e);return p`
${Yt("cover")} ${this.nameButton(o)} ${this.stateOf(e)}${U(this.hass,[e.entity_id])}
${i&_p?p``:f}
${i&gp&&typeof r.current_position=="number"?p``:f} ${i&128&&typeof r.current_tilt_position=="number"?p``:i&48?p`
${i&16?p``:f} ${i&32?p``:f}
`:f}
`}climateRow(e){let t=e.attributes,r=e.entity_id,i=typeof t.temperature=="number"?t.temperature:null,o=t.target_temp_step??.5,s=t.min_temp??5,a=t.max_temp??30,l=t.hvac_modes??[],c=u=>this.call("climate","set_temperature",{entity_id:r,temperature:Math.min(a,Math.max(s,Math.round(u/o)*o))});return p`
${Yt("climate")} ${this.nameButton(r)} ${this.stateOf(e)}${U(this.hass,[e.entity_id])} ${i!==null?p`
${this.t("target_temp")} ${L(this.hass,i,1)} ${ie(this.hass)}
`:f} ${l.length>1?p`
${l.map(u=>p``)}
`:f}
`}stateOf(e,t=ae(this.hass,e)){if(this.room?.no_state?.includes(e.entity_id))return"";let r=P(e.entity_id);return e.state==="unknown"&&r!=="sensor"&&r!=="binary"?"":t}stateLabel(e){let t=`state_${e}`,r=this.t(t);return r===t?e:r}mediaRow(e){let t=e.attributes,r=e.entity_id,i=C(e)||e.state==="off",o=[t.media_title,t.media_artist].filter(s=>typeof s=="string"&&s).join(" \xB7 ");return p`
${Yt("media")} ${this.nameButton(r)} ${this.stateOf(e,this.stateLabel(e.state))}${U(this.hass,[e.entity_id])} ${o?p`

${o}

`:f}
${typeof t.volume_level=="number"?p``:f}
`}switchRow(e){let t=e.entity_id,r=P(t),i=t.slice(0,t.indexOf(".")),o=r==="lock"?e.state==="unlocked"||e.state==="open":ne(e),s=()=>r==="lock"?this.call("lock",o?"lock":"unlock",{entity_id:t}):this.call(i,"toggle",{entity_id:t});return p`
${Yt(r)} ${this.nameButton(t)} ${this.stateOf(e)}${U(this.hass,[e.entity_id])} ${this.toggle(e,o,s)}
`}sensorRow(e){let t=P(e.entity_id),r=t==="binary"&&e.state==="on";return p`
${Yt(t)} ${this.nameButton(e.entity_id)} ${this.stateOf(e)}${U(this.hass,[e.entity_id])}
`}fire(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}static styles=[ve,Pe,Q` :host { display: block; } .nf-rp { /* the host may be pointer-events: none so the 3D view stays usable around the panel */ pointer-events: auto; display: flex; flex-direction: column; max-height: 100%; background: var(--nf-chrome-solid); border: 1px solid var(--nf-line); border-radius: 18px; box-shadow: var(--nf-shadow); overflow: hidden; } .nf-rp-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 10px 16px; border-bottom: 1px solid var(--nf-line); } .nf-rp-head > div { flex: 1; min-width: 0; } h2 { margin: 0; font: 700 21px var(--nf-title-font); letter-spacing: -0.01em; } .nf-rp-facts { margin: 2px 0 0; color: var(--nf-muted); font-size: 13px; font-variant-numeric: tabular-nums; } @media (pointer: coarse) { .nf-rp-close { width: 40px; height: 40px; } .nf-rp-swatch { width: 36px; height: 36px; } .nf-rp-small { min-height: 36px; } } .nf-rp-close { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: none; background: color-mix(in srgb, var(--nf-text) 6%, transparent); color: var(--nf-text); cursor: pointer; } .nf-rp-body[hidden] { display: none; } .nf-rp-head:has(+ .nf-rp-body[hidden]) { border-bottom: none; } .nf-rp-body { overflow-y: auto; padding: 6px 14px 16px 16px; display: grid; gap: 14px; overscroll-behavior: contain; } .nf-rp-shade { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; padding: 6px 8px; border-radius: 8px; font-size: 12px; background: color-mix(in srgb, var(--nf-warm) 16%, transparent); } .nf-rp-sun-year { border: none; background: none; color: var(--nf-muted); font: inherit; font-size: 12px; padding: 2px 0; cursor: pointer; } .nf-rp-sun-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; height: 54px; margin: 2px 0 6px; } .nf-rp-sun-bars span { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; } .nf-rp-sun-bars i { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--nf-warm); } .nf-rp-sun-bars b { font-size: 10px; font-weight: 500; color: var(--nf-muted); } .nf-rp-alloff { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 6px 0 2px; font-size: 13px; color: var(--nf-muted); } .nf-rp-note { color: var(--nf-muted); font-size: 13px; margin: 8px 0 0; } .nf-rp-sec-head { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; } h3 { margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nf-muted); } .nf-rp-row { display: grid; grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 6px 10px; padding: 9px 0; border-bottom: 1px solid var(--nf-line); } .nf-rp-row:last-child { border-bottom: none; } .nf-rp-row > :nth-child(n + 5), .nf-rp-row > .nf-rp-wide { grid-column: 2 / -1; } .nf-rp-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--nf-muted); background: color-mix(in srgb, var(--nf-soft) 12%, transparent); } .nf-rp-on { color: #2a1a00; background: var(--nf-warm); box-shadow: 0 0 14px rgba(255, 181, 71, 0.55); } .nf-rp-name { font: inherit; font-weight: 500; color: var(--nf-text); background: none; border: none; padding: 0; text-align: left; cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .nf-rp-state { font-size: 12.5px; color: var(--nf-muted); font-variant-numeric: tabular-nums; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; } .nf-rp-row > .nf-rp-state:last-child { grid-column: 3 / -1; justify-self: end; } .nf-switch { position: relative; width: 44px; height: 26px; border-radius: 999px; border: none; background: color-mix(in srgb, var(--nf-text) 10%, transparent); cursor: pointer; } .nf-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #e6eefc; transition: transform 0.2s ease; } .nf-switch[aria-checked="true"] { background: var(--nf-warm); } .nf-switch[aria-checked="true"]::after { transform: translateX(18px); } .nf-switch:disabled { opacity: 0.4; cursor: default; } .nf-rp-slider { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; font-size: 12px; color: var(--nf-muted); } .nf-rp-slider input { width: 100%; accent-color: var(--nf-accent); } .nf-rp-ct input { accent-color: var(--nf-warm); } .nf-rp-swatches, .nf-rp-buttons, .nf-rp-chips, .nf-rp-say { display: flex; gap: 8px; margin-top: 8px; } .nf-rp-say input { flex: 1; min-width: 0; font: inherit; font-size: 14px; color: var(--nf-text); background: var(--nf-fill); border: none; border-bottom: 1px solid var(--nf-line); border-radius: 10px 10px 4px 4px; padding: 8px 10px; } .nf-rp-fail { color: #ff6b7a; } .nf-rp-moods { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .nf-rp-mood { display: inline-flex; gap: 2px; align-items: center; } .nf-rp-mood-to { width: 38px; font: inherit; background: var(--nf-bg2); color: var(--nf-text); border: 1px solid var(--nf-line); border-radius: 8px; } .nf-rp-mood input { width: 120px; font: inherit; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--nf-line); background: var(--nf-bg2); color: var(--nf-text); } .nf-rp-curve { position: relative; margin-top: 4px; width: 220px; max-width: 100%; } .nf-rp-curve svg { display: block; width: 100%; height: 30px; } .nf-rp-curve path { fill: none; stroke: var(--nf-warm, #ff9f43); stroke-width: 1.5; vector-effect: non-scaling-stroke; } .nf-rp-curve span { font-size: 10.5px; color: var(--nf-muted); } .nf-rp-scenes { display: flex; flex-wrap: wrap; gap: 6px; } .nf-rp-swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--nf-text) 20%, transparent); background: var(--c); box-shadow: 0 0 10px var(--c); cursor: pointer; } .nf-rp-more { justify-self: start; } .nf-rp-small { display: inline-flex; align-items: center; justify-content: center; padding: 5px 10px; min-height: 30px; font-size: 13px; } .nf-rp-stepper { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; font-weight: 600; } .nf-rp-stepper small { color: var(--nf-muted); font-weight: 500; margin-right: 4px; } .nf-rp-stepper .nf-btn { width: 36px; padding: 4px 0; font-size: 17px; } .nf-rp-chips .nf-chip { box-shadow: none; border: 1px solid var(--nf-line); min-height: 30px; padding: 4px 11px; font-size: 13px; } .nf-rp-media { margin: 0; font-size: 12.5px; color: var(--nf-muted); } button:focus-visible, input:focus-visible { outline: 2px solid var(--nf-accent); outline-offset: 2px; } `]};customElements.get("nf-room-panel")||customElements.define("nf-room-panel",To);function $c(n){if(!n)return"";let e=Math.min(.8,Math.max(0,n.dim??.35)),t=n.image&&/^(https:\/\/|\/local\/|\/api\/)[^"'()\\\s]+$/.test(n.image)?n.image:null,r=n.color&&/^#[0-9a-f]{6}$/i.test(n.color)?n.color:null;return t?`;background:linear-gradient(rgba(0,0,0,${e}),rgba(0,0,0,${e})),center / cover no-repeat url("${t}")${r?` ${r}`:""}`:r?`;background:${r}`:""}var wp=[[/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]]],Mc=[34,211,238];function Fo(n){return n?wp.find(([e])=>e.test(n))?.[1]??Mc:Mc}function Do(n){if(n.state==="playing"||n.state==="paused")return!0;let e=t=>typeof n.attributes[t]=="string"&&n.attributes[t]!=="";return n.state==="on"&&(e("media_title")||e("media_channel")||e("source")||e("app_name"))}var Ho=n=>n.state==="playing"||n.state==="on"&&Do(n);function Ac(n,e){let t=[],r=new Set;for(let i of e){if(!i.entity.startsWith("media_player.")||r.has(i.entity))continue;r.add(i.entity);let o=n.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:Fo(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 Ec(n){let e=new Map(n.filter(i=>i.playing).map(i=>[i.entity,i])),t=[],r=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&&!r.has(a)&&(r.add(a),t.push([i,s]))}return t}var xp=3;function Rc(n,e,t){let r=[];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||!ne(n.states[s])||r.push({id:o.id,at:{floorId:i.id,x:o.x,y:se(i,o)+o.h,z:o.z},reach:Math.min(15,Math.max(.5,o.spray??xp))})}return r}var Jr=n=>n&&n!=="none"?n:null,zc=n=>Math.min(1,Math.max(0,n));function Tc(n,e){let t=new Map;for(let r of e.settings.roof?.windows??[]){let i=Ke(n,{cover:Jr(r.cover),contact:Jr(r.contact),tilt:Jr(r.tilt)},"window"),o=Jr(r.window),s=o?n.states[o]:void 0,a=i.open;if(s&&!C(s)){let l=s.attributes.current_position;a=typeof l=="number"?zc(l/100):s.state==="open"||s.state==="opening"?1:0}t.set(r.id,{open:a,tilt:i.tilt,cover:i.cover??0})}return t}function kp(n,e){let t=i=>Math.hypot(i.x-e.x,i.z-e.z);return n.placements.filter(i=>i.entity_id.startsWith("media_player.")&&t(i)t(i)-t(o))[0]?.entity_id??null}var at=(n,e)=>typeof n[e]=="string"?n[e]:"";function Fc(n,e,t){let r=[];for(let i of e.floors)for(let o of i.furniture){if(!xr(o.type))continue;let s=t?.get(o.id)?.entity??null,a=s?.startsWith("media_player.")?s:kp(i,o),l=a?n.states[a]:void 0;if(!l||!Do(l))continue;let c=l.attributes,u=at(c,"app_name")||at(c,"source")||null;r.push({id:o.id,furnitureId:o.id,floorId:i.id,color:Fo(u),title:at(c,"media_title")||at(c,"media_channel")||u||"",subtitle:at(c,"media_artist")||at(c,"media_series_title")||at(c,"media_album_name"),app:u,picture:at(c,"entity_picture")||null,playing:Ho(l),ambilight:o.ambilight??1})}return r}function Dc(n){let e=n.states["sun.sun"]?.attributes;return typeof e?.elevation=="number"&&typeof e.azimuth=="number"?{elevation:e.elevation,azimuth:e.azimuth}:null}function Hc(n,e){return(n===null?0:zc((n+4)/16))*(1-.45*e)}function lt(n,e){return n.states["weather.nextfloor_symcon"]?"weather.nextfloor_symcon":e&&n.states[e]?e:Object.keys(n.states).filter(t=>t.startsWith("weather.")).sort()[0]??null}var Qr=new Set(["contact_lost","unlocked_night","own"]);function Sp(n,e){let t=n.states[e.entity];if(!t||["unavailable","unknown"].includes(t.state))return!1;let r=(e.state??"on").trim(),i=/^([<>])\s*(-?\d+(?:[.,]\d+)?)$/.exec(r);if(i){let o=Number(t.state),s=Number(i[2].replace(",","."));return Number.isFinite(o)&&(i[1]==="<"?os)}return r.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean).includes(String(t.state).toLowerCase())}var $p=600*1e3,Mp=new Set(["rainy","pouring","lightning-rainy","hail","snowy-rainy"]),Ap=new Map([["smoke","smoke"],["gas","gas"],["carbon_monoxide","co"],["moisture","water"]]),Pc=(n,e)=>{if(e.startsWith("binary_sensor."))return Ap.get(String(n.states[e]?.attributes.device_class))};function Ep(n,e){let t=new Set,r=[];for(let i of n.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),r.push({floorId:i.id,roomId:o.room_id,entity:a}))}return r}function Ic(n,e,t,r){let i=[];for(let a of e.floors)for(let l of a.rooms){let c=j(n,l).filter(u=>Pc(n,u));c.length>0&&i.push({floorId:a.id,roomId:l.id,sensors:c})}let o=e.settings.rain_warning!==!1,s=e.settings.rain_sensor;return{rooms:i,alarms:Object.keys(n.states).filter(a=>a.startsWith("alarm_control_panel.")),weather:o?lt(n,t??e.settings.weather_entity):null,rain:o&&s&&s!=="none"?s:null,rainInverted:!!e.settings.rain_sensor_inverted,outage:e.settings.outage_sensor&&e.settings.outage_sensor!=="none"?e.settings.outage_sensor:null,contacts:e.settings.contact_warning&&r?Ep(e,r):[],own:(e.settings.own_alerts??[]).filter(a=>a.entity),locks:e.settings.night_lock_warning?e.floors.flatMap(a=>a.openings.filter(l=>l.lock&&l.lock!=="none").map(l=>({entity:l.lock,roomId:l.room_id,floorId:a.id}))):[]}}function Cc(n){let e=n.rooms.flatMap(t=>t.sensors).concat(n.alarms);for(let t of[n.weather,n.rain,n.outage])t&&e.push(t);for(let t of n.contacts??[])e.push(t.entity);for(let t of n.own??[])e.push(t.entity);for(let t of n.locks??[])e.push(t.entity);return e}function Rp(n,e){let t=[];for(let{floorId:r,roomId:i,sensors:o}of e.rooms)for(let s of o){let a=Pc(n,s);a&&n.states[s]?.state==="on"&&t.push({kind:a,entity:s,roomId:i,floorId:r})}return t}var zp=(n,e)=>{let t=Ke(n,e,"window");return Math.max(t.open,t.tilt,t.open2,t.tilt2)>=.5};function Tp(n,e){if(e.rain){let r=n.states[e.rain];if(!r||r.state==="unavailable"||r.state==="unknown")return!1;if(r.attributes.symcon_id){let s=ce(r);return s===null?!1:e.rainInverted?!s:s}let i=Number(r.state),o=Number.isFinite(i)?i>0:r.state==="on"||/rain|regen|wet|nass/i.test(r.state);return e.rainInverted?!o:o}let t=e.weather?n.states[e.weather]?.state:void 0;return!!t&&Mp.has(t)}var Fp=/^(off_grid|off-grid|outage|grid_down|grid_lost|islanding|island|backup|no_grid|stromausfall|netzausfall|inselbetrieb)$/i;function Dp(n,e){let t=e?n.states[e]:void 0;if(!t||t.state==="unavailable"||t.state==="unknown")return!1;if(e.startsWith("binary_sensor.")){let i=String(t.attributes.device_class??"");return i==="power"||i==="plug"?t.state==="off":t.state==="on"}let r=Number(t.state);return Number.isFinite(r)?t.attributes.unit_of_measurement==="V"&&r<50:Fp.test(t.state.trim())}function Hp(n,e,t,r){if(!Tp(n,t))return[];let i=[];for(let o of e.floors)for(let s of o.openings){let a=r.get(s.id);s.type!=="window"||s.rain_warning===!1||!a||!zp(n,a)||i.push({kind:"window_rain",entity:a.contact??a.tilt??a.contact2??s.id,roomId:s.room_id,floorId:o.id})}return i}var Pp=new Set(["door","window","opening","garage_door","motion","occupancy","presence","vibration","tamper","sound","glass"]);function Ip(n,e){let t=n.states[e],r=t?.attributes.open_sensors;if(r&&typeof r=="object"){let a=Object.keys(r)[0];if(a)return a}let i=Date.parse(t?.last_changed??"");if(!Number.isFinite(i))return null;let o=null,s=12e4;for(let a of Object.values(n.states)){if(!a.entity_id.startsWith("binary_sensor.")||!Pp.has(String(a.attributes.device_class??""))||a.state!=="on")continue;let l=Date.parse(a.last_changed??""),c=i-l;Number.isFinite(l)&&c>=-5e3&&Math.abs(c)a.entity_id===t),s=o?i.rooms.find(a=>a.points.length>=3&&H([o.x,o.z],a.points)):void 0;if(s)return{roomId:s.id,floorId:i.id}}let r=rt(n,t);for(let i of e.floors){let o=r?i.rooms.find(s=>s.area_id===r):void 0;if(o)return{roomId:o.id,floorId:i.id}}return null}function Np(n,e,t){let r=[];for(let i of e.alarms){let o=n.states[i]?.state;if(o==="triggered"){let s=Ip(n,i),a=s?Cp(n,t,s):null;r.push({kind:"alarm",entity:i,roomId:a?.roomId??null,floorId:a?.floorId??null,...s?{cause:s}:{}})}o==="pending"&&r.push({kind:"alarm_pending",entity:i,roomId:null,floorId:null})}return r}function Lp(n,e,t){let r=n.states[e];if(r?.state!=="unavailable")return!1;let i=Date.parse(r.last_changed??"");return!Number.isFinite(i)||t-i>=$p}function Nc(n,e){return(e.contacts??[]).some(t=>n.states[t.entity]?.state==="unavailable")}function Op(n,e,t){return(e.contacts??[]).filter(r=>Lp(n,r.entity,t)).map(r=>({kind:"contact_lost",entity:r.entity,roomId:r.roomId,floorId:r.floorId}))}function Po(n,e,t,r,i=Date.now()){let o=t.outage&&Dp(n,t.outage)?[{kind:"power_outage",entity:t.outage,roomId:null,floorId:null}]:[],s=(t.own??[]).filter(u=>Sp(n,u)).map(u=>{let h=u.room_id?e.floors.find(m=>m.rooms.some(d=>d.id===u.room_id)):void 0;return{kind:"own",entity:u.entity,roomId:h?u.room_id:null,floorId:h?.id??null,text:u.text,...u.color?{color:u.color}:{},...u.tap?{tap:u.tap}:{}}}),a=new Date(i).getHours(),c=a>=22||a<6?(t.locks??[]).filter(u=>n.states[u.entity]?.state==="unlocked").map(u=>({kind:"unlocked_night",entity:u.entity,roomId:u.roomId,floorId:u.floorId})):[];return[...Rp(n,t),...Hp(n,e,t,r),...Np(n,t,e),...o,...Op(n,t,i),...c,...s]}var Wp={smoke:[1,.2,.25],gas:[1,.2,.25],co:[1,.2,.25],alarm:[1,.2,.25],water:[.2,.6,1],window_rain:[.35,.72,1],alarm_pending:[1,.62,.2],power_outage:[1,.62,.2],contact_lost:[1,.62,.2],unlocked_night:[1,.62,.2],own:[1,.62,.2]},Lc=n=>Wp[n];function Io(n,e,t){let r=n?O(n,t.entity):t.entity,i=t.kind==="own"?t.text||r:t.cause?M(n,"alert_alarm_by",{name:r,cause:n?O(n,t.cause):t.cause}):M(n,`alert_${t.kind}`,{name:r}),o=t.roomId===null?void 0:e.floors.flatMap(s=>s.rooms).find(s=>s.id===t.roomId);return o?`${o.name} \xB7 ${i}`:i}var Bp=new Set(["on","home","true","present","occupied","detected","parked","yes","1"]),Xr=n=>n&&n!=="none"?n:null,Oc=n=>n.trim().toLowerCase();function Vp(n,e){let t=Oc(e);if(!t||!n.types)return null;let r=n.types.map(s=>({word:Oc(s.state),vehicle:s.vehicle})),i=r.find(s=>s.word===t),o=r.find(s=>s.word!==""&&t.includes(s.word));return(i??o)?.vehicle??null}function Co(n,e){if(e.type!=="parking")return null;let t=Xr(e.entity);if(t!==null){let o=n.states[t]?.state;if(o===void 0||!Bp.has(o.toLowerCase()))return null}let r=e.vehicle??null,i=Xr(e.type_entity);return i!==null&&e.types&&e.types.length>0&&(r=Vp(e,n.states[i]?.state??"")??r),r!==null&&ee(r)?r:null}function No(n,e){let t=new Map;for(let r of e.floors.flatMap(i=>i.furniture)){let i=Co(n,r);i&&t.set(r.id,i)}return t}function Wc(n){let e=[];for(let t of n.flatMap(r=>r.furniture))t.type==="parking"&&e.push(Xr(t.entity),Xr(t.type_entity));return e.filter(t=>t!==null)}function Bc(n,e){let t=ee(e);if(!t)return null;let r=n.scale??1,[i,o,s]=t.size.map(a=>a*r);return{id:`${n.id}:vehicle`,type:e,x:n.x,z:n.z,rotation:n.rotation,w:i,d:o,h:s,variant:n.variant??null,entity:null,power:null}}var Kp=n=>!!n&&n!=="none",Lo=n=>n.floors.flatMap(e=>e.rooms),Gp=n=>n.floors.flatMap(e=>e.furniture);function Up(n){return[...n.values()].flatMap(e=>[e.cover,e.cover2,e.coverTilt,e.cover2Tilt,e.contact,e.tilt,e.contact2,e.tilt2,e.position,e.tiltAngle])}function jp(n){let{hass:e,building:t,furnitureLinks:r}=n,i=Gp(t);return[...[...r.values()].flatMap(o=>[o.entity,o.power]),...i.flatMap(o=>[o.state_entity,o.state_entity2,o.color_entity,...o.gang_entities??[],...o.extra_lights??[],o.cover_entity,o.care_entity,o.room_sensor,o.show_when?.entity,o.picture&&/^[a-z_]+\.[a-z0-9_]+$/.test(o.picture)?o.picture:null]),...i.filter(o=>o.type==="washer"||o.type==="dryer"||o.type==="dishwasher").flatMap(o=>vn(e,r.get(o.id)?.entity??r.get(o.id)?.power).filter(s=>s.startsWith("sensor."))),...i.flatMap(o=>[o.door_left,o.door_right,o.soc,o.status,o.charge,o.export,o.temp_entity,o.temp_entity2,...(o.values??[]).map(s=>s.entity)]),...i.flatMap(Cl),...i.flatMap(Sc),...i.filter(o=>o.type==="robot_vacuum").map(o=>kr(e,r.get(o.id)?.entity??null,o.room_sensor)),...i.flatMap(o=>(o.pictures??[]).flatMap(s=>[s.entity,...s.image.startsWith("camera:")?[s.image.slice(7)]:[]]))]}function qp(n){let e=n.settings.roof;return[...(e?.windows??[]).flatMap(t=>[t.cover,t.contact,t.tilt]),...(e?.solar??[]).map(t=>t.entity),...(e?.strings??[]).map(t=>t.entity)].filter(Kp)}function Vc(n){let{hass:e,building:t}=n,r=ll(t),i=t.energy,o=Lo(t).flatMap(l=>j(e,l).filter(c=>P(c)==="light")),s=t.floors.flatMap(l=>l.rooms.flatMap(c=>n.needsRoomSensors||c.climate_card?[...j(e,c).filter(u=>u.startsWith("sensor.")||u.startsWith("climate.")),...Object.values(c.climate??{}).flat(),...["temperature","humidity","co2","illuminance"].flatMap(u=>ye(e,l,c,u))]:[])),a=[...r,...Kl(e,t.floors),...t.floors.flatMap(l=>l.placements.flatMap(c=>[c.cover_tilt,c.position,...(c.values??[]).map(u=>u.entity)])),...Up(n.openingLinks),...r.map(l=>we(e,l)),...r.flatMap(l=>e.states[l]?Zs({hass:e,entityId:l,state:e.states[l]}):[]),...jp(n),...qp(t),i.grid,i.solar,i.battery,i.battery_soc,i.consumption,i.tariff,i.gas,i.water,...t.presence.flatMap(l=>[l.person,l.sensor]),...o,...Lo(t).map(l=>l.floor_heating),...Lo(t).flatMap(l=>Object.values(l.hvac??{}).flat()),...Object.values(t.settings.weather_variables??{}),...t.floors.flatMap(l=>(l.outdoor??[]).flatMap(c=>[c.temp_entity,c.pump_entity])),...s,...n.alertSources?Cc(n.alertSources):[],...Wc(t.floors),...Ka(e,t.floors),lt(e,n.weatherEntityId??t.settings.weather_entity),"sun.sun"];return[...new Set(a.filter(l=>!!l))]}function Kc(n,e){return e==="area"||e==="plan"||e==="off"?e:n==="plan"||n==="off"?n:"area"}function Gc(n,e,t,r,i,o){if(o==="off")return[];let s=new Set(o==="area"?j(n,t).filter(a=>P(a)==="light"):[]);for(let a of e.placements)P(a.entity_id)==="light"&&H([a.x,a.z],t.points)&&s.add(a.entity_id);for(let a of e.furniture){let l=r.get(a.id)?.entity;l&&mr(a.type)&&H([a.x,a.z],t.points)&&s.add(l)}return[...s].filter(a=>!i.has(a))}function Uc(n,e){let t=n.floors.flatMap(s=>s.furniture.filter(a=>a.tap?.action).map(a=>({floor:s,item:a}))),r=new Set(t.map(({item:s})=>s.id)),i=new Map(e.filter(s=>s.furnitureId&&r.has(s.furnitureId)).map(s=>[s.id,s.furnitureId])),o=new Set(i.values());return{pins:i,bare:t.filter(({item:s})=>!o.has(s.id))}}var jc="https://tile.openstreetmap.org/{z}/{x}/{y}.png",Zp="\xA9 OpenStreetMap contributors";var _0=Math.PI/180;var Yp=n=>n.url&&n.url.startsWith("https://")?n.url:jc;var qc=n=>!!n&&n.on===!0&&Number.isFinite(n.lat)&&Number.isFinite(n.lon);function Oo(n){let e=Yp(n);if(e===jc)return{text:Zp,href:"https://www.openstreetmap.org/copyright"};try{let t=new URL(e.replace(/\{[a-z]\}/g,"a")).host;return{text:`Map: ${t}`,href:`https://${t}/`}}catch{return{text:"Map",href:"#"}}}var Jp=["neon","blueprint","day"],ei=["auto",...Jp];function ti(n,e){return n!=="auto"?n??"neon":e==="above_horizon"?"day":"neon"}var Hn={neon:{night:[[11,17,32],[7,11,20]],day:[[26,44,78],[12,20,36]]},blueprint:{night:[[26,70,130],[10,38,78]],day:[[34,86,150],[14,48,96]]},day:{night:[[214,224,238],[176,190,210]],day:[[242,246,251],[205,216,230]]}};function Zc(n,e){let t=new Map;for(let r of e.floors)for(let i of r.outdoor??[])for(let o of i.gates??[]){let s=o.entity?n.states[o.entity]?.state:void 0,a=o.contact?n.states[o.contact]?.state:void 0;if(s===void 0&&a===void 0)continue;let l=s==="open"||s==="opening"||s==="on"||s==="unlocked"||s==="unlocking";t.set(o.id,l||a==="on")}return t}var Qp={sunny:{cloud:0},"clear-night":{cloud:0},partlycloudy:{cloud:.4},cloudy:{cloud:.85},fog:{fog:.9,cloud:.5},rainy:{rain:.5,cloud:.8},pouring:{rain:1,cloud:1,wind:.3},"lightning-rainy":{rain:.75,cloud:1,lightning:!0,wind:.35},lightning:{cloud:.85,lightning:!0},hail:{hail:.8,rain:.3,cloud:1},snowy:{snow:.7,cloud:.85},"snowy-rainy":{snow:.45,rain:.3,cloud:.95},windy:{wind:.7,cloud:.25},"windy-variant":{wind:.7,cloud:.65},exceptional:{cloud:.6,wind:.5}},Jt=n=>typeof n=="number"&&Number.isFinite(n)?n:typeof n=="string"&&n.trim()!==""&&Number.isFinite(Number(n))?Number(n):null,ni=n=>Math.min(1,Math.max(0,n));function ri(n,e){switch(e){case"m/s":return n*3.6;case"mph":return n*1.609;case"kn":return n*1.852;case"ft/s":return n*1.097;default:return n}}function Xp(n){let e=Jt(n);if(e!==null)return(e%360+360)%360;if(typeof n!="string")return null;let r=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"].indexOf(n.trim().toUpperCase().replace("O","E"));return r<0?null:r*22.5}function Yc(n,e){let t=e?n.states[e]:void 0;if(!t||t.state==="unavailable"||t.state==="unknown"&&!t.attributes.nf_symcon_weather)return null;let r=Qp[t.state]??(t.attributes.nf_symcon_weather?{}:void 0);if(!r)return null;let i=t.attributes,o={rain:r.rain??0,snow:r.snow??0,hail:r.hail??0,fog:r.fog??0,cloud:r.cloud??0,wind:r.wind??0,windFrom:Xp(i.wind_bearing),lightning:r.lightning??!1},s=Jt(i.cloud_coverage);s!==null&&(o.cloud=Math.max(ni(s/100),o.rain||o.snow?.6:0));let a=Jt(i.wind_speed);a!==null&&(o.wind=Math.max(o.wind,ni(ri(a,i.wind_speed_unit)/70)));let l=Jt(i.wind_gust_speed);l!==null&&(o.wind=Math.max(o.wind,ni(ri(l,i.wind_speed_unit)/100)));let c=Jt(i.precipitation);if(c!==null&&c>0&&(o.rain>0||o.snow>0)){let d=ni(.25+c/8);o.rain>0&&(o.rain=Math.max(o.rain*.6,d)),o.snow>0&&(o.snow=Math.max(o.snow*.6,d))}let u=Jt(i.temperature),h=i.temperature_unit??n.config?.unit_system?.temperature,m=u===null?null:h==="\xB0F"?(u-32)*5/9:u;return m!==null&&m<=.5&&o.rain>0&&o.snow===0&&(o.snow=o.rain*.6,o.rain*=.4),o}function Jc(n,e){let t=e==null||!Number.isFinite(e)?1:Math.min(1,Math.max(.1,e));return t===1?n:{...n,rain:n.rain*t,hail:n.hail*t,snow:n.snow*t}}function Qc(n,e){let t=new Set(e??["rain","snow","clouds","lightning","sky"]);return{...n,rain:t.has("rain")?n.rain:0,hail:t.has("rain")?n.hail:0,snow:t.has("snow")?n.snow:0,fog:t.has("fog")?n.fog:0,cloud:t.has("clouds")?n.cloud:0,lightning:t.has("lightning")&&n.lightning}}var ii=Math.PI/180,St=n=>Math.tan(Math.min(80,Math.max(0,n))*ii);function Xc(n){return{x0:Math.min(n.x0,n.x1),x1:Math.max(n.x0,n.x1),z0:Math.min(n.z0,n.z1),z1:Math.max(n.z0,n.z1)}}function ef(n){if(!n.rotation)return null;let e=n.rotation*ii;return{cx:(n.x0+n.x1)/2,cz:(n.z0+n.z1)/2,c:Math.cos(e),sn:Math.sin(e)}}function tf(n,e){let t=ef(n);if(!t)return e;let[r,i]=[e[0]-t.cx,e[1]-t.cz];return[t.cx+r*t.c-i*t.sn,t.cz+r*t.sn+i*t.c]}function ct(n){let{x0:e,x1:t,z0:r,z1:i}=Xc(n),o=s=>tf(n,s);return n.axis==="x"?{u0:e,u1:t,w:i-r,at:(s,a)=>o([s,n.flip?i-a:r+a])}:{u0:r,u1:i,w:t-e,at:(s,a)=>o([n.flip?t-a:e+a,s])}}var Pn=Math.tan(30*ii);function oi(n,e,t,r,i){let o=Math.min(n*.3,r>1e-6?2.4/r:n*.3),s=Math.min(n*.3,i>1e-6?2.4/i:n*.3),a=e+o*r,l=t+s*i,c=Math.min(n-s,Math.max(o,(l-a+Pn*(n-s+o))/(2*Pn))),u=a+(c-o)*Pn;return{vla:o,vlb:s,yla:a,ylb:l,vr:c,rh:u,y:m=>m<=o?e+m*r:m<=c?a+(m-o)*Pn:m<=n-s?l+(n-s-m)*Pn:t+(n-m)*i}}function Qt(n){let e=ct(n).w,[t,r]=[n.eave_a,n.eave_b],[i,o]=[St(n.pitch_a),St(n.pitch_b)];switch(n.shape){case"flat":case"parapet":return{vr:e/2,rh:t,y:()=>t};case"pent":return{vr:e,rh:t+e*i,y:s=>t+s*i};case"mansard":{let s=oi(e,t,r,i,o);return{vr:s.vr,rh:s.rh,y:s.y}}default:{let s=i+o>1e-6?Math.min(e,Math.max(0,(r-t+e*o)/(i+o))):e/2;return{vr:s,rh:t+s*i,y:a=>a<=s?t+a*i:r+(e-a)*o}}}}function Wo(n,e,t){let r=ct(e),i=n.floors.flatMap(h=>h.rooms.filter(m=>m.points.length>=3&&h.elevation+h.height>e.base+.05)),o=h=>h.some(m=>i.some(d=>H(m,d.points))),s=.35,a=[.15,.5,.85].map(h=>r.u0+(r.u1-r.u0)*h),l=[.15,.5,.85].map(h=>r.w*h),c=h=>h?0:t,u=(h,m)=>{let d=e.overhang_sides?.[h];return typeof d=="number"&&Number.isFinite(d)?Math.min(2,Math.max(0,d)):m};return{a:u("a",c(o(a.map(h=>r.at(h,-s))))),b:u("b",c(o(a.map(h=>r.at(h,r.w+s))))),u0:u("u0",c(o(l.map(h=>r.at(r.u0-s,h))))),u1:u("u1",c(o(l.map(h=>r.at(r.u1+s,h)))))}}var Ae=Math.PI/180,Je=(n,e)=>[n[0]-e[0],n[1]-e[1],n[2]-e[2]];var Xt=n=>Math.hypot(n[0],n[1],n[2]),$t=n=>{let e=Xt(n)||1;return[n[0]/e,n[1]/e,n[2]/e]},ru=(n,e)=>[n[1]*e[2]-n[2]*e[1],n[2]*e[0]-n[0]*e[2],n[0]*e[1]-n[1]*e[0]];var ou=.25;function su(n,e,t,r,i,o,s){let a=i-t>=o-r,l=a?i-t:o-r;return{key:`${n}:top`,section:e,side:"top",flat:!0,o:[t,s,r],eu:a?[1,0,0]:[0,0,1],es:a?[0,0,1]:[1,0,0],n:[0,1,0],lu:l,ls:a?o-r:i-t,pitch:0,span:()=>[0,l],facing:a?[0,1]:[1,0]}}function au(n,e){let t=$t(ru(n,e));return t[1]<0?[-t[0],-t[1],-t[2]]:t}var lu=n=>{let e=$t([-n[0],0,-n[2]]);return[e[0],e[2]]};function Qe(n,e,t,r,i,o,s,a){let l=$t(Je(i,r)),c=$t(Je(o,r));return{key:n,section:e,side:t,flat:!1,o:r,eu:l,es:c,n:au(l,c),lu:Xt(Je(i,r)),ls:Xt(Je(o,r)),pitch:s,span:a,facing:lu(c)}}function iu(n,e,t,r,i,o){let s=Xt(Je(i,r));if(s<.3)return null;let a=$t(Je(i,r)),l=Je(o,r),c=l[0]*a[0]+l[1]*a[1]+l[2]*a[2],u=[l[0]-a[0]*c,l[1]-a[1]*c,l[2]-a[2]*c],h=Xt(u);if(h<.3)return null;let m=$t(u),d=g=>{let _=Math.min(1,Math.max(0,g/h));return[c*_,s-(s-c)*_]};return{key:n,section:e,side:t,flat:!1,o:r,eu:a,es:m,n:au(a,m),lu:s,ls:h,pitch:Math.atan2(m[1],Math.hypot(m[0],m[2]))/Ae,span:d,facing:lu(m)}}function sf(n,e){let t=ct(n),r=Qt(n),i=($,S,A)=>{let[z,x]=t.at($,S);return[z,A,x]},[o,s]=[Math.max(0,e.a),Math.max(0,e.b)],a=t.u0-Math.max(0,e.u0),l=t.u1+Math.max(0,e.u1),c=l-a,u=r.y(-o),h=r.y(t.w+s);if(n.shape==="flat"||n.shape==="parapet"){let[$,S]=[t.at(a,-o),t.at(l,t.w+s)];return[su(n.id,n.id,Math.min($[0],S[0]),Math.min($[1],S[1]),Math.max($[0],S[0]),Math.max($[1],S[1]),n.eave_a+ou)]}if(n.shape==="pent")return[Qe(`${n.id}:a`,n.id,"a",i(a,-o,u),i(l,-o,u),i(a,t.w+s,h),n.pitch_a,()=>[0,c])];if(n.shape==="mansard")return af(n,t,a,l,o,s);let m=n.shape==="hip"||n.shape==="pyramid",d=(t.u1-t.u0)/2,g=n.shape==="pyramid"?d:m?Math.min(d,Math.min(r.vr,t.w-r.vr)||t.w/2):0,_=m?t.u0+g-a:0,b=m?l-(t.u1-g):0,y=[];if(r.vr>.3){let $=Math.hypot(r.vr+o,r.rh-u);y.push(Qe(`${n.id}:a`,n.id,"a",i(a,-o,u),i(l,-o,u),i(a,r.vr,r.rh),n.pitch_a,S=>[_*(S/$),c-b*(S/$)]))}if(t.w-r.vr>.3){let $=Math.hypot(t.w+s-r.vr,r.rh-h);y.push(Qe(`${n.id}:b`,n.id,"b",i(l,t.w+s,h),i(a,t.w+s,h),i(l,r.vr,r.rh),n.pitch_b,S=>[b*(S/$),c-_*(S/$)]))}if(m){let $=iu(`${n.id}:c`,n.id,"c",i(a,t.w+s,h),i(a,-o,u),i(t.u0+g,r.vr,r.rh)),S=iu(`${n.id}:d`,n.id,"d",i(l,-o,u),i(l,t.w+s,h),i(t.u1-g,r.vr,r.rh));y.push(...[$,S].filter(A=>A!==null))}return y}function af(n,e,t,r,i,o){let s=oi(e.w,n.eave_a,n.eave_b,St(n.pitch_a),St(n.pitch_b)),a=(g,_)=>{let[b,y]=e.at(g,_);return[b,s.y(_),y]},l=r-t,c=()=>[0,l],u=(g,_)=>Math.atan2(g,_)/Ae,h=[],[m,d]=[e.w+o,e.w-s.vlb];return s.vla+i>.3&&h.push(Qe(`${n.id}:a`,n.id,"a",a(t,-i),a(r,-i),a(t,s.vla),n.pitch_a,c)),s.vr-s.vla>.3&&h.push(Qe(`${n.id}:au`,n.id,"a",a(t,s.vla),a(r,s.vla),a(t,s.vr),u(s.rh-s.yla,s.vr-s.vla),c)),s.vlb+o>.3&&h.push(Qe(`${n.id}:b`,n.id,"b",a(r,m),a(t,m),a(r,d),n.pitch_b,c)),d-s.vr>.3&&h.push(Qe(`${n.id}:bu`,n.id,"b",a(r,d),a(t,d),a(r,s.vr),u(s.rh-s.ylb,d-s.vr),c)),h}function si(n){return n.floors.filter(t=>t.rooms.some(r=>r.points.length>=3)).sort((t,r)=>r.elevation-t.elevation)[0]??null}function ai(n){let e=n.settings.roof;if(!e||e.type==="none")return[];if(e.type==="custom")return(e.sections??[]).flatMap(S=>sf(S,Wo(n,S,S.overhang??e.overhang)));let t=si(n);if(!t)return[];let r=t.rooms.flatMap(S=>S.points.map(A=>A[0])),i=t.rooms.flatMap(S=>S.points.map(A=>A[1])),o=n.settings.wall_exterior+e.overhang,[s,a]=[Math.min(...r)-o,Math.max(...r)+o],[l,c]=[Math.min(...i)-o,Math.max(...i)+o],u=t.elevation+t.height;if(e.type==="flat")return[su("main",null,s,l,a,c,u+ou)];let h=a-s>=c-l,m=e.ridge==="short"?!h:h,d=(m?c-l:a-s)/2,g=d*Math.tan(e.pitch*Ae),_=(S,A,z)=>m?[S,u+z,(l+c)/2+A]:[(s+a)/2+A,u+z,S],[b,y]=m?[s,a]:[l,c],$=()=>[0,y-b];return[Qe("main:a",null,"a",_(b,-d,0),_(y,-d,0),_(b,0,g),e.pitch,$),Qe("main:b",null,"b",_(b,d,0),_(y,d,0),_(b,0,g),e.pitch,$)]}function In(n,e){let t=[];for(let r of n.floors.filter(i=>!e||i.id===e)){let{walls:i}=Wt(r.rooms,{exterior:n.settings.wall_exterior,interior:n.settings.wall_interior},r.walls??[]);for(let o of i){if(!o.exterior&&!o.free)continue;let[s,a]=[o.b[0]-o.a[0],o.b[1]-o.a[1]],l=Math.hypot(s,a);if(l<1.2)continue;let[c,u]=[a/l,-s/l],h=Math.min(r.height,o.height??r.height,o.heightEnd??1/0),m=(d,g,_,b)=>t.push({key:d,section:null,side:"top",flat:!1,o:g,eu:_,es:[0,1,0],n:b,lu:l,ls:h,pitch:90,span:()=>[0,l],facing:[b[0],b[2]],wall:{floorId:r.id}});m(`wall:${r.id}:${o.id}`,[o.a[0]+c*o.right,r.elevation,o.a[1]+u*o.right],[s/l,0,a/l],[c,0,u]),o.free&&m(`wall:${r.id}:${o.id}:back`,[o.b[0]-c*o.left,r.elevation,o.b[1]-u*o.left],[-s/l,0,-a/l],[-c,0,-u])}}return t}var en="ground";function Cn(n){let e=n.floors.filter(t=>t.rooms.some(r=>r.points.length>=3)).sort((t,r)=>t.elevation-r.elevation);return e.find(t=>t.elevation>-.5)??e[0]??n.floors[0]??null}function Bo(n,e){let t=(e.rotation??0)*Ae,r=[Math.cos(t),0,Math.sin(t)],i=[-Math.sin(t),0,Math.cos(t)],o=Cn(n),s=r[0]*e.u+i[0]*e.v,a=r[2]*e.u+i[2]*e.v,l=o?o.elevation+(e.base!=null?e.base:pn(o,s,a)):e.base??0;return{key:en,section:null,side:"top",flat:!0,o:[0,l,0],eu:r,es:i,n:[0,1,0],lu:1e4,ls:1e4,pitch:0,span:()=>[-1e4,1e4],facing:[i[0],i[2]],unbounded:!0}}function Vo(n,e,t=ai(n)){return e.face===en?Bo(n,e):e.face.startsWith("wall:")?In(n,e.face.split(":")[1]).find(r=>r.key===e.face)??null:t.find(r=>r.key===e.face)??null}var Ko=1.13,Go=1.72,tn=.025,Ee=.07;function Nn(n){let e=n.module_w||Ko,t=n.module_h||Go;return n.portrait===!1?[t,e]:[e,t]}function Uo(n){return n.layout?.length?n.layout.map(e=>Math.max(0,Math.min(60,Math.round(e)))):Array.from({length:Math.max(1,n.rows)},()=>Math.max(1,n.cols))}function jo(n,e){return n.flat?Math.min(45,Math.max(0,e.tilt??15))*Ae:n.wall?Math.min(90,Math.max(0,e.tilt??0))*Ae:Math.min(45,Math.max(0,e.tilt??0))*Ae}function li(n,e){let[,t]=Nn(e),r=jo(n,e);return n.wall?t*Math.cos(r)+tn:!n.flat&&r<.001?t+tn:n.flat&&e.rack==="ew"?t*Math.cos(r)+.08:t*Math.cos(r)+Math.max(.3,2*t*Math.sin(r))}function qo(n,e){let[t,r]=Nn(e),i=Uo(e),o=Math.max(1,...i);return[o*t+(o-1)*tn,(i.length-1)*li(n,e)+r*Math.cos(jo(n,e))]}var lf=n=>n.flat&&!n.unbounded&&!n.wall;function cf(n,e){if(!lf(n)||!e.rotation)return null;let t=e.rotation*Ae,[r,i]=qo(n,e);return{cos:Math.cos(t),sin:Math.sin(t),u:e.u+r/2,s:e.v+i/2}}function Ln(n,e,t=!1){let[r,i]=Nn(e),o=jo(n,e),s=i*Math.cos(o),a=li(n,e),l=Uo(e),c=Math.max(1,...l),u=new Set(e.skip??[]),h=cf(n,e),m=(b,y)=>h?[h.u+(b-h.u)*h.cos-(y-h.s)*h.sin,h.s+(b-h.u)*h.sin+(y-h.s)*h.cos]:[b,y],d=(b,y,$)=>{let[S,A]=m(b,y);return[0,1,2].map(z=>n.o[z]+n.eu[z]*S+n.es[z]*A+n.n[z]*$)},g=(b,y)=>{let[$,S]=m(b,y);if(n.unbounded)return!0;if(S<-1e-6||S>n.ls+1e-6)return!1;let[A,z]=n.span(S);return $>=A-1e-6&&$<=z+1e-6},_=[];return l.forEach((b,y)=>{let $=e.align==="right"?c-b:e.align==="center"?(c-b)/2:0;for(let S=0;S.001?s:i);if([[x,T],[D,T],[D,R],[x,R]].every(([E,I])=>g(E,I)))if(n.wall&&o>.001){let E=Ee+i*Math.sin(o),[I,N]=e.flip?[E,Ee]:[Ee,E],G=[d(x,T,I),d(D,T,I),d(D,R,N),d(x,R,N)],q=e.flip?T:R;_.push({corners:G,posts:[x+.05,D-.05].map(J=>[d(J,q,0),d(J,q,E)]),cell:A,skipped:z})}else if(!n.flat&&o>.001){let E=Ee+i*Math.sin(o),I=[d(x,T,Ee),d(D,T,Ee),d(D,R,E),d(x,R,E)];_.push({corners:I,posts:[x+.05,D-.05].map(N=>[d(N,R,0),d(N,R,E)]),cell:A,skipped:z})}else if(!n.flat)_.push({corners:[d(x,T,Ee),d(D,T,Ee),d(D,R,Ee),d(x,R,Ee)],posts:[],cell:A,skipped:z});else{let I=.15+i*Math.sin(o),N=e.rack==="ew"&&y%2===1?!e.flip:!!e.flip,[G,q]=N?[R,T]:[T,R],J=[d(x,G,.15),d(D,G,.15),d(D,q,I),d(x,q,I)],oe=[x+.05,D-.05].flatMap(v=>[[d(v,G,0),d(v,G,.15)],[d(v,q,0),d(v,q,I)]]);_.push({corners:J,posts:oe,cell:A,skipped:z})}}}),_}var Re={solar:[255,196,46],battery:[74,222,128],import:[248,96,120],export:[56,220,245],house:[150,170,255],wallbox:[80,175,255]},Xe=15;function et(n,e){let t=[];for(let r of n.floors)for(let i of r.furniture)i.type===e&&t.push({id:i.id,floorId:r.id,x:i.x,z:i.z,y:Math.max(.4,Math.min(1.4,i.h*.8))});return t}function gf(n){if(!n?.rooms.length)return null;let e=0,t=0,r=0;for(let i of n.rooms)for(let[o,s]of i.points)e+=o,t+=s,r++;return r?{floorId:n.id,x:e/r,z:t/r,y:1}:null}function On(n){let e=$n(n);return et(n,"meter").find(t=>!e.has(t.id))??et(n,"inverter")[0]??gf(Cn(n))}function _f(n,e){let t=et(n,"grid_point")[0];if(t)return t;let r=n.floors.find(a=>a.id===e.floorId);if(!r?.rooms.length)return null;let i=1/0,o=-1/0,s=-1/0;for(let a of r.rooms)for(let[l,c]of a.points)i=Math.min(i,l),o=Math.max(o,l),s=Math.max(s,c);return{floorId:e.floorId,x:Math.max(i,Math.min(o,e.x)),z:s+3,y:.2}}var Zo=n=>Math.max(1,n.rows*n.cols-(n.skip?.length??0));function bf(n,e,t){let r=e.settings.roof.solar??[],i=new Map,o=0,s=[];for(let c of r){let u=c.entity&&c.entity!=="none"?Z(n.states[c.entity]):null;u!==null?(i.set(c.id,Math.max(0,u)),o+=Math.max(0,u)):s.push(c)}let a=Math.max(0,(t??0)-o),l=s.reduce((c,u)=>c+Zo(u),0);for(let c of s)i.set(c.id,l?a*Zo(c)/l:0);return i}function yf(n,e){if(e.face===en)return Cn(n)?.id??null;let t=/^wall:([^:]+):/.exec(e.face);return t?t[1]:si(n)?.id??null}function cu(n,e,t=Mn(n,e),r){let i=r?Ye(e,r):Ye(e),o=An(n,e,t,i),s=[],a=[],l=On(e),c=o.consumption??0,u=o.grid===null||c<=0?null:Math.max(0,Math.min(1,1-Math.max(0,o.grid)/c));if(!l)return{arcs:s,sparks:a,summary:o,autarky:u};let h=new Map(e.floors.flatMap(E=>E.furniture).flatMap(E=>Pr(e,E)?[[E.id,Pr(e,E)]]:[])),m=et(e,"inverter").find(E=>!h.has(E.id))??l,d=new Map(et(e,"inverter").map(E=>[E.id,E])),g=new Map((e.settings.roof.strings??[]).map(E=>[E.id,E.inverter??null])),_=[...ai(e),...In(e)],b=bf(n,e,o.solar);for(let E of e.settings.roof.solar??[]){let I=Vo(e,E,_);if(!I)continue;let N=Ln(I,E);if(!N.length)continue;let G=b.get(E.id)??0,q=Zo(E)*(E.wp??400),J=G>Xe?Math.pow(Math.min(1,G/q),.6):0,oe=yf(e,E);if(a.push({floorId:oe,quads:N.map(dt=>dt.corners),level:J}),G<=Xe)continue;let v=0,k=0,K=0;for(let dt of N)for(let At of dt.corners)v+=At[0],k+=At[1],K+=At[2];let F=N.length*4,V=e.floors.find(dt=>dt.id===oe)?.elevation??0,be=e.energy.advanced?d.get(g.get(E.string??"")??""):void 0;s.push({key:`solar:${E.id}`,from:{floorId:oe,x:v/F,y:k/F-V+.1,z:K/F},to:be??m,power:G,color:Re.solar})}let y=et(e,"home_battery").find(E=>!h.has(E.id)),$=o.battery===null?null:o.battery-(o.subMeters??[]).reduce((E,I)=>E+I.battery,0);if(y&&$!==null&&Math.abs($)>Xe){let E=$>0;s.push({key:"battery",from:E?y:l,to:E?l:y,power:Math.abs($),color:Re.battery})}let S=(o.solar??0)-(o.subMeters??[]).reduce((E,I)=>E+I.solar,0);m!==l&&S>Xe&&s.push({key:"inverter",from:m,to:l,power:S,color:Re.solar});let A=_f(e,l);if(A&&o.grid!==null&&Math.abs(o.grid)>Xe){let E=o.grid>0;s.push({key:"grid",from:E?A:l,to:E?l:A,power:Math.abs(o.grid),color:E?Re.import:Re.export})}let z=new Map(et(e,"meter").map(E=>[E.id,E])),x=r??(E=>E.power&&E.power!=="none"?E.power:null);for(let E of e.floors)for(let I of E.furniture){let N=z.get(h.get(I.id)??""),G=et(e,I.type).find(J=>J.id===I.id);if(!N||!G)continue;let q=x(I);if(I.type==="inverter"){let J=Math.max(0,(q?Z(n.states[q]):null)??0);J>Xe&&s.push({key:`inverter:${I.id}`,from:G,to:N,power:J,color:Re.solar})}else if(I.type==="home_battery"){let J=I.charge&&I.charge!=="none"?I.charge:null,oe=Ir(n,{power:q,charge:J},e.energy.battery_invert)??0;Math.abs(oe)>Xe&&s.push({key:`battery:${I.id}`,from:oe>0?G:N,to:oe>0?N:G,power:Math.abs(oe),color:Re.battery})}}let D=new Map,T=new Set;for(let E of i.subMeters??[]){let I=z.get(E.id),N=z.get(E.parent);E.power&&T.add(E.power);for(let q of E.floors)I&&!D.has(q)&&D.set(q,I);let G=o.subMeters?.find(q=>q.id===E.id)?.power??null;!I||!N||G===null||Math.abs(G)<=Xe||s.push({key:`meter:${E.id}`,from:G>0?N:I,to:G>0?I:N,power:Math.abs(G),color:G>0?Re.house:Re.solar})}let R=new Set(et(e,"wallbox").map(E=>`${E.floorId}:${E.x.toFixed(1)}:${E.z.toFixed(1)}`));for(let E of t){if(E.power<=Xe||T.has(E.powerEntity))continue;let I=E.wallbox||R.has(`${E.floorId}:${E.x.toFixed(1)}:${E.z.toFixed(1)}`);s.push({key:`use:${E.id}`,from:D.get(E.floorId)??l,to:{floorId:E.floorId,x:E.x,z:E.z,y:.9},power:E.power,color:I?Re.wallbox:Re.house})}return{arcs:s.map(E=>xf(e,E)),sparks:a,summary:o,autarky:u}}var vf=.25;var wf=(n,e)=>n.energy.routes?.find(t=>t.key===e&&t.points.length>0);function xf(n,e){let t=wf(n,e.key);if(!t)return e;let r=t.points.map(l=>({floorId:l.floor_id,x:l.x,z:l.z,y:vf})),i=l=>n.floors.find(c=>c.id===l)?.elevation??0,o=(l,c)=>Math.hypot(l.x-c.x,l.z-c.z)+Math.abs(i(l.floorId)+l.y-i(c.floorId)-c.y),[s,a]=[r[0],r[r.length-1]];return o(e.from,a)+o(e.to,s){let z=s.climate?.[S];return z==="none"?!1:(z?[z].flat().some(x=>!!x&&x!=="none"):!1)||ye(n,o,s,S).length>0||A!==null},m=h("temperature",a),d=h("humidity",l),g=h("co2",c),_=h("illuminance",u);if(!m&&!d&&!g&&!_)continue;let b=Fe(s.points),[y,$]=H(b,s.points)?b:fa(s,9,9).sort((S,A)=>Math.hypot(S[0]-b[0],S[1]-b[1])-Math.hypot(A[0]-b[0],A[1]-b[1]))[0]??s.points[0];i.push({kind:"roomclimate",roomId:s.id,name:s.name,at:{floorId:o.id,x:y,z:$,y:(s.ceiling??o.height)+.4},temperature:a,humidity:l,co2:c,illuminance:u,showTemperature:m,showHumidity:d,showCo2:g,showIlluminance:_,sources:Object.fromEntries(["temperature","humidity","co2","illuminance"].map(S=>[S,ye(n,o,s,S)]))})}return i}function du(n,e,t,r,i){let o=[];for(let s of e.floors){if(r&&s.id!==r)continue;let a=i?s.rooms.find(l=>l.id===i):null;if(!(i&&!a))for(let l of s.furniture){if(!l.power_card||!je(n,l)||a&&!H([l.x,l.z],a.points))continue;let c=l.power==="none"?null:l.power||t.get(l.id)?.power,u=c&&c!=="none"?c:null,h=Zr(n,l);if(!u&&!h.length)continue;let m=u?String(n.states[u]?.attributes.symcon_source_entity||u):null,d=l.pin_offset;o.push({kind:"power",id:l.id,name:l.name||le(n,l.type),powerEntity:m,power:m?Z(n.states[m]):null,readings:h,at:{floorId:s.id,x:l.x+(d?.x??0),z:l.z+(d?.z??0),y:se(s,l)+l.h+.35+(d?.y??0)}})}}return o}var hu;function Yo(){let n=new URL("./nextfloor-hydronics.js?v=706fb6f5bc8b",import.meta.url).href;return hu??=import(n).catch(e=>{throw hu=void 0,e})}var kf=n=>`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`,mu=n=>typeof n=="string"?{dateTime:n}:n??{},pu=n=>{let e=new Date(n);return e.setHours(0,0,0,0),e.getTime()},fu=(n,e)=>Math.max(0,Math.round((pu(n)-pu(e))/864e5));function Sf(n,e,t){return n.map(r=>{let i=mu(r.start),o=mu(r.end),s=(r.summary??"").trim();if(!s)return null;if(i.dateTime){let c=new Date(i.dateTime),u=o.dateTime?new Date(o.dateTime).getTime():c.getTime();return{time:kf(c),title:s,source:e,at:c.getHours()*60+c.getMinutes(),kind:"event",past:u!!r)}function gu(n,e,t,r){let i=[],o=new Set;for(let s of e.floors)for(let a of s.furniture){let l=a.care_entity;if(!l||o.has(l)||ar(a.type)!=="bin")continue;o.add(l);let c=Sr(n.states[l],t);if(c===null||c>1)continue;let u=a.name||String(n.states[l]?.attributes.friendly_name??l);i.push({time:"",title:u,source:c===0?r.today:r.tomorrow,at:-1,kind:"bin"})}return i}function _u(n){return[...n].sort((e,t)=>(e.day??0)-(t.day??0)||e.at-t.at||e.title.localeCompare(t.title))}async function bu(n,e,t=1,r=Date.now()){if(!n.fetchWithAuth||!e.length)return[];let i=new Date(r);i.setHours(0,0,0,0);let o=new Date(i);return o.setDate(o.getDate()+Math.max(1,t)),(await Promise.all(e.map(async a=>{try{let l=await n.fetchWithAuth(`/api/calendars/${encodeURIComponent(a)}?start=${encodeURIComponent(i.toISOString())}&end=${encodeURIComponent(o.toISOString())}`);if(!l.ok)return[];let c=String(n.states[a]?.attributes.friendly_name??a.split(".")[1]);return Sf(await l.json(),c,r)}catch{return[]}}))).flat()}var $f={"clear-night":"\u{1F319}",cloudy:"\u2601\uFE0F",exceptional:"\u26A0\uFE0F",fog:"\u{1F32B}\uFE0F",hail:"\u{1F9CA}",lightning:"\u{1F329}\uFE0F","lightning-rainy":"\u26C8\uFE0F",partlycloudy:"\u26C5",pouring:"\u{1F327}\uFE0F",rainy:"\u{1F326}\uFE0F",snowy:"\u2744\uFE0F","snowy-rainy":"\u{1F328}\uFE0F",sunny:"\u2600\uFE0F",windy:"\u{1F4A8}","windy-variant":"\u{1F4A8}"},Mf=n=>$f[n??""]??"\u2601\uFE0F",ci=n=>{let e=typeof n=="string"?Number.parseFloat(n):typeof n=="number"?n:Number.NaN;return Number.isFinite(e)?e:null},yu=n=>{let e=new Date(n);return e.setHours(0,0,0,0),e.getTime()};function vu(n,e,t=Date.now()){let r=yu(t),i=[];for(let o of Array.isArray(n)?n:[]){let s=o.datetime?Date.parse(o.datetime):Number.NaN;if(!Number.isFinite(s))continue;let a=yu(s);if(!(al.day===a))&&(i.push({day:a,icon:Mf(o.condition),high:ci(o.temperature),low:ci(o.templow),rain:ci(o.precipitation),chance:ci(o.precipitation_probability)}),i.length>=e))break}return i}async function wu(n,e){try{return(await n.callWS({type:"call_service",domain:"weather",service:"get_forecasts",service_data:{type:"daily"},target:{entity_id:e},return_response:!0}))?.response?.[e]?.forecast??[]}catch{return[]}}var Wn=n=>{let e=Number(n?.state);return n&&Number.isFinite(e)?e:null},fe=(n,...e)=>e.some(t=>n.includes(t));function Af(n,e){let t=n.entities?.[e]?.device_id;return t?Object.values(n.entities??{}).filter(r=>r.device_id===t&&!r.hidden).map(r=>r.entity_id).filter(r=>n.states[r]):n.states[e]?[e]:[]}function Ef(n){if(!n)return null;let e=String(n.state),t=/^(\d+):(\d{2})(?::(\d{2}))?$/.exec(e);if(t)return Number(t[1])*60+Number(t[2]);let r=Number(e);if(!Number.isFinite(r))return null;let i=String(n.attributes.unit_of_measurement??"min").toLowerCase();return i==="h"?r*60:i==="s"?r/60:i==="d"?r*1440:r}var Rf=/print|running|busy|druck/,zf=["print_status","current_stage","print_state","printer_state","current_state","status","state"];function Jo(n,e){if(!e||!n.states[e])return null;let t=Af(n,e),r=t.filter(R=>R.startsWith("sensor.")),i=R=>R?n.states[R]:void 0,o=R=>r.find(E=>R(E,n.states[E])),s=R=>String(R.attributes.unit_of_measurement??""),a=R=>String(R.attributes.device_class??""),l=o((R,E)=>s(E)==="%"&&fe(R,"progress","fortschritt","completion"));if(!l)return null;let c=zf.map(R=>o((E,I)=>E.endsWith(R)&&!Number.isFinite(Number(I.state)))).find(Boolean),u=o(R=>fe(R,"remaining","time_left","restzeit","print_time_left")),h=o((R,E)=>a(E)==="timestamp"&&fe(R,"end","finish","estimated","ende")),m=o(R=>fe(R,"current_layer","layer")&&!fe(R,"total")),d=o(R=>fe(R,"total_layer","layer_count","total_layers")),g=o((R,E)=>a(E)==="temperature"&&fe(R,"nozzle","hotend","extruder","tool0","d\xFCse")&&!fe(R,"target")),_=o((R,E)=>a(E)==="temperature"&&fe(R,"bed","heater_bed","druckbett")&&!fe(R,"target")),b=o(R=>fe(R,"file","job","task_name","gcode","print_name","subtask")),y=t.find(R=>R.startsWith("image.")&&fe(R,"cover","model","thumbnail","preview"))??t.find(R=>R.startsWith("camera.")&&fe(R,"thumbnail","preview")),$=String(i(c)?.state??"").toLowerCase(),S=Wn(i(l)),A=$?Rf.test($)&&!/finish|complete|idle|fertig/.test($):(S??0)>0&&(S??0)<100,z=i(h)?Date.parse(String(i(h).state)):NaN,x=Ef(i(u)),D=t.map(R=>n.states[R]).filter(R=>typeof R?.attributes.color=="string"&&/^#[0-9a-f]{6}/i.test(String(R.attributes.color))&&fe(R.entity_id,"tray","ams","filament","spool","external"));D.sort((R,E)=>+!!E.attributes.active-+!!R.attributes.active);let T=i(y)?.attributes.entity_picture;return{status:$||(A?"printing":"idle"),printing:A,progress:S,remaining:x,endsAt:Number.isFinite(z)?z:x!==null&&A?Date.now()+x*6e4:null,layer:Wn(i(m)),layers:Wn(i(d)),nozzle:Wn(i(g)),bed:Wn(i(_)),job:i(b)?.state&&!["unknown","unavailable",""].includes(String(i(b).state))?String(i(b).state):null,picture:typeof T=="string"?T:null,filaments:[...new Set(D.map(R=>String(R.attributes.color).slice(0,7).toLowerCase()))].slice(0,8)}}var Qo=n=>/printer_(3d|cube|multi|large|open|resin|enclosed)$/.test(n);var Bn=n=>{let e=Number(n?.state);return n&&Number.isFinite(e)?e:null},tt=(n,...e)=>e.some(t=>n.includes(t));function xu(n){let e=Bn(n);return e===null?null:String(n.attributes.unit_of_measurement??"W").toLowerCase()==="kw"?e*1e3:e}function Tf(n,e){let t=n.entities?.[e]?.device_id;return t?Object.values(n.entities??{}).filter(r=>r.device_id===t&&!r.hidden).map(r=>r.entity_id).filter(r=>n.states[r]):n.states[e]?[e]:[]}function ku(n,e){if(!e||!n.states[e])return null;let t=Tf(n,e),r=t.filter(A=>A.startsWith("sensor.")),i=A=>r.find(z=>A(z,n.states[z])),o=A=>A.attributes.device_class==="temperature",s=A=>A.attributes.device_class==="power",a=i((A,z)=>o(z)&&tt(A,"flow","vorlauf","supply","leaving","outlet")&&!tt(A,"target","soll","rate")),l=i((A,z)=>o(z)&&tt(A,"return","rucklauf","r\xFCcklauf","ruecklauf","inlet","entering")&&!tt(A,"target","soll")),c=i((A,z)=>o(z)&&tt(A,"outdoor","outside","aussen","au\xDFen","ambient")),u=i((A,z)=>s(z)&&tt(A,"heat","warme","w\xE4rme","thermal","output","heizleistung")),h=i((A,z)=>s(z)&&A!==u&&!tt(A,"heat_output","thermal")),m=i(A=>tt(A,"cop","leistungszahl"));if(!a&&!l&&!u&&!m)return null;let d=t.map(A=>n.states[A]).find(A=>A.entity_id.startsWith("climate.")),g=i((A,z)=>!Number.isFinite(Number(z.state))&&tt(A,"status","mode","betrieb","operation","state")),_=`${String(d?.attributes.hvac_action??"")} ${String(g?n.states[g].state:"")}`.toLowerCase(),b=xu(n.states[u??""]),y=/defrost|abtau/.test(_)?"defrost":/water|dhw|warmwasser|tank/.test(_)?"water":/cool|kühl/.test(_)?"cooling":/heat|heiz/.test(_)||(b??0)>100?"heating":"idle",$=xu(n.states[h??""]),S=Bn(n.states[m??""])??(b!==null&&$&&$>50?Math.round(b/$*10)/10:null);return{mode:y,flow:Bn(n.states[a??""]),return:Bn(n.states[l??""]),outside:Bn(n.states[c??""]),power:$,heat:b,cop:S}}var Su=n=>/:heat_pump(_|$)/.test(n);var Xo=n=>/access_point|router|mesh|wifi|repeater/.test(n),$u=(n,...e)=>e.some(t=>n.includes(t));function Ff(n,e){let t=n.entities?.[e]?.device_id;return t?Object.values(n.entities??{}).filter(r=>r.device_id===t&&!r.hidden).map(r=>r.entity_id).filter(r=>n.states[r]):n.states[e]?[e]:[]}function es(n,e){if(!e||!n.states[e])return null;let t=Ff(n,e),r=t.find(a=>a.startsWith("sensor.")&&$u(a,"clients","stations","connected_devices","users","ger\xE4te","wlan_clients")&&Number.isFinite(Number(n.states[a].state))),i=t.map(a=>n.states[a]).find(a=>a.entity_id.startsWith("binary_sensor.")&&(a.attributes.device_class==="connectivity"||$u(a.entity_id,"online","connected","status"))),o=n.states[e],s=["unavailable","off","disconnected","offline"].includes(String(i?.state??o.state).toLowerCase())&&(!!i||o.entity_id.startsWith("binary_sensor."));return{clients:r?Number(n.states[r].state):null,online:!s&&o.state!=="unavailable"}}function Mu(n){return n.online?(n.clients??0)>=30?[1,.72,.25]:[.3,.7,1]:[1,.3,.3]}function Au(n){let e=0,t=[];for(let r of n){if(!r)continue;let i=r.entity_id.startsWith("binary_sensor.")&&r.attributes.device_class==="connectivity",o=r.entity_id.startsWith("device_tracker.")&&r.attributes.source_type==="router";!i&&!o||(r.state==="on"||r.state==="home"?e++:t.push(String(r.attributes.friendly_name??r.entity_id)))}return{online:e,offline:t}}var he=n=>n&&n!=="none"?n:null,ui=n=>{let e=Number(n?.state);return n&&Number.isFinite(e)?e:null},Eu=(n,e)=>n?.attributes?.[e],xe=(n,...e)=>e.some(t=>n.includes(t));function Df(n,e){if(!e)return[];let t=n.entities?.[e]?.device_id;return t?Object.values(n.entities??{}).filter(r=>r.device_id===t&&!r.hidden).map(r=>r.entity_id).filter(r=>n.states[r]):[e]}function ze(n,e,t,r){return e&&n.states[e]?e:t.find(i=>r(i,n.states[i]))??null}function Hf(n,e,t,r){let i=Math.PI/180,o=Math.sin((t-n)*i/2)**2+Math.cos(n*i)*Math.cos(t*i)*Math.sin((r-e)*i/2)**2;return 12742*Math.asin(Math.min(1,Math.sqrt(o)))}function Pf(n){if(!n||["unknown","unavailable","","none","off"].includes(String(n.state).toLowerCase()))return null;let e=String(n.state),t=/^(\d{1,2}):(\d{2})/.exec(e);if(t)return`${t[1].padStart(2,"0")}:${t[2]}`;let r=Date.parse(e);if(Number.isFinite(r)&&/\d{4}-\d{2}-\d{2}/.test(e)){let i=new Date(r);return`${String(i.getHours()).padStart(2,"0")}:${String(i.getMinutes()).padStart(2,"0")}`}return t=/^(\d{1,4})$/.exec(e),t&&Number(t[1])<1440?`${String(Math.floor(Number(t[1])/60)).padStart(2,"0")}:${String(Number(t[1])%60).padStart(2,"0")}`:null}function Ru(n,e){let t=e.car??{},r=he(t.device)??he(t.tracker)??he(e.entity),i=Df(n,r);if(!i.length&&!he(t.soc))return null;let o=F=>F.split(".")[0],s=F=>String(Eu(F,"device_class")??""),a=F=>String(Eu(F,"unit_of_measurement")??""),l=ze(n,he(t.soc),i,(F,V)=>o(F)==="sensor"&&a(V)==="%"&&(s(V)==="battery"||xe(F,"battery_level","soc","state_of_charge","ladezustand"))&&!xe(F,"usable")),c=ze(n,he(t.range),i,(F,V)=>o(F)==="sensor"&&(s(V)==="distance"||xe(F,"range","reichweite"))&&!xe(F,"odometer","ideal","elevation","kilometerstand")),u=ze(n,null,i,(F,V)=>o(F)==="sensor"&&s(V)==="power"&&xe(F,"charg","lade")),h=he(t.charging),m=ze(n,h&&o(h)==="binary_sensor"?h:null,i,(F,V)=>o(F)==="binary_sensor"&&(s(V)==="battery_charging"||xe(F,"charging","charger","laden"))),d=ze(n,he(t.plugged),i,(F,V)=>o(F)==="binary_sensor"&&(s(V)==="plug"||xe(F,"plug","cable","kabel"))),g=ze(n,he(t.lock),i,F=>o(F)==="lock"),_=ze(n,he(t.climate),i,F=>o(F)==="climate"),b=ze(n,h&&/^(switch|input_boolean)\./.test(h)?h:null,i,F=>o(F)==="switch"&&xe(F,"charg","laden")&&!xe(F,"port","klappe")),y=ze(n,he(t.tracker),i,F=>o(F)==="device_tracker")??(he(e.entity)?.startsWith("device_tracker.")?he(e.entity):null),$=ze(n,null,i,(F,V)=>o(F)==="sensor"&&s(V)==="temperature"&&xe(F,"inside","innen","interior","cabin")),S=ze(n,he(t.departure),i,F=>/^(sensor|input_datetime|time|datetime)$/.test(o(F))&&xe(F,"departure","abfahrt","depart")),A=i.filter(F=>{let V=n.states[F];return o(F)==="binary_sensor"&&V?.state==="on"&&(["door","opening","window","garage_door"].includes(s(V))||xe(F,"trunk","frunk","kofferraum","tailgate","hatch","klappe","charge_port","ladeklappe"))}),z=F=>F?n.states[F]:void 0,x=ui(z(l)),D=z(c),T=null,R=z(u)??(h&&o(h)==="sensor"?z(h):void 0);if(R){let F=ui(R);F!==null&&(T=Math.max(0,a(R).toLowerCase()==="kw"?F*1e3:F))}let I=(z(m)?.state??z(b)?.state)==="on"||T!==null&&T>50,N=z(d)?.state,G=z(g)?.state,q=z(_),J=z(y),oe=z(he(e.entity)),v=oe?["on","home","true","present","occupied","detected","parked"].includes(oe.state.toLowerCase()):J?.state==="home",k=J&&J.state!=="home"&&J.state!=="not_home"?J.state:null,K=k?String(z(`zone.${k}`)?.attributes.friendly_name??k):null;return{home:v,soc:x,range:ui(D),rangeUnit:D&&a(D)||"km",chargingW:T,charging:I,plugged:N===void 0?null:N==="on",locked:G===void 0?null:G==="locked",climateOn:q?q.state!=="off"&&q.state!=="unavailable":null,inside:ui(z($)),where:v?null:K,distance:v?null:If(n,J),open:A.map(F=>Cf(n,F,i)),departure:Pf(z(S)),entities:{lock:g,climate:_,charge:b,tracker:y}}}function If(n,e){let t=n.states["zone.home"]?.attributes,r=Number(e?.attributes?.latitude),i=Number(e?.attributes?.longitude),o=Number(t?.latitude??n.config?.latitude),s=Number(t?.longitude??n.config?.longitude);return[r,i,o,s].every(Number.isFinite)?Math.round(Hf(r,i,o,s)*10)/10:null}function Cf(n,e,t){let r=String(n.states[e]?.attributes.friendly_name??e.split(".")[1]),i=t.map(s=>String(n.states[s]?.attributes.friendly_name??"")).reduce((s,a)=>{let l=0;for(;l=2?o:r}function zu(n){return n===null?"#8aa0c8":n<20?"#f87171":n<50?"#facc15":"#4ade80"}function Te(n,e){let t=Math.abs(e);return t>=1e3?`${L(n,t/1e3,t>=1e4?1:2)} kW`:`${Math.round(t)} W`}function Vn(n,e){let r=2*Math.PI*22;return p``}function Nf(n,e,t,r){let i=e.summary,o=c=>M(n,c),s=e.autarky,a=r?p``:f;if(r?.folded){let c=i.solar!==null?`\u2600 ${Te(n,i.solar)}`:i.consumption!==null?`\u2302 ${Te(n,i.consumption)}`:null;return p`
${s!==null?p`
${Vn(s,s>.95?"#4ade80":s>.6?"#facc15":"#f87171")}
${Math.round(s*100)}%
`:f} ${c?p`${c}`:s===null?p`⌂`:f} ${a}
`}let l=[];if(i.solar!==null&&l.push(p`
☀ ${o("energy_solar")}${Te(n,i.solar)}
`),i.consumption!==null&&l.push(p`
⌂ ${o("energy_consumption")}${Te(n,i.consumption)}
`),i.rest!==void 0&&i.rest!==null&&l.push(p`
⌂ ${o("energy_rest")}${Te(n,i.rest)}
`),i.battery!==null||i.soc!==null){let c=i.battery===null||Math.abs(i.battery)<15?"":i.battery>0?" \u2193":" \u2191";l.push(p`
▮ ${o("energy_battery")}${c}${i.soc!==null?`${Math.round(i.soc)} %`:""}${i.battery!==null&&Math.abs(i.battery)>=15?` \xB7 ${Te(n,i.battery)}`:""}
`)}if(i.grid!==null){let c=i.grid<-15;l.push(p`
⇄ ${o(c?"energy_grid_export":"energy_grid_import")}${Te(n,i.grid)}
`)}for(let c of e.meters??[])l.push(p`
${c.icon} ${c.label}${c.value}
`);return p`
${a} ${s!==null?p`
${Vn(s,s>.95?"#4ade80":s>.6?"#facc15":"#f87171")}
${Math.round(s*100)} %${o("live_autarky")}
`:f}
${l}
${Of(n,e.curves)} ${Lf(n,e.week)}
`}function Lf(n,e){if(!e)return f;let t=[...e.solar,...e.use].filter(c=>c!==null&&c>0);if(!t.length)return f;let r=Math.max(...t)*1.1||1,[i,o]=[150,30],s=i/7,a=(c,u,h)=>c===null||c<=0?f:re``,l=c=>c.reduce((u,h)=>u+(h??0),0);return p`
7 ${M(n,"live_days")}
`}function Of(n,e){if(!e)return f;let t=[...e.solar,...e.use].filter(l=>l!==null);if(t.length<4)return f;let r=Math.max(...t)*1.08||1,[i,o]=[150,34],s=Dn(e.solar,i,o,r),a=Dn(e.use,i,o,r);return p`
24 h
`}function Wf(n,e,t,r){let i=e.car,o=(u,h)=>M(n,u,h),s=zu(i.soc),a=i.home?i.charging?`\u26A1 ${o("live_car_charging")}${i.chargingW?` \xB7 ${Te(n,i.chargingW)}`:""}`:i.plugged?`\u{1F50C} ${o("live_car_plugged")}`:"":`${o("live_car_away")}${i.where?` \xB7 ${i.where}`:""}${i.distance!==null?` \xB7 ${L(n,i.distance,i.distance<10?1:0)} km`:""}`,l=i.entities,c=(u,h,m,d)=>p``;return p`
${Vn((i.soc??0)/100,s)}
${i.soc!==null?`${Math.round(i.soc)} %`:"\u2013"}${i.range!==null?`${Math.round(i.range)} ${i.rangeUnit}`:""}
${e.name}
${a?p`
${a}
`:f} ${i.inside!==null?p`
🌡 ${L(n,i.inside,1)} °C
`:f} ${i.departure?p`
⏰ ${o("live_car_departure",{time:i.departure})}
`:f} ${i.open.length?p`
⚠ ${o("live_car_open",{parts:i.open.join(", ")})}
`:f}
${l.lock?c(i.locked,o(i.locked?"live_car_unlock":"live_car_lock"),i.locked?"\u{1F512}":"\u{1F513}",()=>{i.locked&&!confirm(o("live_car_unlock_confirm",{name:e.name}))||r("lock",i.locked?"unlock":"lock",l.lock)}):f} ${l.climate?c(i.climateOn,o("live_car_climate"),"\u2744",()=>r(l.climate.split(".")[0],i.climateOn?"turn_off":"turn_on",l.climate)):f} ${l.charge&&i.home?c(i.charging,o("live_car_charge"),"\u26A1",()=>r(l.charge.split(".")[0],"toggle",l.charge)):f}
`}function Bf(n,e,t,r){let i=e.media,o=l=>M(n,l),s=`rgb(${i.color.join(",")})`,a=(l,c,u)=>p``;return p`
l.currentTarget.classList.toggle("live-open")}> ${i.picture?p``:p`
♪
`}
${i.title||i.name}
${i.artist||i.app||i.name}
${a(o("live_media_prev"),"\u23EE","media_previous_track")} ${a(o("live_media_playpause"),"\u23EF","media_play_pause")} ${a(o("live_media_next"),"\u23ED","media_next_track")} ${i.volume!==null?p`l.stopPropagation()} @change=${l=>r("media_player","volume_set",i.entity,{volume_level:Number(l.target.value)/100})} />`:f}
`}function Tu(n){let e=[...n.querySelectorAll(".live-card")].filter(s=>s.style.visibility!=="hidden"&&s.offsetWidth>0),t=[],r=e[0]?.parentElement?.clientWidth??0,i=e[0]?.parentElement?.clientHeight??0,o=e.map(s=>{let[a,l]=[Number(s.dataset.x),s.offsetWidth],c=r?r>l+16?Math.min(Math.max(a,l/2+8),r-l/2-8):r/2:a;return s.style.setProperty("--live-dx",`${Math.round(a-c)}px`),{el:s,x:c,y:Number(s.dataset.y),w:l,h:s.offsetHeight}}).sort((s,a)=>Number(a.el.dataset.priority||0)-Number(s.el.dataset.priority||0)||a.y-s.y);for(let s of o){let a=s.y;if((s.el.classList.contains("live-card-hydronic")||s.el.classList.contains("live-card-charging"))&&r>s.w+16&&i>s.h+16){let h=[s.x,s.w/2+8,r-s.w/2-8,...t.flatMap(g=>[g.x0-s.w/2-8,g.x1+s.w/2+8])].filter(g=>g>=s.w/2+8&&g<=r-s.w/2-8).sort((g,_)=>Math.abs(g-s.x)-Math.abs(_-s.x)),m=[Math.max(s.h+8,Math.min(i-8,a)),...t.flatMap(g=>[g.y0-8,g.y1+s.h+8])].filter(g=>g>=s.h+8&&g<=i-8),d;for(let g of m){for(let _ of h)if(!t.some(b=>_-s.w/2b.x0-6&&g-s.hb.y0-6)){d={x:_,y:g};break}if(d)break}d&&(s.x=d.x,a=d.y)}for(let h=0;h<12;h++){let m={x0:s.x-s.w/2,x1:s.x+s.w/2,y0:a-s.h,y1:a},d=t.find(g=>m.x0g.x0-6&&m.y0g.y0-6);if(!d)break;a=d.y0-8}let l=s.y-a,c=!s.el.classList.contains("live-card-house")&&!s.el.classList.contains("live-card-roomclimate")&&s.el.dataset.focused!=="1",u=s.el.classList.contains("live-card-hydronic")||s.el.classList.contains("live-card-charging");if(c&&i>0&&(a-s.h<8||a>i-8||!u&&Math.abs(l)>Math.max(100,Math.min(180,i*.25)))){s.el.style.visibility="hidden";continue}t.push({x0:s.x-s.w/2,x1:s.x+s.w/2,y0:a-s.h,y1:a}),s.el.style.setProperty("--live-dx",`${Math.round(Number(s.el.dataset.x)-s.x)}px`),s.el.style.transform=`translate(${Math.round(s.x)}px, ${Math.round(a)}px) translate(-50%, -100%)`,s.el.style.setProperty("--live-thread",`${Math.round(18+l)}px`)}}function Vf(n,e,t){let r=e.printer,i=(c,u)=>M(n,c,u),o=r.progress??0,s=c=>new Intl.DateTimeFormat(n?.language??navigator.language,{hour:"2-digit",minute:"2-digit"}).format(new Date(c)),a=r.remaining!==null?r.remaining>=60?`${Math.floor(r.remaining/60)} h ${Math.round(r.remaining%60)} min`:`${Math.round(r.remaining)} min`:null,l=[r.nozzle!==null?`${i("printer_nozzle")} ${Math.round(r.nozzle)}\xB0`:null,r.bed!==null?`${i("printer_bed")} ${Math.round(r.bed)}\xB0`:null].filter(Boolean).join(" \xB7 ");return p`
${r.picture?p``:Vn(o/100,r.printing?"#38bdf8":"#8aa0c8")}
${r.progress!==null?`${Math.round(o)} %`:"\u2013"}${i(`printer_${r.printing?"printing":/finish|complete|fertig/.test(r.status)?"done":/pause/.test(r.status)?"paused":/error|fail/.test(r.status)?"error":"idle"}`)}
${e.name}
${r.job?p`
${r.job}
`:f} ${r.printing&&(r.endsAt||a)?p`
⏱ ${[a,r.endsAt?i("printer_done_at",{time:s(r.endsAt)}):null].filter(Boolean).join(" \xB7 ")}
`:f} ${r.layer!==null?p`
▤ ${i("printer_layer")} ${r.layer}${r.layers?` / ${r.layers}`:""}
`:f} ${l?p`
🌡 ${l}
`:f} ${r.filaments.length?p`
${r.filaments.map(c=>p``)}
`:f}
`}function Kf(n,e,t){let r=e.pump,i=a=>M(n,a),o=a=>a===null?"\u2013":`${L(n,a,1)}\xB0`,s={heating:"\u{1F525}",water:"\u{1F6BF}",cooling:"\u2744",defrost:"\u{1F9CA}",idle:"\u23F8"}[r.mode];return p`
${Vn(Math.min(1,(r.cop??0)/6),(r.cop??0)>=3.5?"#4ade80":(r.cop??0)>=2.5?"#facc15":"#fb923c")}
${r.cop!==null?L(n,r.cop,1):s}${r.cop!==null?"COP":""}
${e.name}
${s} ${i(`heatpump_${r.mode}`)}
${r.flow!==null||r.return!==null?p`
${i("heatpump_flow_return")}${o(r.flow)} → ${o(r.return)}
`:f} ${r.heat!==null?p`
${i("heatpump_heat")}${Te(n,r.heat)}
`:f} ${r.power!==null?p`
${i("heatpump_power")}${Te(n,r.power)}
`:f} ${r.outside!==null?p`
🌡 ${i("heatpump_outside")} ${o(r.outside)}
`:f}
`}function Gf(n,e,t){let r=(o,s,a)=>o===null?"\u2013":`${L(n,o,s)} ${a}`,i=Object.values(e.sources??{}).some(o=>xn(n,o).length>0);return p`
${e.showTemperature?p`
🌡${r(e.temperature===null?null:n?ue(n,e.temperature):e.temperature,1,n?ie(n):"\xB0C")}${U(n,e.sources?.temperature??[],M(n,"climate_temperature"))}
`:f} ${e.showHumidity?p`
💧${r(e.humidity,0,"%")}${U(n,e.sources?.humidity??[],M(n,"climate_humidity"))}
`:f} ${e.showCo2?p`
☁${r(e.co2,0,"ppm")}${U(n,e.sources?.co2??[],M(n,"climate_co2"))}
`:f} ${e.showIlluminance?p`
☀${r(e.illuminance,0,"lx")}${U(n,e.sources?.illuminance??[],M(n,"climate_illuminance"))}
`:f}
`}function Uf(n,e,t){let r=e.power===null?"\u2013":`${e.power<0?"\u2212":""}${Te(n,e.power)}`;return p`
${e.name}
${e.powerEntity?p`
${r}${U(n,[e.powerEntity],e.name)}
`:f} ${(e.readings??[]).map(i=>p`
${i.label}${i.text}${U(n,[i.entity],i.label)}
`)}
`}function Fu(n,e,t,r,i=!1){return e.length?p`
${e.map((o,s)=>o.kind==="roomclimate"?Gf(n,o,s):o.kind==="power"?Uf(n,o,s):o.kind==="hydronic"?p`
`:i?f:o.kind==="house"?Nf(n,o,s,r):o.kind==="car"?Wf(n,o,s,t):o.kind==="printer"?Vf(n,o,s):o.kind==="heatpump"?Kf(n,o,s):Bf(n,o,s,t))}
`:f}var Du=Q` .live-card.live-card-power { display:grid; gap:4px; min-width:90px; max-width:220px; box-sizing:border-box; } .live-power-name { font-size:11px; color:var(--nf-muted); overflow:hidden; text-overflow:ellipsis; } .live-card-power .live-row { align-items:center; gap:6px; } .live-card-power .live-row b { margin-left:auto; color:color-mix(in srgb,#ffca8a 80%,var(--nf-text)); font-variant-numeric:tabular-nums; } .live-card-power nf-trend-button { margin-left:0; } .live-card-power.live-card-charging { max-width:min(320px,calc(100vw - 24px)); } .live-card-power .live-charging-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 18px; align-items:center; column-gap:6px; min-height:18px; } .live-charging-label { color:var(--nf-muted); font-size:10px; overflow:hidden; text-overflow:ellipsis; } .live-charging-row b { font-size:11px; overflow:hidden; text-overflow:ellipsis; } .live-charging-row nf-trend-button { grid-column:3; } .live-cards { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; container-type: size; } /* a phone: the cards keep to the screen, the house card leaves its week out */ @container (max-width: 480px) { .live-card { gap: 8px; padding: 8px 10px; font-size: 11.5px; } .live-card-house:not(.live-folded) { padding-right: 28px; } .live-card-house .live-week { display: none; } .live-rows { min-width: 0; } } .live-card { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: calc(var(--nf-radius) + 4px); background: var(--nf-chrome); box-shadow: var(--nf-shadow); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--nf-text); font-size: 12.5px; line-height: 1.35; white-space: nowrap; will-change: transform; } .live-card::after { /* a thin glowing thread down to the point the card belongs to */ content: ""; position: absolute; left: clamp(12px, calc(50% + var(--live-dx, 0px)), calc(100% - 12px)); bottom: calc(-1 * var(--live-thread, 18px)); width: 1px; height: var(--live-thread, 18px); background: linear-gradient(color-mix(in srgb, var(--nf-text) 45%, transparent), transparent); } .live-fold { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--nf-text) 10%, transparent); color: var(--nf-text); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; opacity: 0.7; } .live-fold:hover, .live-fold:focus-visible { opacity: 1; background: color-mix(in srgb, var(--nf-text) 20%, transparent); } .live-card-house:not(.live-folded) { padding-right: 30px; } .live-folded { padding: 6px 30px 6px 8px; gap: 8px; } .live-folded .live-own, .live-folded .live-ring { width: 38px; height: 38px; } .live-folded .live-own-text b { font-size: 11px; } .live-rows { display: grid; gap: 2px; min-width: 150px; } .live-card-roomclimate { display: grid; gap: 4px; min-width: 96px; max-width: calc(100vw - 24px); box-sizing: border-box; } .live-card-roomclimate .live-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: center; column-gap: 6px; min-height: 18px; } .live-climate-trends .live-row { grid-template-columns: 14px minmax(0, 1fr) 18px; } .live-card-roomclimate .live-row b { justify-self: end; white-space: nowrap; line-height: 18px; font-variant-numeric: tabular-nums; } .live-card-roomclimate nf-trend-button { grid-column: 3; margin-left: 0; } .live-climate-temperature b { color: color-mix(in srgb, #ffca8a 80%, var(--nf-text)); } .live-climate-humidity b { color: color-mix(in srgb, #7dd3fc 80%, var(--nf-text)); } .live-climate-co2 b { color: color-mix(in srgb, #c4b5fd 80%, var(--nf-text)); } .live-climate-illuminance b { color: color-mix(in srgb, #fde68a 80%, var(--nf-text)); } .live-row { display: flex; justify-content: space-between; gap: 14px; } .live-day { position: relative; margin-top: 6px; } .live-day svg { display: block; width: 100%; height: 34px; } .live-day-solar { fill: rgba(250, 204, 21, 0.35); stroke: #facc15; stroke-width: 1; vector-effect: non-scaling-stroke; } .live-week svg { height: 30px; } .live-week-solar { fill: rgba(250, 204, 21, 0.6); } .live-week-use { fill: rgba(232, 238, 255, 0.18); stroke: #e8eeff; stroke-width: 1; vector-effect: non-scaling-stroke; } .live-day-use { fill: none; stroke: #e8eeff; stroke-width: 1.4; vector-effect: non-scaling-stroke; } .live-day span { position: absolute; right: 2px; top: 0; font-size: 9px; opacity: 0.6; } .live-row span { opacity: 0.8; } .live-solar b { color: color-mix(in srgb, #ffd166 72%, var(--nf-text)); } .live-battery b { color: color-mix(in srgb, #4ade80 72%, var(--nf-text)); } .live-import b { color: color-mix(in srgb, #f87193 72%, var(--nf-text)); } .live-export b { color: color-mix(in srgb, #38dcf5 72%, var(--nf-text)); } .live-house b { color: color-mix(in srgb, #b6c2ff 72%, var(--nf-text)); } .live-title { font-weight: 600; font-size: 13px; } .live-status { opacity: 0.85; } .live-print-pic { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: rgba(255, 255, 255, 0.06); } .live-filaments { display: flex; gap: 4px; margin-top: 2px; } .live-filaments i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4); } .live-warn { color: #fbbf24; opacity: 1; } .live-actions { display: flex; gap: 6px; margin-top: 4px; } .live-btn { font: inherit; font-size: 14px; width: 32px; height: 28px; border-radius: 9px; border: none; background: var(--nf-fill); color: inherit; cursor: pointer; } .live-btn.live-on { background: color-mix(in srgb, var(--live-soc, #4ade80) 30%, transparent); border-color: var(--live-soc, #4ade80); } .live-card-car { border-color: color-mix(in srgb, var(--live-soc) 60%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--live-soc) 30%, transparent), inset 0 0 18px rgba(120, 200, 255, 0.06); } .live-card-car.live-charging { animation: live-charge 1.6s ease-in-out infinite; } @keyframes live-charge { 50% { box-shadow: 0 0 34px color-mix(in srgb, var(--live-soc) 55%, transparent), inset 0 0 18px rgba(120, 200, 255, 0.1); } } .live-card-car.live-away { opacity: 0.85; border-style: dashed; } /* phones: only the house and the car, the media cards would cover the rooms */ .nf-narrow .live-card-media { display: none; } .live-card-media { border-color: color-mix(in srgb, var(--live-soc) 55%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--live-soc) 28%, transparent), inset 0 0 18px rgba(120, 200, 255, 0.06); } .live-card-media .live-title { max-width: 190px; overflow: hidden; text-overflow: ellipsis; } .live-card-media { cursor: pointer; padding: 7px 12px 7px 7px; } .live-card-media .live-actions { display: none; } .live-card-media.live-open .live-actions { display: flex; } .live-card-media.live-open { z-index: 5; } .live-cover { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 14px color-mix(in srgb, var(--live-soc) 40%, transparent); } .live-cover-none { display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--live-soc) 25%, transparent); } .live-volume { width: 80px; accent-color: var(--live-soc); } .live-own { position: relative; width: 54px; height: 54px; } .live-ring { width: 54px; height: 54px; } .live-ring-bg { fill: none; stroke: color-mix(in srgb, var(--nf-text) 10%, transparent); stroke-width: 5; } .live-ring-fg { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; } .live-own-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; } .live-own-text b { font-size: 13px; } .live-own-text span { font-size: 8.5px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.04em; } `;function ts(n){switch(n.kind){case"house":return{density:0,priority:100};case"roomclimate":return{density:24,priority:80};case"hydronic":return{density:42,priority:45};case"power":return n.power!==null&&Math.abs(n.power)>1?{density:48,priority:60}:n.readings?.length?{density:56,priority:30}:{density:n.power===null?64:72,priority:20};case"car":return{density:n.car.charging?36:60,priority:n.car.charging?60:20};case"printer":return{density:n.printer.printing?36:60,priority:n.printer.printing?60:20};case"heatpump":return{density:n.pump.mode!=="idle"?36:60,priority:n.pump.mode!=="idle"?60:20};case"media":return{density:48,priority:40}}}function Hu(n,e,t){let r=ts(n).density;return r?Number.isFinite(e)&&e>=r*(t?.88:1.12):!0}function di(n){return n.toLocaleLowerCase().normalize("NFD").replace(new RegExp("\\p{M}","gu"),"")}var ns=n=>n.points.length>=3;function Pu(n,e,t){return n.rooms.filter(ns).find(r=>H([e,t],r.points))}function jf(n,e,t,r){let i=[];for(let a of e.rooms.filter(ns)){let[l,c]=Fe(a.points);i.push({kind:"room",name:a.name,where:r?e.name:"",floorId:e.id,roomId:a.id,entity:null,icon:null,x:l,z:c,y:0})}let o=new Set,s=(a,l,c,u)=>{if(o.has(a)||!(a in n.states))return;o.add(a);let h=Pu(e,l,c),m=[h?.name,r?e.name:void 0].filter(d=>!!d).join(" \xB7 ");i.push({kind:"device",name:O(n,a),where:m,floorId:e.id,roomId:h?.id??null,entity:a,icon:P(a),x:l,z:c,y:u})};for(let a of e.placements){let l=a.y??It(P(a.entity_id)??"sensor",ke(e,a.x,a.z),a.mount);s(a.entity_id,a.x,a.z,l)}for(let a of e.furniture){let l=t.get(a.id),c=l?.entity??l?.power;if(!c)continue;let u=ke(e,a.x,a.z)-.3;s(c,a.x,a.z,Math.min(u,Math.max(.5,a.h)))}for(let a of e.notes??[]){if(!a.text)continue;let l=Pu(e,a.x,a.z),c=[l?.name,r?e.name:void 0].filter(u=>!!u).join(" \xB7 ");i.push({kind:"note",name:`\u270E ${a.text.length>60?`${a.text.slice(0,59)}\u2026`:a.text}`,where:c,floorId:e.id,roomId:l?.id??null,entity:null,icon:null,x:a.x,z:a.z,y:1.3})}return i}function Iu(n,e){let t=Ge(n,e.floors),r=e.floors.length>1,i=e.floors.flatMap(o=>jf(n,o,t,r));for(let o of e.settings.circuits??[]){let s=e.floors.flatMap(h=>h.rooms.filter(m=>o.rooms.includes(m.id)&&ns(m)).map(m=>({f:h,r:m})));if(!s.length)continue;let[{f:a,r:l}]=s,[c,u]=Fe(l.points);i.push({kind:"circuit",name:`\u{1F50C} ${o.name}`,where:s.map(h=>h.r.name).join(", "),floorId:a.id,roomId:l.id,entity:null,icon:null,x:c,z:u,y:0})}return i}function qf(n,e){return(di(n.name).startsWith(e)?0:2)+(n.kind==="room"?0:1)}function Cu(n,e,t=8){let r=di(e).split(/\s+/).filter(Boolean);if(r.length===0)return[];let i=di(e.trim());return n.filter(o=>{let s=di([o.name,o.where,o.entity].filter(Boolean).join(" "));return r.every(a=>s.includes(a))}).map(o=>({item:o,cost:qf(o,i)})).sort((o,s)=>o.cost-s.cost||o.item.name.localeCompare(s.item.name)).slice(0,t).map(o=>o.item)}var Zf=[[255,181,71],[255,236,210],[55,224,255],[91,124,255],[190,90,255],[255,95,210],[255,70,70],[120,255,150]],Yf=[2200,2700,3200,4e3,5e3,6500],Jf=["hs","rgb","rgbw","rgbww","xy"],Qf=4,Nu=16,Lu=32,Xf=128;function is(n){let e=n.attributes.supported_color_modes??[],t=e.some(r=>Jf.includes(r));return{dim:e.some(r=>r!=="onoff"),color:t,temp:e.includes("color_temp")}}function os(n){return((n.attributes.supported_features??0)&Qf)!==0&&typeof n.attributes.current_position=="number"}var rs=class extends X{static properties={hass:{attribute:!1},entity:{attribute:!1},car:{attribute:!1},presets:{attribute:!1},confirmSwitch:{type:Boolean},myPosition:{attribute:!1},tiltEntity:{attribute:!1},low:{type:Boolean,reflect:!0}};t(e,t){return M(this.hass,e,t)}ask(){return!this.confirmSwitch||confirm(this.t("confirm_switch",{name:O(this.hass,this.entity)}))}call(e,t,r={}){W(this.hass,this.entity)&&this.hass.callService(e,t,{entity_id:this.entity,...r})}close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}details(){Se(this,this.entity),this.close()}ring(e){let t=e.length;return e.map((r,i)=>{let o=i/t*Math.PI*2-Math.PI/2;return p`
${r}
`})}renderLight(e){let t=is(e),r=e.state==="on",i=r&&typeof e.attributes.brightness=="number"?Math.round(e.attributes.brightness/2.55):r?100:0,o=t.color?Zf.map(s=>p``):t.temp?Yf.map(s=>p``):[];return p`
${this.ring(o)}
${t.dim?p`this.call("light","turn_on",{brightness_pct:Number(s.target.value)})} />`:f}`}renderCover(e){e=Mr(this.hass,e,this.tiltEntity);let t=typeof e.attributes.current_position=="number"?e.attributes.current_position:null,r=e.state==="opening"||e.state==="closing",i=os(e),o=(u,h,m,d=!1)=>p``,s=u=>t!==null&&Math.abs(t-u)<3,a=[o("\u25B2",this.t("cover_open"),()=>this.ask()&&this.call("cover","open_cover"),s(100)),...i?[75,50].map(u=>o(`${u}`,`${u} %`,()=>this.ask()&&this.call("cover","set_cover_position",{position:u}),s(u))):[],o("\u25BC",this.t("cover_close"),()=>this.ask()&&this.call("cover","close_cover"),s(0)),...i?[25].map(u=>o(`${u}`,`${u} %`,()=>this.ask()&&this.call("cover","set_cover_position",{position:u}),s(u))):[],...Number(e.attributes.supported_features??0)&8?[o("\u25A0",this.t("cover_stop"),()=>this.call("cover","stop_cover"),r)]:[],...this.myPosition!=null&&(i||Number(e.attributes.supported_features??0)&8)?[o("My",this.t("cover_my_go",{p:this.myPosition}),()=>this.ask()&&(i?this.call("cover","set_cover_position",{position:this.myPosition}):this.call("cover","stop_cover")),s(this.myPosition))]:[]],l=t===null?e.state==="closed"?100:0:100-t,c=t!==null||r||e.state==="open"||e.state==="closed";return p`
${this.ring(a)}
${i?p`this.call("cover","set_cover_position",{position:Number(u.target.value)})} />`:f} ${this.renderTilt(e)}`}renderTilt(e){let t=(e.attributes.supported_features??0)|0,r=typeof e.attributes.current_tilt_position=="number"?e.attributes.current_tilt_position:null;return t&Xf&&r!==null?p``:t&(Nu|Lu)?p`
${t&Nu?p``:f} ${t&Lu?p``:f}
`:f}renderToggle(e){let t=e.state==="on"||e.state==="unlocked"||e.state==="playing",r=e.entity_id.split(".")[0];return p`
`}renderMedia(e){let t=!["off","standby","unavailable","unknown"].includes(e.state),r=e.state==="playing",i=e.attributes,o=typeof i.volume_level=="number"?Math.round(i.volume_level*100):null,s=Array.isArray(i.source_list)?i.source_list.slice(0,24):[],a=[i.media_title,i.media_artist].filter(h=>typeof h=="string"&&h).join(" \xB7 "),l=h=>p``,c=(h,m,d,g=!1)=>p``,u=t?[c(l(r?"M6 5h4v14H6zM14 5h4v14h-4z":"M8 5v14l11-7z"),this.t(r?"media_pause":"media_play"),()=>this.call("media_player","media_play_pause"),r),c(l("M6 6h2v12H6zm3.5 6 8.5 6V6z"),this.t("media_previous"),()=>this.call("media_player","media_previous_track")),c(l("M16 6h2v12h-2zM6 18l8.5-6L6 6z"),this.t("media_next"),()=>this.call("media_player","media_next_track"))]:[];return p`
${this.ring(u)}
${a?p`
${a}
`:f} ${o!==null?p`this.call("media_player","volume_set",{volume_level:Number(h.target.value)/100})} />`:f} ${s.length?p`
${this.t("media_sources")}
${s.map(h=>p``)}
`:f} ${this.presets?.length?p`
${this.t("presets")}
${this.presets.map(h=>p``)}
`:f}`}render(){let e=this.hass?.states[this.entity];if(!e)return f;let t=P(this.entity),r=!W(this.hass,this.entity)||C(e)&&!gn(e)?p`

${ae(this.hass,e)}

`:t==="light"?this.renderLight(e):t==="cover"?this.renderCover(e):t==="media"?this.renderMedia(e):this.renderToggle(e);return p``}static styles=[ve,Q` .qm-play-head { margin: 10px 0 4px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; } .qm-play { display: flex; flex-wrap: wrap; gap: 6px; max-height: 110px; overflow-y: auto; } .qm-chip { border: 1px solid rgba(160, 240, 255, 0.35); border-radius: 999px; padding: 5px 10px; background: rgba(8, 16, 34, 0.55); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; } .qm-chip-on { border-color: var(--nf-accent, var(--nf-accent)); color: var(--nf-accent, var(--nf-accent)); } .qm { width: 232px; padding: 12px 14px 10px; border-radius: 22px; background: var(--nf-chrome); box-shadow: var(--nf-shadow), 0 0 0 1px var(--nf-line); backdrop-filter: blur(10px); } :host([low]) .qm { backdrop-filter: none; box-shadow: 0 0 0 1px var(--nf-line); animation: none; color: var(--nf-text); text-align: center; animation: qm-in 140ms ease-out; } @keyframes qm-in { from { opacity: 0; transform: scale(0.85); } } .qm-title { font: 700 14.5px var(--nf-title-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .qm-ring { position: relative; width: 196px; height: 196px; margin: 6px auto 4px; display: grid; place-items: center; } .qm-ring-small { height: 110px; } .qm-at { position: absolute; transform: translate(-50%, -50%); } .qm-swatch { width: 34px; height: 34px; border: 2px solid color-mix(in srgb, var(--nf-text) 25%, transparent); border-radius: 50%; cursor: pointer; box-shadow: 0 0 12px rgba(0, 0, 0, 0.35); } .qm-swatch:active { transform: scale(0.9); } .qm-power { display: grid; place-items: center; gap: 2px; width: 88px; height: 88px; border: 0; border-radius: 50%; background: var(--nf-bg2); color: var(--nf-muted); box-shadow: inset 0 0 0 2px var(--nf-line); cursor: pointer; font: inherit; } .qm-power:disabled { opacity: 0.45; cursor: default; } .qm-power b { font: 700 15px var(--nf-title-font); color: var(--nf-text); } .qm-power small { font-size: 11px; } .qm-on { color: #1a1204; background: var(--nf-warm); box-shadow: 0 0 24px rgba(255, 181, 71, 0.55); } .qm-on b { color: #1a1204; } .qm-slot { display: grid; place-items: center; border-color: var(--nf-line); background: var(--nf-bg2); color: var(--nf-text); font: 700 12px var(--nf-title-font); } .qm-slot-on { background: var(--nf-accent); color: var(--nf-accent-text); border-color: transparent; box-shadow: var(--nf-shadow); } /* the blind: its closed part covers the circle from the top, the open part glows like daylight */ .qm-blind.qm-on { background: linear-gradient(to bottom, #1e2c4c var(--closed), #9fd9ff var(--closed)); box-shadow: 0 0 22px rgba(120, 200, 255, 0.4); color: #06101f; } .qm-blind b { text-shadow: 0 0 6px rgba(0, 0, 0, 0.6); color: #fff; } .qm-round { width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--nf-accent); color: var(--nf-accent-text); font-size: 17px; cursor: pointer; } .qm-car-line { margin: 2px 0 8px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; } .qm-car { display: grid; gap: 6px; justify-items: stretch; } .qm-car .qm-slot { width: auto; padding: 6px 10px; font-size: 13px; } .qm-media { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0; } .qm-media-main { width: 64px; height: 64px; border-radius: 50%; background-size: cover; background-position: center; position: relative; } .qm-media-main span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; text-shadow: 0 0 6px rgba(0, 0, 0, 0.8); color: #fff; } .qm-media .qm-slot { width: auto; padding: 0 10px; } .qm-media-title { margin: 2px 0 4px; text-align: center; font-size: 12px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .qm-tilt { display: grid; gap: 4px; margin-top: 8px; font-size: 12px; color: var(--nf-muted); } .qm-tilt-buttons { display: flex; gap: 6px; justify-content: center; margin-top: 8px; } .qm-tilt-buttons .qm-slot { width: auto; padding: 0 10px; font-size: 12px; } .qm-slider { width: 100%; margin: 4px 0 6px; accent-color: var(--nf-accent); } .qm-look { display: block; width: 100%; margin-top: -4px; } .qm-details { border: 0; background: none; color: var(--nf-accent); font: inherit; font-size: 13px; padding: 6px; cursor: pointer; } .qm-note { color: var(--nf-muted); } `]};function eg(n){let e=Math.min(1,Math.max(0,(n-2200)/4300)),t=(r,i)=>Math.round(r+(i-r)*e);return`rgb(${t(255,200)},${t(170,225)},${t(80,255)})`}customElements.get("nf-quick-menu")||customElements.define("nf-quick-menu",rs);var tg=new URL(import.meta.url),ng=new URL("./nextfloor-3d.js?v=d63a1d893eb1",tg).href,Ou;function Wu(){return Ou??=import(ng),Ou}function Bu(n){if(!n||n.state!=="on")return 0;let e=typeof n.attributes.percentage=="number"?n.attributes.percentage:60;return e<=0?0:.2+.6*Math.min(100,e)/100}var Vu="weather.nextfloor_symcon",Gu={condition:"Wetterzustand",temperature:"Au\xDFentemperatur",humidity:"Au\xDFenluftfeuchte",pressure:"Luftdruck",wind_speed:"Windgeschwindigkeit",wind_gust_speed:"Windb\xF6en",wind_bearing:"Windrichtung",cloud_coverage:"Bew\xF6lkung",precipitation:"Niederschlagsrate",precipitation_total:"Niederschlagsmenge",illuminance:"Au\xDFenhelligkeit",uv_index:"UV-Index",visibility:"Sichtweite",snow:"Schnee",fog:"Nebel",lightning:"Gewitter"},Ku=new WeakMap;function rg(n){let e=n.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").trim();return["sunny","clear-night","partlycloudy","cloudy","fog","rainy","pouring","lightning-rainy","lightning","hail","snowy","snowy-rainy","windy","windy-variant"].includes(e)?e:/kein regen|trocken|wolkenlos|klar|sonnig/.test(e)?"sunny":/gewitter|blitz/.test(e)?"lightning-rainy":/schneeregen/.test(e)?"snowy-rainy":/schnee/.test(e)?"snowy":/hagel/.test(e)?"hail":/starkregen/.test(e)?"pouring":/regen|niesel/.test(e)?"rainy":/nebel/.test(e)?"fog":/teil.*wolk|heiter|leicht.*wolk/.test(e)?"partlycloudy":/wolk|bedeckt/.test(e)?"cloudy":/wind|sturm/.test(e)?"windy":null}function hi(n,e){if(!B(n))return n;let t=e.weather_variables??{};if(!e.rain_sensor&&!Object.values(t).some(d=>d&&d!=="none"))return n;let r=Ku.get(n)??new WeakMap;Ku.set(n,r);let i=r.get(e);if(i)return i;let o={friendly_name:"Wetter",nf_symcon_weather:!0},s=d=>t[d]&&t[d]!=="none"?n.states[t[d]]:void 0;for(let d of["temperature","humidity","pressure","cloud_coverage","precipitation","precipitation_total","illuminance","uv_index","visibility"]){let g=s(d),_=_e(g);_!==null&&(o[d]=d==="cloud_coverage"&&g?.attributes.symcon_max===1?_*100:_),g?.attributes.unit_of_measurement&&(o[`${d}_unit`]=g.attributes.unit_of_measurement)}for(let d of["wind_speed","wind_gust_speed"]){let g=s(d),_=_e(g);_!==null&&(o[d]=ri(_,g?.attributes.unit_of_measurement))}o.wind_speed_unit="km/h";let a=ge(s("wind_bearing"));a!==null&&(o.wind_bearing=a);let l=rg(De(s("condition"))),c=e.rain_sensor?n.states[e.rain_sensor]:void 0,u=ce(c);u!==null&&e.rain_sensor_inverted&&(u=!u),u===null&&typeof o.precipitation=="number"&&(u=o.precipitation>0),ce(s("lightning"))?l=u?"lightning-rainy":"lightning":ce(s("snow"))?l=u?"snowy-rainy":"snowy":ce(s("fog"))?l="fog":u===!0?l=Number(o.precipitation??0)>=8?"pouring":"rainy":u===!1&&l&&/rain|pouring/.test(l)&&(l=null),!l&&typeof o.cloud_coverage=="number"&&(l=o.cloud_coverage>70?"cloudy":o.cloud_coverage>20?"partlycloudy":"sunny"),!l&&u===!1&&(l="sunny");let h={entity_id:Vu,state:l??"unknown",attributes:o},m={...n,states:{...n.states,[Vu]:h}};return r.set(e,m),m}var ss=class extends X{static properties={hass:{attribute:!1},floors:{attribute:!1},floorId:{attribute:!1},inline:{type:Boolean,reflect:!0},compact:{type:Boolean},folded:{state:!0}};constructor(){super(),this.floors=[],this.floorId=null,this.inline=!1,this.compact=!1,this.folded=null}value(e){return e?p`${Le(this.hass,e)}${e.period!=="total"?p`${{day:"heute",month:"Monat",year:"Jahr"}[e.period]}`:f}${U(this.hass,e.sources,`${Ce[e.kind]} \xB7 ${Gt(e)}`)}`:f}open(e,t){this.dispatchEvent(new CustomEvent("utility-open",{detail:{floorId:t?this.floorId:e,roomId:t?e:null},bubbles:!0,composed:!0}))}rows(e){return We.map(t=>{let r=e.filter(o=>o.kind===t&&o.metric==="power"),i=e.filter(o=>o.kind===t&&o.metric==="energy");return Array.from({length:Math.max(r.length,i.length)},(o,s)=>p`
${s?"":`${Rn[t]} ${Ce[t]}`}${r[s]?this.value(r[s]):p``}${i[s]?this.value(i[s]):p``}
`)})}render(){if(!this.hass)return f;let e=this.floors.flatMap(s=>s.rooms),t=this.floors.find(s=>s.id===this.floorId);if(this.inline){let s=t?Ne(this.hass,t,e):Vl(this.hass,this.floors);return p`${We.map(a=>{let l=s.filter(c=>c.kind===a);return l.length?p`
${Rn[a]} ${Ce[a]}
${l.map(c=>this.value(c))}
`:f})}`}let i=(t?Kt(this.hass,t,e,!0).map(s=>({...s,hasDetails:s.rooms.length>0})):[...this.floors].sort((s,a)=>a.elevation-s.elevation).map(s=>({id:s.id,name:s.name,path:"",readings:Ne(this.hass,s,e),rooms:[],hasDetails:Kt(this.hass,s,e,!0).length>0}))).filter(s=>s.readings.length||s.hasDetails);if(!i.length)return f;let o=this.folded??this.compact;return p`
${o?f:p`
LeistungEnergie / Verbrauch
${i.map(s=>p`
${t?p`
${s.name}
`:p``} ${this.rows(s.readings)} ${s.rooms.map(a=>p`
${this.rows(a.readings)} ${a.devices.map(l=>p`
${l.name}
${this.rows(l.readings)}
`)}
`)}
`)}
`}
`}static styles=Q` :host { display:flex; width:100%; min-height:0; max-height:100%; color:var(--nf-text); font:12px/1.4 system-ui,sans-serif; pointer-events:auto; } :host([inline]) { display:flex; flex-wrap:wrap; align-items:stretch; gap:6px; width:auto; max-width:100%; } .meter { padding:5px 9px; border-radius:10px; background:var(--nf-chrome); border-left:2px solid var(--nf-line); backdrop-filter:blur(6px); } .medium { font-size:11px; color:var(--nf-muted); } .medium small { font-size:10px; } .values { display:flex; flex-wrap:wrap; gap:3px 10px; } .value { display:inline-flex; align-items:center; justify-content:flex-end; gap:3px; min-width:0; white-space:nowrap; font-variant-numeric:tabular-nums; } .value b { font-size:12px; font-weight:600; } .value small { color:var(--nf-muted); font-size:9px; } nf-trend-button { margin-left:0; } .panel { display:flex; flex-direction:column; box-sizing:border-box; width:100%; max-height:100%; border:1px solid var(--nf-line); border-radius:12px; background:var(--nf-chrome); backdrop-filter:blur(8px); overflow:hidden; } button { color:inherit; font:inherit; border:0; background:none; cursor:pointer; text-align:left; } button:focus-visible { outline:2px solid var(--nf-accent); outline-offset:-2px; } .heading { display:flex; flex-shrink:0; align-items:center; justify-content:space-between; gap:12px; width:100%; padding:8px 10px; font-weight:600; } .heading small { display:block; color:var(--nf-muted); font-size:10px; font-weight:normal; } .entries { min-height:0; max-height:min(50vh,480px); overflow:auto; padding:0 10px 8px; } .columns,.row { display:grid; grid-template-columns:54px minmax(0,1fr) minmax(0,1.2fr); align-items:center; gap:5px; } .columns { color:var(--nf-muted); font-size:9px; text-align:right; margin-bottom:2px; } .entry { border-top:1px solid var(--nf-line); padding:6px 0; } .entry:last-child { padding-bottom:0; } .entry-name { display:block; width:100%; padding:0 0 3px; font-size:11px; font-weight:600; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; } .entry-name:hover { color:var(--nf-accent); } .area-name:hover { color:inherit; } .room-entry { margin-top:5px; padding-top:4px; border-top:1px dotted var(--nf-line); } .room-entry>.entry-name { padding-left:12px; color:var(--nf-muted); font-weight:normal; } .device-entry { margin-top:4px; } .device-entry>.device-name { padding-left:24px; color:var(--nf-muted); font-weight:normal; } .device-name:hover { color:var(--nf-muted); } .row { min-height:20px; } .kind { color:var(--nf-muted); font-size:10px; white-space:nowrap; } .row .value b { font-size:11px; font-weight:normal; } @media(max-width:600px) { .entries { max-height:32vh; } } `};customElements.get("nf-utility-overview")||customElements.define("nf-utility-overview",ss);var Uu="image:";function as(n,e,t){let r=(e??"").trim();if(!r)return null;if(r.startsWith(Uu))return t(r.slice(Uu.length));if(/^(https?:\/\/|\/)/.test(r))return r;if(/^[a-z_]+\.[a-z0-9_]+$/.test(r)){let i=n?.states[r]?.attributes.entity_picture;return typeof i=="string"&&i?i:null}return null}var Kn=n=>Number(n);function Un(n){if(Array.isArray(n)){let[o,s]=[Kn(n[0]),Kn(n[1])];return Number.isFinite(o)&&Number.isFinite(s)?[o,s]:null}if(!n||typeof n!="object")return null;let{x:e,y:t}=n,[r,i]=[Kn(e),Kn(t)];return Number.isFinite(r)&&Number.isFinite(i)?[r,i]:null}function ju(n){return n?Un(n.charger)??Un(n.charger_position):null}function qu(n){for(let[e,t]of Object.entries(n.states))if(e.startsWith("camera.")&&(Un(t.attributes?.vacuum_position)??ju(t.attributes)))return e;return null}var ig=n=>Array.isArray(n)?typeof n[0]=="number":!!n&&typeof n=="object",Gn=(n,e)=>e?[n[0],-n[1]]:n;function og(n){if(!n)return null;let e=n.mirror===!0,[t,r]=Gn(n.ga,e),[i,o]=Gn(n.gb,e),[s,a]=n.a,[l,c]=n.b,[u,h]=[i-t,o-r],[m,d]=[l-s,c-a],g=Math.hypot(u,h),_=Math.hypot(m,d);if(!(g>1e-6)||!(_>1e-6))return null;let b=_/g,y=Math.atan2(d,m)-Math.atan2(h,u),[$,S]=[Math.cos(y),Math.sin(y)];return A=>{let z=Gn(A,e),[x,D]=[z[0]-t,z[1]-r];return[s+b*(x*$-D*S),a+b*(x*S+D*$)]}}function sg(n){if(!n)return null;let e=n.mirror===!0,[t,r]=Gn(n.ga,e),[i,o]=Gn(n.gb,e),s=Math.atan2(n.b[1]-n.a[1],n.b[0]-n.a[0])-Math.atan2(o-r,i-t);return Number.isFinite(s)?s:null}function Zu(n,e,t){if(!e)return null;let r=n.states[e]?.attributes;if(!r)return null;let i=og(t)??(g=>g),o=sg(t)??0,s=t?.mirror===!0?-1:1,a=r.vacuum_position,l=Un(a),c=l?(()=>{let[g,_]=i(l),b=Kn(a?.a)*s;if(!Number.isFinite(b))return{x:g,z:_,heading:0};let y=b*Math.PI/180+o;return{x:g,z:_,heading:Math.atan2(Math.cos(y),Math.sin(y))}})():null,u=ju(r),h=Array.isArray(r.path)?r.path:[],m=h.length>0&&ig(h[0])?[h]:h,d=[];for(let g of m){let _=[];for(let b of Array.isArray(g)?g:[]){let y=Un(b);y&&_.push(i(y))}_.length>1&&d.push(_)}return!c&&!u&&!d.length?null:{pose:c,charger:u?i(u):null,path:d}}var Yu="nextfloor.lock3d",Ju=520,cs=class extends X{static properties={hass:{attribute:!1},building:{attribute:!1},floorId:{attribute:!1},roomId:{attribute:!1},wallMode:{attribute:!1},solidWalls:{attribute:!1},glassWalls:{attribute:!1},explode:{type:Boolean},keepRoof:{attribute:!1},markerMode:{attribute:!1},markerNames:{attribute:!1},markersOutside:{attribute:!1},tapInRoom:{type:Boolean},roomDoubleTap:{attribute:!1},heatMode:{attribute:!1},theme:{attribute:!1},accent:{attribute:!1},furnitureColors:{attribute:!1},packs:{attribute:!1},showEnergy:{attribute:!1},flows:{attribute:!1},holograms:{attribute:!1},furnish:{type:Boolean},surfaceGrab:{attribute:!1},furnishTypes:{attribute:!1},weather:{type:Boolean},weatherEntityId:{attribute:!1},weatherDensity:{attribute:!1},timeOfDay:{attribute:!1},selectedFurniture:{attribute:!1},selectedDevice:{attribute:!1},_sky:{state:!0},quality:{attribute:!1},showStats:{type:Boolean},_stats:{state:!0},_error:{state:!0},_energy:{state:!0},_flows:{state:!0},_liveEnergy:{state:!0},_liveCards:{state:!0},_liveCardOn:{state:!0},_houseFolded:{state:!0},_utilityOverviewVisible:{state:!0},_swipe:{state:!0},_menu:{state:!0},_pluginWindow:{state:!0},_plate:{state:!0},_blend:{state:!0},_wallBig:{state:!0},_find:{state:!0},_central:{state:!0},_thumbsCompact:{state:!0},_armed:{state:!0},central:{attribute:!1},centralOpen:{attribute:!1},keepCamera:{attribute:!1},plain:{attribute:!1},rightBack:{attribute:!1},templateName:{attribute:!1},readable:{type:Boolean,reflect:!0},today:{attribute:!1},_todayOpen:{state:!0},_todayItems:{state:!0},_forecast:{state:!0},zoom:{attribute:!1},buttons:{attribute:!1},_thumbs:{state:!0},floorThumbs:{attribute:!1},clean:{attribute:!1},cleanButton:{attribute:!1},clock:{attribute:!1},lockButton:{attribute:!1},walkButton:{attribute:!1},travelButton:{attribute:!1},_travel:{state:!0},_walking:{state:!0},_stick:{state:!0},_locked:{state:!0},_now:{state:!0},roomLabels:{attribute:!1},roomNamesButton:{attribute:!1},floorStack:{attribute:!1},panelOpen:{attribute:!1},alerts:{attribute:!1},alertJump:{attribute:!1},scenes:{attribute:!1},announcements:{attribute:!1},sensorBar:{attribute:!1},screenName:{attribute:!1},_announcement:{state:!0},dimmed:{attribute:!1},autoOrbit:{attribute:!1},startView:{attribute:!1},outsideOpen:{attribute:!1},_low:{state:!0},_narrowStage:{state:!0},_shortStage:{state:!0},_phoneStage:{state:!0},_alerts:{state:!0},_sceneFired:{state:!0}};stopAnnouncements=null;announceTimer;get liveCardsOn(){return this.holograms??this._liveCardOn}cloud=0;confirmSet=new Set;shownStartView;placementInfo=new Map;live=null;travelTimer;dayCurves=null;curvesAt=0;clockTimer;stopPlugins=null;pluginsDirty=!1;resizeObs=null;alertSrc=null;alertTimer;contactTimer;seenAlerts=new Set;roomFlash=null;findIndex=null;tintSig="";thumbTimer;thumbSig="";thumbsAt=0;armTimer;forecastAt=0;forecastKey="";todayAt=0;todayDay="";swipeSent=0;swipeTimer;viewer=null;hydronicModule=null;hydronicGeneration=0;starting=!1;shownStates=new Map;shownPacks=-1;openingLinks=null;linkedRegistry;furnitureLinks=new Map;tapPins=new Map;heatValues=new Map;watched=[];constructor(){super(),this.building=null,this.floorId=null,this.roomId=null,this.wallMode="auto",this.solidWalls=!1,this.glassWalls=null,this.explode=!0,this.keepRoof=!1,this.markerMode="important",this.markersOutside=null,this.tapInRoom=!1,this.roomDoubleTap="auto",this.heatMode="none",this.theme="neon",this.accent=null,this.furnitureColors=null,this.furnish=!1,this.weather=!0,this.weatherEntityId=null,this.weatherDensity=1,this.showEnergy=!0,this.flows=null,this._liveEnergy=null,this._liveCards=[],this._liveCardOn=localStorage.getItem("nextfloor.cards")!=="0",this._houseFolded=localStorage.getItem("nextfloor.house_card_folded")==="1";try{this._utilityOverviewVisible=localStorage.getItem("nextfloor.utility_overview")!=="0"}catch{this._utilityOverviewVisible=!0}this.selectedFurniture=null,this.selectedDevice=null,this._sky=0,this.quality="auto",this.showStats=!1,this._stats=null,this._error=null,this._energy=null,this._swipe=null,this._menu=null,this._pluginWindow=null,this._plate=null,this._wallBig=null,this._blend=.6,this._find=null,this._central=!1;try{this._thumbsCompact=localStorage.getItem("nextfloor.thumbs_compact")==="1"}catch{this._thumbsCompact=!1}this._armed=null,this.central=!0,this.buttons=null,this._thumbs=[],this.floorThumbs=!0,this.clean=!1,this.cleanButton=!1,this.clock=null,this.lockButton=!1,this.walkButton=!1,this.travelButton=!1,this._travel=null,this._walking=!1,this._stick=null,this._now=Date.now(),this._locked=(()=>{try{return localStorage.getItem(Yu)==="1"}catch{return!1}})(),this.roomLabels=!0,this.roomNamesButton=!1,this.floorStack="dim",this._low=!1,this.panelOpen=!1,this._narrowStage=!1,this._shortStage=!1,this._phoneStage=!1,this.alerts=!0,this.alertJump=!1,this.announcements=!1,this.sensorBar=!0,this.screenName=null,this._announcement=null,this._alerts=[],this.scenes=!0,this._sceneFired=null,this.dimmed=!1,this.autoOrbit=!1,this.startView=null,this.outsideOpen=!1,this.holograms=null;try{this._flows=localStorage.getItem("nextfloor.flows")==="1"}catch{this._flows=!1}}connectedCallback(){super.connectedCallback(),this.stopPlugins=Ft(()=>{this.pluginsDirty=!0,this.requestUpdate()}),this.hasUpdated&&(this.observeStage(),this.viewer||this.start())}disconnectedCallback(){super.disconnectedCallback(),this.hydronicGeneration++,this.hydronicModule?.closeHydronic(),this.stopPlugins?.(),this.stopPlugins=null,this.listenToAnnouncements(!1),this.resizeObs?.disconnect(),this.resizeObs=null,clearInterval(this.alertTimer),this.alertTimer=void 0,clearInterval(this.contactTimer),this.contactTimer=void 0,clearInterval(this.clockTimer),this.clockTimer=void 0,clearInterval(this.travelTimer),this.travelTimer=void 0,this.live=null,this.viewer?.dispose(),this.viewer=null}firstUpdated(){this.observeStage(),this.start()}observeStage(){let e=this.renderRoot.querySelector(".nf-stage");!e||this.resizeObs||typeof ResizeObserver!="function"||(this.resizeObs=new ResizeObserver(t=>{let r=t[0]?.contentRect,i=(r?.width??1e3)<700||(r?.height??1e3){this._central&&!this.centralOpen&&!r.target?.closest?.(".nf-central, .nf-central-btn")&&(this._central=!1)}),this.viewer=e.createViewer(t,{quality:this.quality,explode:this.explode,onRoomTap:(r,i)=>this.fire("room-tap",{floorId:r,roomId:i}),onFloorTap:r=>this.fire("floor-tap",{floorId:r}),floorInfo:r=>r.rooms.length===1?M(this.hass,"floor_rooms_one"):M(this.hass,"floor_rooms",{n:r.rooms.length}),onBack:()=>this.fire("back",{}),onDeviceTap:(r,i,o)=>this.onDeviceTap(r,i,o),onDeviceHold:(r,i,o)=>this.onDeviceHold(r,i,o),onRoomDoubleTap:(r,i)=>this.onRoomDoubleTap(r,i),onDeviceSwipe:(r,i,o,s,a)=>this.onDeviceSwipe(r,i,o,s,a),onFurnitureSelect:r=>this.fire("furniture-select",{id:r}),onFurnitureMove:(r,i,o)=>this.fire("furniture-move",{id:r,x:i,z:o}),onDeviceSelect:r=>this.fire("device-select",{id:r}),onDeviceMove:(r,i,o)=>this.fire("device-move",{id:r,x:i,z:o}),onStats:r=>{this.showStats&&(this._stats=r)}}),this.viewer.setWallMode(this.wallMode),this.viewer.setPaintedWalls(this.solidWalls),this.viewer.setGlassWalls((this.glassWalls??20)/100),this.viewer.setTheme(this.theme),this.viewer.setAccent(this.accent??null),this.viewer.setFurnitureColors(this.furnitureColors??null),this.viewer.setNotePhotos(r=>this.hass?as(this.hass,r,i=>this.storedPicture(this.hass,i)):null),this.viewer.setNavigationLocked(this._locked),this.viewer.setFurnishMode(this.furnish),this.viewer.setTapInRoom(this.tapInRoom),this.viewer.setSurfaceGrab(this.surfaceGrab??null),this.viewer.setFurnishTypes(this.furnishTypes??null),this.viewer.setFloorStack(this.floorStack),this.viewer.setStats(this.showStats),this.viewer.setAutoOrbit(this.autoOrbit?.06:0),this.viewer.setKeepRoof(this.keepRoof),this.viewer.setKeepCamera(!!this.keepCamera),this.viewer.setPlain(!!this.plain),this.viewer.setRightBack(!!this.rightBack),this.viewer.setZoom(this.zoom??1),this._low=this.viewer.low,this.viewer.setMeshSource(r=>this.hass?.fetchWithAuth?this.hass.fetchWithAuth(`/api/nextfloor/mesh/${encodeURIComponent(r)}`).then(i=>i.ok?i.arrayBuffer():null):Promise.resolve(null)),this.viewer.setPacks([...Wi()]),this.shownPacks=or(),this.building&&(this.shownStartView=JSON.stringify(this.startViewOf()),this.viewer.setStartView(this.startViewOf()),this.viewer.setBuilding(this.shownBuilding(this.hass)),this.viewer.setMap(this.building.settings.map,this.building.settings.north??0)),this.scheduleThumbs(),this.syncDevices(!0),this.viewer.setFloor(this.floorId,!1),this.roomId&&this.viewer.selectRoom(this.roomId)}catch(e){this._error=String(e)}finally{this.starting=!1}}}updated(e){(e.has("announcements")||e.has("hass")&&this.announcements&&!this.stopAnnouncements)&&this.listenToAnnouncements(this.announcements&&!!this.hass&&this.isConnected),e.has("hass")&&this.live?.el&&(this.live.el.hass=this.hass);let t=this._pluginWindow?.node;e.has("hass")&&t&&"hass"in t&&(t.hass=this.hass),this._central&&!this.centralOpen&&(e.has("roomId")&&e.get("roomId")!==void 0||e.has("floorId")&&e.get("floorId")!==void 0)&&(this._central=!1),e.has("centralOpen")&&this.centralOpen&&(this._central=!0),e.has("clock")&&(clearInterval(this.clockTimer),this.clockTimer=this.clock?setInterval(()=>this._now=Date.now(),1e4):void 0);let r=this.viewer;if(!r)return;if(this.shownPacks!==or()&&(this.shownPacks=or(),r.setPacks([...Wi()]),this.hass&&this.building&&r.setParked(No(this.hass,this.building)),this.syncDevices(!0)),e.has("building")&&this.building){let s=JSON.stringify(this.startViewOf()),a=this.shownStartView!==void 0&&this.shownStartView!==s;this.shownStartView=s,r.setStartView(this.startViewOf()),r.setBuilding(this.shownBuilding(this.hass)),r.setMap(this.building?.settings.map,this.building?.settings.north??0),a&&this.floorId===null&&r.resetView()}e.has("startView")&&e.get("startView")!==void 0&&(r.setStartView(this.startViewOf()),this.floorId===null&&r.resetView()),(e.has("building")||e.has("theme")||e.has("floorThumbs")||e.has("packs"))&&this.scheduleThumbs();let i=this.markersOutside?["markersOutside","floorId","roomId"]:["markersOutside"],o=this.pluginsDirty||["building","markerMode","heatMode","flows","alerts","dimmed","holograms","roomLabels","floorId","roomId",...i].some(s=>e.has(s));if(this.pluginsDirty=!1,(o||e.has("hass"))&&this.syncDevices(o),e.has("autoOrbit")&&r.setAutoOrbit(this.autoOrbit?.06:0),(e.has("_thumbs")||e.has("_narrowStage")||e.has("_phoneStage"))&&r.setLabelInset(this._thumbs.length&&!this._phoneStage?this.narrowThumbs?136:184:0),e.has("floorId")&&r.setFloor(this.floorId),e.has("roomId")&&(this.roomId||e.get("roomId"))&&r.selectRoom(this.roomId),e.has("outsideOpen")&&e.get("outsideOpen")!==void 0){let s=this.building?.settings.outside_view;this.outsideOpen&&s?r.showView(s):!this.outsideOpen&&s&&this.floorId===null&&!this.roomId&&r.resetView()}e.has("tapInRoom")&&r.setTapInRoom(this.tapInRoom),e.has("wallMode")&&r.setWallMode(this.wallMode),e.has("solidWalls")&&r.setPaintedWalls(this.solidWalls),e.has("glassWalls")&&r.setGlassWalls((this.glassWalls??20)/100),e.has("explode")&&r.setExplode(this.explode),e.has("keepRoof")&&r.setKeepRoof(this.keepRoof),e.has("keepCamera")&&r.setKeepCamera(!!this.keepCamera),e.has("plain")&&r.setPlain(!!this.plain),e.has("rightBack")&&r.setRightBack(!!this.rightBack),e.has("zoom")&&r.setZoom(this.zoom??1),e.has("floorStack")&&r.setFloorStack(this.floorStack),e.has("theme")&&r.setTheme(this.theme),e.has("_locked")&&r.setNavigationLocked(this._locked),e.has("accent")&&r.setAccent(this.accent??null),e.has("furnitureColors")&&r.setFurnitureColors(this.furnitureColors??null),e.has("surfaceGrab")&&r.setSurfaceGrab(this.surfaceGrab??null),e.has("furnishTypes")&&r.setFurnishTypes(this.furnishTypes??null),e.has("furnish")&&(r.setFurnishMode(this.furnish),this.syncDevices(!0)),e.has("selectedFurniture")&&r.selectFurniture(this.selectedFurniture),e.has("selectedDevice")&&r.setSelectedDevice(this.selectedDevice),(e.has("weather")||e.has("weatherEntityId")||e.has("weatherDensity")||e.has("timeOfDay"))&&this.syncDevices(!0),e.has("quality")&&e.get("quality")!==void 0&&(r.setQuality(this.quality),this._low=r.low),e.has("showStats")&&r.setStats(this.showStats),e.has("building")&&(this.findIndex=null)}shownFor=null;framePictureData=new Map;framePictures(e,t){let r=[];for(let i of t.floors)for(let o of i.notes??[])o.photo?.startsWith("image:")&&this.storedPicture(e,o.photo.slice(6));for(let i of t.floors)for(let o of i.furniture){if(!o.picture||!je(e,o))continue;let s=as(e,o.picture,a=>this.storedPicture(e,a));s&&r.push({furnitureId:o.id,floorId:i.id,url:s,border:o.picture_border??0,fit:o.picture_fit==="contain"?"contain":"cover"})}return r}storedPicture(e,t){let r=this.framePictureData.get(t);return r!==void 0?r||null:(this.framePictureData.set(t,""),Ws(e,t).then(i=>{this.framePictureData.set(t,i),this.syncDevices(!0)}).catch(()=>{}),null)}shownBuilding(e){let t=this.building,r=po(e,t),i=t.floors.filter(a=>a.layer&&this.hiddenLayers.has(a.id)).map(a=>a.id),o=[...r,...i.map(a=>`layer:${a}`)].join(",");if(this.shownFor?.building===t&&this.shownFor.key===o)return this.shownFor.shown;let s=wl(t,r);return this.shownFor={building:t,key:o,shown:i.length?{...s,floors:s.floors.filter(a=>!i.includes(a.id))}:s},this.shownFor.shown}hiddenLayers=(()=>{try{return new Set(JSON.parse(localStorage.getItem("nextfloor.hidden_layers")??"[]"))}catch{return new Set}})();toggleLayer(e){this.hiddenLayers.has(e)?this.hiddenLayers.delete(e):this.hiddenLayers.add(e);try{localStorage.setItem("nextfloor.hidden_layers",JSON.stringify([...this.hiddenLayers]))}catch{}this.viewer&&this.building&&this.viewer.setBuilding(this.shownBuilding(this.hass)),this.requestUpdate()}renderLayers(){let e=(this.building?.floors??[]).filter(t=>t.layer);return!e.length||this.clean?f:p`
${e.map(t=>p``)}
`}syncDevices(e){let t=this.viewer,r=this.building;if(!t||!r||!this.hass)return;let i=this._travel,o=i&&!i.loading?qt(this.hass,i.history,i.t):this.hass;if((e||!this.openingLinks||this.linkedRegistry!==o.entities)&&(this.openingLinks=Ve(o,r.floors),this.furnitureLinks=Ge(o,r.floors),this.linkedRegistry=o.entities,this.findIndex=null,this.alertSrc=this.alerts?Ic(o,r,this.weatherEntityId,this.openingLinks):null,this.watched=Vc({hass:o,building:r,openingLinks:this.openingLinks,furnitureLinks:this.furnitureLinks,needsRoomSensors:this.heatMode!=="none"||this.roomLabels,alertSources:this.alertSrc,weatherEntityId:this.weatherEntityId}),e=!0),!(e||this.watched.some(v=>this.shownStates.get(v)!==o.states[v])))return;po(o,r).join(",")!==this.shownFor?.key&&t.setBuilding(this.shownBuilding(o)),this.shownStates=new Map(this.watched.map(v=>[v,o.states[v]])),this.syncHydronics(t,r,o),this.refreshToday(r),this.refreshForecast(r);let a=Mn(o,r),l=al(o,r.floors.some(v=>v.layer&&this.hiddenLayers.has(v.id))?this.shownBuilding(o):r);this.placementInfo=new Map(l.map(v=>[v.id,{floorId:v.floorId,roomId:v.roomId,x:v.x,z:v.z,y:v.y,rotation:v.rotation??0}]));let c=this.furnitureMarkers(o,r,new Set(l.map(v=>v.id)),new Set(a.map(v=>v.powerEntity)));a.push(...c.consumers);let u=An(o,r,a,Ye(r,v=>this.furnitureLinks?.get(v.id)?.power??null)),h=new Map(a.filter(v=>v.id!==v.powerEntity).map(v=>[v.id,v.power]));this.confirmSet=vt(o,r.floors);let m=new Set(this.liveCardsOn?this._liveCards.flatMap(v=>v.kind==="media"?[v.media.entity]:v.kind==="car"?[v.spot]:[]):[]);for(let v of r.floors)for(let k of v.outdoor??[]){if(!k.area_id&&!k.temp_entity&&!k.pump_entity)continue;let K=k.temp_entity?o.states[k.temp_entity]:void 0,F=k.pump_entity?o.states[k.pump_entity]:void 0,[V,be]=Fe(k.points),dt=K&&Number.isFinite(Number(K.state))?`${L(o,ue(o,_r(Number(K.state),K.attributes.unit_of_measurement)),1)} ${ie(o)}`:"",At=!!F&&ne(F);l.push({id:k.area_id?`outdoor:${k.id}`:k.pump_entity??k.temp_entity,floorId:v.id,roomId:null,x:V,z:be,y:dr(v,k,V,be)+.7,icon:He(k.type==="pool"?"pool":k.type==="terrace"?"table-chair":"tree-outline"),name:k.area_id&&o.areas?.[k.area_id]?.name||M(o,`out_${k.type}`),text:[dt,At?M(o,"pool_pump_on"):""].filter(Boolean).join(" \xB7 "),active:At,unavailable:!1,glow:null,show:"always"})}let d=new Map;for(let v of r.floors){for(let k of v.placements)k.pin_offset&&d.set(`${v.id}:${k.entity_id}`,k.pin_offset);for(let k of v.furniture)k.pin_offset&&d.set(`f:${k.id}`,k.pin_offset)}let g=v=>{let k=v.lamp?void 0:(v.furnitureId?d.get(`f:${v.furnitureId}`):void 0)??d.get(`${v.floorId}:${v.id}`);return k?{...v,x:v.x+(k.x??0),z:v.z+(k.z??0),y:v.y+(k.y??0)}:v};t.setDevices([...[...l,...c.markers].map(g).map(v=>{let k=v.show==="no_power"||"energyDevice"in v&&v.energyDevice?null:h.get(v.id)??null,K={...v,power:k,powerText:k===null?void 0:me(o,k),effect:this.dimmed?void 0:v.effect,text:this.subMeterText(o,r,u,v.furnitureId)??v.text},F=v.ownName&&(v.showName||this.markerNames)?v.ownName:"",V=m.has(v.id)||!!v.furnitureId&&m.has(v.furnitureId);return{...K,pin:this.showPin(K)&&!V,full:v.show==="always",caption:F}})]),t.setPickTargets(c.targets,this.openingTargets(),this.secondBlinds()),t.setScreens(c.screens),t.setFridgeDoors(Ba(o,r.floors)),t.setCovers(Xa(o,r)),t.setRobots(this.robotInfos(o,r));let _=new Map;for(let v of r.floors)for(let k of v.furniture)!ee(k.type)?.pet||!k.room_sensor||k.room_sensor==="none"||_.set(k.id,eo(o,v.rooms.filter(K=>K.points.length>=3),null,k.room_sensor)?.id??null);_.size&&t.setPetRooms(_),t.setRoofWindows(Tc(o,r)),t.setParked(No(o,r)),t.setGateStates(Zc(o,r));let b=new Map(r.floors.flatMap(v=>v.openings.map(k=>[k.id,k.type]))),y=new Map([...this.openingLinks].map(([v,k])=>[v,Ke(o,k,b.get(v))]));t.setOpeningStates(y),this.setAlerts(this.alertSrc?Po(o,r,this.alertSrc,this.openingLinks):[]),this.watchLostContacts(o);let $=[...l,...c.markers].map(v=>`${v.id}:${v.glow?`${v.glow.level.toFixed(1)}/${v.glow.color.map(k=>k.toFixed(1)).join("/")}`:0}`).join(";")+"|"+[...y].map(([v,k])=>`${v}:${k.open}:${k.cover===null?"-":k.cover.toFixed(1)}`).join(";");if($!==this.thumbSig){let v=this.thumbSig==="";this.thumbSig=$,v||this.scheduleThumbs(1500)}let S=cu(o,r,a,r.energy.advanced?v=>this.furnitureLinks?.get(v.id)?.power??null:void 0),A=this.liveCars(o,r);for(let v of A){if(!v.car.home||!v.car.charging&&!v.car.plugged)continue;let k=r.floors.flatMap(V=>V.furniture.filter(be=>be.type==="wallbox").map(be=>({floorId:V.id,x:be.x,z:be.z,y:1}))).sort((V,be)=>Math.hypot(V.x-v.at.x,V.z-v.at.z)-Math.hypot(be.x-v.at.x,be.z-v.at.z))[0],K=k&&k.floorId===v.at.floorId&&Math.hypot(k.x-v.at.x,k.z-v.at.z)<9,F=k??On(r);!F||!v.car.charging&&!K||S.arcs.push({key:`car:${v.spot}`,from:F,to:{...v.at,y:.8},power:v.car.charging?v.car.chargingW??7e3:0,color:[80,175,255],...K?{via:[{...F,y:.35},{floorId:v.at.floorId,x:(F.x+v.at.x)/2,z:(F.z+v.at.z)/2,y:.08},{...v.at,y:.5}],cable:!0}:{}})}let z=On(r);for(let v of this.liveHeatPumps(r)){let k=v.pump.heat??(v.pump.mode==="heating"||v.pump.mode==="water"?(v.pump.power??0)*(v.pump.cop??3):0);z&&k>100&&v.pump.mode!=="cooling"&&S.arcs.push({key:`heat:${v.id}`,from:{floorId:v.floorId,x:v.x,z:v.z,y:.8},to:z,power:k,color:[255,120,40]})}let x=(this.flows??this._flows)&&!this.dimmed;t.setLiveEnergy(x?S.arcs:[],x?S.sparks:[]),JSON.stringify(S)!==JSON.stringify(this._liveEnergy)&&(this._liveEnergy=S);let T=this.liveMedia(o,r).filter(v=>v.playing&&!this.dimmed);t.setLiveSound(T.filter(v=>v.rings>0).map(v=>({id:v.entity,at:v.at,color:v.color,level:v.volume??.5,size:v.rings})),Ec(T).map(([v,k])=>[v.at,k.at])),this.syncLhCards(t,r,S,A,T,o),t.setLiveScreens(this.dimmed?[]:Fc(o,r,this.furnitureLinks)),t.setPictures(this.framePictures(o,r)),t.setLiveWater(this.dimmed?[]:Rc(o,r,this.furnitureLinks));let R=hc(o,r);t.setPersons(R);let E=mc(o,r,this.openingLinks,R);t.setFloorInfo(new Map([...E].map(([v,k])=>[v,pc(o,k)])));let I=o.config,N=this.timeOfDay!=null&&I?.latitude!==void 0&&I.longitude!==void 0?_t(zt(this.timeOfDay,I.time_zone),I.latitude,I.longitude):Dc(o);t.setSun(N),t.setLocation(I?.latitude!==void 0&&I.longitude!==void 0?{latitude:I.latitude,longitude:I.longitude,zone:I.time_zone}:null);let G=this.weather&&!this.dimmed?Yc(o,lt(o,this.weatherEntityId??r.settings.weather_entity)):null,q=G?Jc(Qc(G,r.settings.weather_effects),this.weatherDensity):null;this.cloud=q?.cloud??0,this._sky=Hc(N?.elevation??null,this.cloud),t.setSky(this.weather&&!this.dimmed?{weather:q,sun:N,north:r.settings.north??0,sky:this.skyColor(),disc:(r.settings.weather_effects??["sky"]).includes("sky"),low:this._low}:null),this.applyTint();let oe=u.grid!==null||u.solar!==null||u.battery!==null||u.tariff!==null?u:null;JSON.stringify(oe)!==JSON.stringify(this._energy)&&(this._energy=oe)}watchLostContacts(e){let t=!!this.alertSrc&&!this._travel&&Nc(e,this.alertSrc);t&&!this.contactTimer&&(this.contactTimer=setInterval(()=>{let r=this.building;this.alertSrc&&r&&this.hass&&this.openingLinks&&!this._travel&&this.setAlerts(Po(this.hass,r,this.alertSrc,this.openingLinks))},6e4)),!t&&this.contactTimer&&(clearInterval(this.contactTimer),this.contactTimer=void 0)}setAlerts(e){let t=e.map(o=>`${o.kind}:${o.entity}`),r=e.filter((o,s)=>!this.seenAlerts.has(t[s])&&!Qr.has(o.kind));this.seenAlerts=new Set(t),t.join()!==this._alerts.map(o=>`${o.kind}:${o.entity}`).join()&&(this._alerts=e);let i=e.some(o=>!Qr.has(o.kind));i&&!this.alertTimer&&(this.alertTimer=setInterval(()=>!document.hidden&&this.applyTint(),this._low?200:100)),!i&&this.alertTimer&&(clearInterval(this.alertTimer),this.alertTimer=void 0),r.length&&this.alertJump&&this.jumpTo(r[0])}jumpTo(e){if(e.kind==="own"&&e.tap!=="room"){e.tap==="toggle"&&W(this.hass,e.entity)?this.hass.callService("homeassistant","toggle",{entity_id:e.entity}):Se(this,e.entity);return}if(!e.floorId){this.fire("floor-tap",{floorId:null});return}this.floorId!==e.floorId&&this.fire("floor-tap",{floorId:e.floorId}),e.roomId&&setTimeout(()=>this.fire("room-tap",{floorId:e.floorId,roomId:e.roomId}),60)}onRoomDoubleTap(e,t){let r=this.building,i=this.hass,o=r?.floors.find(u=>u.id===e),s=o?.rooms.find(u=>u.id===t);if(!r||!i||!o||!s)return;let a=Kc(r.settings.room_double_tap,this.roomDoubleTap),l=Gc(i,o,s,this.furnitureLinks,this.confirmSet,a).filter(u=>W(i,u));if(!l.length)return;let c=l.some(u=>i.states[u]?.state==="on");i.callService("homeassistant",c?"turn_off":"turn_on",{entity_id:l}),this.roomFlash={roomId:t,until:performance.now()+350},this.applyTint(),setTimeout(()=>{this.roomFlash=null,this.applyTint()},380)}runScene(e){W(this.hass,e)&&(this.hass.callService(e.split(".")[0],"turn_on",{entity_id:e}),this._sceneFired=e,setTimeout(()=>this._sceneFired=null,600))}applyTint(){let e=this.viewer,t=this.building,r=this.hass;if(!e||!t||!r)return;let i=null;if(this.heatMode!=="none"&&this.heatMode!=="values"&&this.heatMode!=="wifi"){let a=this.heatMode,l=nc(r,t,a);!l.size!=!this.heatValues.size&&this.requestUpdate(),this.heatValues=l;let c=xt(new Date,r.config?.latitude??50);i=new Map([...l].map(([u,h])=>[u,tc(a,h,c)]))}let o=new Map;if(this.heatMode==="values")for(let a of t.floors)for(let l of a.rooms){let c=Y(r,a,l,"temperature"),u=Y(r,a,l,"humidity"),h=Y(r,a,l,"co2"),m=Kr(h,u,jt(c,u)),d=[c!==null?`${L(r,ue(r,c),1)} ${ie(r)}`:null,u!==null?`${L(r,u,0)} %`:null,h!==null?`${L(r,h,0)} ppm`:null,m?`\u{1F4A8} ${M(r,`air_${m}`)}`:null].filter(g=>!!g);d.length&&o.set(l.id,d.join(" \xB7 "))}if(e.setRoomInfo(o),!i)for(let a of t.floors)for(let l of a.rooms){let c=l.floor_heating?r.states[l.floor_heating]:void 0;c&&(B(r)?ce(c)===!0:c.entity_id.startsWith("climate.")?c.attributes.hvac_action==="heating":c.state==="on"||c.state==="open")&&(i??=new Map).set(l.id,[.55,.24,.08])}if(this._alerts.length){i??=new Map;let a=.55+.45*Math.sin(performance.now()/160);for(let l of this._alerts){if(Qr.has(l.kind))continue;let c=Lc(l.kind).map(u=>u*a);if(l.roomId)i.set(l.roomId,c);else for(let u of t.floors)for(let h of u.rooms)i.set(h.id,c)}}this.roomFlash&&performance.now()`${a}:${l.map(c=>c.toFixed(2)).join(",")}`).join(";"):"";s!==this.tintSig&&(this.tintSig=s,e.setRoomTint(i))}furnitureMarkers(e,t,r,i){let o=[],s=[],a=new Map,l=new Map,c=$n(t);for(let m of t.floors)if(!(m.layer&&this.hiddenLayers.has(m.id)))for(let d of m.furniture){if(!je(e,d))continue;let g=this.furnitureLinks.get(d.id),_=this.stateFaces(e,d);_.length&&a.set(d.id,{color:_[0].color,level:_[0].level,faces:_});let b=ar(d.type);if(b&&d.care_entity){let k=this.careMarker(e,m,d,b,d.care_entity);k&&(o.push(k.marker),k.glow&&a.set(d.id,{color:k.glow,level:.9,faces:[{part:"all",color:k.glow,level:.9}]}),l.set(d.id,d.care_entity));continue}let y=ee(d.type);if(d.cover_entity&&sr(y)&&l.set(d.id,d.cover_entity),y?.gangs){for(let K of(d.gang_entities??[]).slice(0,y.gangs)){let F=K&&K!=="none"?we(e,K):null,V=F?Z(e.states[F]):null;F&&V!==null&&!i.has(F)&&(i.add(F),s.push({id:K,powerEntity:F,floorId:m.id,x:d.x,z:d.z,power:Math.max(0,V)}))}let k=Za(e,(d.gang_entities??[]).slice(0,y.gangs),/socket/.test(d.type));k.length&&a.set(d.id,{color:k[0].color,level:k[0].level,gangs:k}),ro(d.gang_entities,y.gangs).length&&l.set(d.id,`gang:${d.id}`);continue}if(mr(d.type)){let k=this.lampMarker(e,m,d,g?.entity??null),K=g?.power?Z(e.states[g.power]):null;if(g?.power&&K!==null&&(K>=1&&(k.text=k.text?`${k.text} \xB7 ${kt(e,K)}`:kt(e,K)),i.has(g.power)||(i.add(g.power),s.push({id:k.id,powerEntity:g.power,floorId:m.id,x:d.x,z:d.z,power:Math.max(0,K)}))),o.push(k),d.type==="ceiling_fan"){let F=g?.fan?e.states[g.fan]:void 0;k.spin=Bu(F),F&&!r.has(F.entity_id)&&(r.add(F.entity_id),o.push({...k,id:F.entity_id,y:Math.max(.5,k.y-.3),icon:d.icon?He(d.icon):Lt("fan"),name:d.name||O(e,F.entity_id),text:lg(e,F),active:ne(F),unavailable:C(F),glow:null,lamp:null,spin:void 0,pickable:void 0,effect:void 0}))}continue}let $=Xi(d.type)?La(e,d,k=>`${L(e,ue(e,k),1)} ${ie(e)}`):null,S=Xi(d.type)?null:Wa(e,d.temp_entity),A=S===null?"":`\u{1F321} ${L(e,ue(e,S),1)} ${ie(e)}`,z=d.type==="home_battery"?d.soc:d.type==="wallbox"?d.status:$?d.temp_entity&&d.temp_entity!=="none"?d.temp_entity:d.temp_entity2:S!==null?d.temp_entity:null,x=z&&z!=="none"?z:(d.values??[]).find(k=>k.entity&&k.entity!=="none")?.entity??null,D=g??(x?{entity:null,power:null}:void 0);if(!D)continue;let T=d.type==="home_battery"?x??D.entity??D.power:D.entity??D.power??x;l.set(d.id,T);let R=D.entity?e.states[D.entity]:void 0,E=c.has(d.id),I=E?!!d.meter_invert:d.type==="meter"?t.energy.grid_invert&&!d.export:d.type==="home_battery"?t.energy.battery_invert&&!d.charge:!1,N=D.power?Z(e.states[D.power],I):null,G=d.type==="home_battery"&&d.charge&&d.charge!=="none"?d.charge:d.type==="meter"&&!E&&d.export&&d.export!=="none"?d.export:null,q=G?Z(e.states[G]):null;q!==null&&(N=Math.max(0,N??0)-Math.max(0,q)),D.power&&N!==null&&!i.has(D.power)&&(i.add(D.power),s.push({id:T,powerEntity:D.power,floorId:m.id,x:d.x,z:d.z,power:Math.max(0,N),wallbox:d.type==="wallbox"||void 0}));let J=(N??0)>10||R?.state==="on"||R?.state==="running"||gr(R)&&ne(R);if((d.type==="radiator"||y)&&R&&P(R.entity_id)==="climate"){let k=R.attributes;if(k.hvac_action==="heating"){let K=typeof k.temperature=="number"&&typeof k.current_temperature=="number"?k.temperature-k.current_temperature:1,F=!!y&&!y.parts.some(V=>V.screen);a.set(d.id,{color:[1,.42,.1],level:Math.min(1,.45+.25*Math.max(0,K)),heat:F||void 0})}}else(d.type==="washer"||d.type==="dryer"||d.type==="dishwasher")&&J?a.set(d.id,{color:[.3,.85,1],level:.8}):y&&J&&!y.light&&y.parts.some(k=>k.glow||k.screen)&&a.set(d.id,{color:[.3,.85,1],level:.8,leds:!0});if(Qo(d.type)){let k=Jo(e,D.entity??D.power);if(k&&k.progress!==null&&(k.printing||/pause/.test(k.status))){let K=k.filaments[0]??"#38bdf8",F=[1,3,5].map(V=>parseInt(K.slice(V,V+2),16)/255);a.set(d.id,{color:F,level:.9,print:Math.max(.02,k.progress/100)})}}if(d.type==="home_battery"&&x){let k=Number(e.states[x]?.state);Number.isFinite(k)&&a.set(d.id,{color:k>60?[.29,.87,.5]:k>25?[.98,.8,.08]:[.97,.44,.44],level:.95,fill:k/100})}if(R&&xr(d.type)){let k=P(R.entity_id)==="light"?Be(R):null,K=P(R.entity_id)==="media"&&["playing","on","paused","idle"].includes(R.state),F=k?k.color:ne(R)||K?[.22,.88,1]:null;F&&a.set(d.id,{color:F,level:R.state==="playing"?1:.6,halo:d.ambilight??1})}if(r.has(T))continue;r.add(T);let oe=D.entity?P(D.entity):null,v=m.rooms.find(k=>k.points.length>=3&&H([d.x,d.z],k.points));o.push({id:T,floorId:m.id,roomId:v?.id??null,x:d.x,z:d.z,y:ls(d)+se(m,d),icon:d.icon?He(d.icon):Lt(oe??"switch"),name:d.name||(D.entity?O(e,D.entity):le(e,d.type)),ownName:d.name||void 0,showName:!!d.show_name,text:[$?$.text:d.type==="home_battery"?this.batteryText(e,x,N):d.type==="wallbox"?this.wallboxText(e,x,N):d.type==="meter"?E?N===null?"":me(e,N):this.meterText(e,N):R&&(d.type==="washer"||d.type==="dryer"||d.type==="dishwasher")&&J&&oo(e,vn(e,D.entity??D.power))!==null?M(e,"care_time_left",{time:Qa(oo(e,vn(e,D.entity??D.power)))}):R?[ae(e,R),N!==null&&N>5&&!gr(R)?me(e,N):""].filter(Boolean).join(" \xB7 "):N!==null?me(e,Math.max(0,N)):"",A,wn(e,d.values)].filter(Boolean).join(" \xB7 "),active:$?.warm||S!==null&&S>=Oa||(R?ne(R):(N??0)>5),unavailable:R?C(R):!1,glow:null,furnitureId:d.id,energyDevice:d.type==="inverter"||d.type==="home_battery"||d.type==="wallbox"||d.type==="meter",readout:!!$||!!d.values?.some(k=>k.entity&&k.entity!=="none")||void 0,show:d.marker??void 0,fromFurniture:!0})}let u=this.heatMode==="wifi";for(let m of o){let d=m.furnitureId?t.floors.flatMap(_=>_.furniture).find(_=>_.id===m.furnitureId):void 0;if(!d||!Xo(d.type))continue;let g=es(e,this.furnitureLinks.get(d.id)?.entity??this.furnitureLinks.get(d.id)?.power??null);g&&(g.clients!==null&&(m.text=M(e,"wifi_clients",{n:g.clients})),u&&(m.wedge={angle:360,reach:9,near:0,color:Mu(g),opacity:.4,through:!0,walls:!1},m.show="always"))}let h=Uc(t,o);for(let m of t.floors.flatMap(d=>d.furniture))st(m.type)&&l.set(m.id,`hydronic:${m.id}`);this.tapPins=h.pins;for(let m of t.floors.flatMap(d=>d.furniture))m.tap?.action&&l.set(m.id,`tap:${m.id}`);for(let{floor:m,item:d}of h.bare){let g=m.rooms.find(b=>b.points.length>=3&&H([d.x,d.z],b.points)),_=d.name||le(e,d.type);o.push({id:`tap:${d.id}`,floorId:m.id,roomId:g?.id??null,x:d.x,z:d.z,y:ls(d)+se(m,d),icon:He(d.icon||"gesture-tap-button"),name:_,ownName:d.name||void 0,showName:!!d.show_name,text:"",active:!1,unavailable:!1,glow:null,furnitureId:d.id,show:d.marker??void 0,fromFurniture:!0})}return{markers:o,consumers:s,screens:a,targets:l}}robotObstacles(e,t){let r=new Set(["rug","worktop","table","table_round","coffee_table","chair","office_chair","stool","bar_stool","bench","desk","robot_vacuum","parking","stairwell","radiator","tv_wall","kitchen_wall","led_strip"]);return e.furniture.filter(i=>{if(r.has(i.type)||i.type.startsWith("lamp_")&&i.type!=="lamp_floor"&&i.type!=="lamp_uplight"||i.h<.04||se(e,i)>.12)return!1;let o=ee(i.type);return o&&(o.hole||/table|desk|chair|stool|bench|rug|carpet|mat$/.test(i.type))?!1:H([i.x,i.z],t)||pr(i).some(s=>H(s,t))}).map(i=>pr(i))}robotInfos(e,t){let r=[],i=qu(e),o=Zu(e,i,t.settings.vacuum_map??null),s=!1;for(let a of t.floors){for(let l of a.furniture){if(l.type!=="robot_vacuum")continue;let c=this.furnitureLinks.get(l.id)?.entity??null,u=c?e.states[c]?.state:void 0,h=u==="cleaning"?"cleaning":u==="returning"?"returning":u==="error"?"error":u==="docked"||!u?"docked":"idle",m=l.rotation*Math.PI/180,d=l.d*.14,g=[l.x-Math.sin(m)*d,l.z+Math.cos(m)*d],_=a.rooms.filter(T=>T.points.length>=3),y=(h==="cleaning"?eo(e,_,c,kr(e,c,l.room_sensor)):null)??_.find(T=>H(g,T.points)),$=h==="cleaning"&&y?this.robotObstacles(a,y.points):[],S=i?Date.parse(e.states[i]?.last_updated??""):Number.NaN,A=!Number.isFinite(S)||Date.now()-S<120*1e3,z=c?.startsWith("vacuum.")&&o&&!s&&(A||h!=="cleaning"&&h!=="returning")?o:null;z&&(s=!0);let x=c?Date.parse(e.states[c]?.last_changed??""):Number.NaN,D=h==="cleaning"||h==="returning"?null:Number.isFinite(x)?x:null;r.push({id:l.id,floorId:a.id,rest:g,restHeading:-m,mode:h,room:y?.points??null,roomId:y?.id??null,obstacles:$,track:z?.path??null,pose:z?.pose??null,settledAt:D})}for(let l of a.furniture){if(!/:(robot_mower|mower_dock)$/.test(l.type))continue;let c=this.furnitureLinks.get(l.id)?.entity??null;if(!c?.startsWith("lawn_mower."))continue;let u=e.states[c]?.state,h=u==="mowing"?"cleaning":u==="returning"?"returning":u==="error"?"error":u==="docked"||!u?"docked":"idle",m=[l.x,l.z],d=(a.outdoor??[]).filter(b=>b.type==="lawn"&&b.points.length>=3),g=d.find(b=>H(m,b.points))??[...d].sort((b,y)=>fn(y.points)-fn(b.points))[0],_=g?(a.outdoor??[]).filter(b=>b!==g&&b.type!=="lawn"&&b.points.some(y=>H(y,g.points))).map(b=>b.points):[];r.push({id:l.id,floorId:a.id,rest:m,restHeading:-l.rotation*Math.PI/180,mode:h,room:g?.points??null,roomId:g?.id??null,obstacles:_,y:g?dr(a,g,m[0],m[1]):hr(a),mower:!0})}}return r}batteryText(e,t,r){let i=t?Number(e.states[t]?.state):Number.NaN,o=[];return Number.isFinite(i)&&o.push(`${L(e,i,0)} %`),r!==null&&Math.abs(r)>=10&&o.push(`${r<0?"\u25B2":"\u25BC"} ${me(e,Math.abs(r))}`),o.join(" \xB7 ")}subMeterText(e,t,r,i){let o=i?Hl(t,r,i):null;return o?me(e,o.use)+(o.unmetered===null?"":` \xB7 ${M(e,"meter_unmetered",{w:me(e,o.unmetered)})}`):null}meterText(e,t){return t===null?"":Math.abs(t)<5?me(e,0):`${M(e,t<0?"energy_grid_export":"energy_grid_import")} ${me(e,Math.abs(t))}`}wallboxText(e,t,r){let i=t?e.states[t]:void 0,o=String(i?.state??"").toLowerCase(),s=(r??0)>50||/charg|laden|lädt/.test(o),a=i?.entity_id.startsWith("binary_sensor.")?o==="on":/connect|plug|ready|angesteckt|verbunden|wait|paused|suspend/.test(o),l=s?M(e,"wallbox_charging"):a?M(e,"wallbox_plugged"):i&&!C(i)&&!i.entity_id.startsWith("binary_sensor.")?ae(e,i):"",c=r!==null&&r>50?me(e,r):"";return[l,c].filter(Boolean).join(" \xB7 ")}stateFaces(e,t){let r=[],i=t.state_entity2&&t.state_entity2!=="none"?[[t.state_entity,t.state_split==="top_bottom"?"bottom":"left"],[t.state_entity2,t.state_split==="top_bottom"?"top":"right"]]:[[t.state_entity,"all"]];for(let[o,s]of i){if(!o||o==="none")continue;let a=e.states[o];if(!a||C(a)||!(ne(a)||a.state==="home"||a.state==="occupied"||a.state==="on"))continue;let c=P(o)==="light"?Be(a):null;r.push({part:s,color:c?c.color:[1,.71,.28],level:c?c.level:.85})}return r}careMarker(e,t,r,i,o){let s=e.states[o];if(!s)return null;let a="",l=!1,c=null;if(i==="bin"){let m=Sr(s);a=m===null?ae(e,s):m===0?M(e,"care_bin_today"):m===1?M(e,"care_bin_tomorrow"):M(e,"care_bin_days",{n:m}),l=m!==null&&m<=1,l&&(c=[1,.72,.28])}else if(i==="mail")l=Ya(s),a=M(e,l?"care_mail_yes":"care_mail_no"),l&&(c=[1,.85,.3]);else{let m=Ja(s,r.thirsty_below??20);l=!!m?.thirsty,a=m?Number.isFinite(m.moisture)?`${M(e,l?"care_plant_thirsty":"care_plant_ok")} \xB7 ${Math.round(m.moisture)} %`:M(e,l?"care_plant_thirsty":"care_plant_ok"):ae(e,s),l&&(c=[1,.45,.3])}let u=t.rooms.find(m=>m.points.length>=3&&H([r.x,r.z],m.points)),h={bin:"mdi:trash-can-outline",mail:"mdi:mailbox-outline",plant:"mdi:sprout-outline"}[i];return{glow:c,marker:{id:o,floorId:t.id,roomId:u?.id??null,x:r.x,z:r.z,y:ls(r)+se(t,r),icon:r.icon?He(r.icon):He(h),name:r.name||le(e,r.type),ownName:r.name||void 0,showName:!!r.show_name,text:a,active:l,unavailable:C(s),glow:null,furnitureId:r.id,show:r.marker??void 0,fromFurniture:!0,care:!0}}}lampMarker(e,t,r,i){let o=i?e.states[i]:void 0,s=(r.extra_lights??[]).map(b=>e.states[b]).filter(b=>!!b),a=s.find(b=>ne(b)),l=ee(r.type),c=ga[r.type]??l?.light??"floor",u=t.rooms.some(b=>b.points.length>=3&&H([r.x,r.z],b.points)),h=c==="strip"&&!u?pn(t,r.x,r.z)+(r.mount_y??0):r.mount_y!=null&&!l?r.mount_y:l||c==="wall"||c==="strip"?se(t,r):c==="table"?ur(t,r.x,r.z):c==="bollard"||c==="garden"?pn(t,r.x,r.z):0,m=t.rooms.find(b=>b.points.length>=3&&H([r.x,r.z],b.points)),d=cr(t,r),g=l?l.mount==="ceiling"?Math.max(.5,h-.15):h+r.h+.2:{ceiling:d-.3,downlight:d-.25,spot:d-.35,panel:d-.25,pendant:Math.max(.6,d-r.h-.25),fan:Math.max(.6,d-r.h-.2),floor:h+r.h+.25,uplight:h+r.h+.25,table:h+r.h+.2,wall:h+r.h+.2,strip:r.upright?h+r.w+.15:Math.max(.3,h-.2),bollard:h+r.h+.25,garden:h+r.h+.25}[c],_={id:i??`lamp:${r.id}`,floorId:t.id,roomId:m?.id??null,x:r.x,z:r.z,y:g,icon:Lt("light"),name:r.name||(i?O(e,i):le(e,r.type)),text:[o&&(ne(o)||!a)?ae(e,o):a?O(e,a.entity_id):"",wn(e,r.values)].filter(Boolean).join(" \xB7 "),readout:!!r.values?.some(b=>b.entity&&b.entity!=="none"),active:(o?ne(o):!1)||!!a,unavailable:o?C(o):!1,glow:o||s.length?co(Sa(o,s,r.color_entity&&r.color_entity!=="none"?e.states[r.color_entity]:void 0),r.glow_scale):null,lamp:c,rotation:r.rotation,mirror:!!r.mirror,roll:r.tilt??0,upright:!!r.upright,rise:r.rise??0,size:[r.w,r.d,r.h],base:h,pickable:!!i,furnitureId:r.id,pack:l?r.type:null,lightY:l?l.mount==="ceiling"?h:h+r.h*.85:void 0,ceiling:d,effect:o?.state==="on"?Tr(r,ol(e,r,i)):void 0,variant:r.variant,show:r.marker??void 0,fromFurniture:!0};return o&&i?uo(e,_,o,!1):_}showPin(e){if(this.furnish&&!e.fromFurniture)return!0;if(e.show==="never"||this.markerMode==="none")return!1;if(e.show==="always")return!0;if(e.show==="active"||this.building?.settings.motion_markers_active&&xa(this.hass,e.id)){if(!e.active)return!1;if(e.show==="active")return!0}if(this.markersOutside&&!(this.roomId&&e.roomId===this.roomId))return this.markersOutside.includes(ya(e.id,!!e.lamp));if(this.markerMode==="all")return!0;if(e.lamp)return!1;let t=P(e.id);return t==="light"?!1:e.fromFurniture&&t==="fan"?!0:e.care?e.active:e.id.startsWith("tap:")||e.readout?!0:e.fromFurniture?(e.power??0)>=1||t==="media"&&e.active||!!e.energyDevice&&!!e.text:!0}openingTargets(){let e=new Map;for(let[t,r]of this.openingLinks??[]){let i=r.lock??r.cover??r.contact??r.tilt;i&&e.set(t,i)}return e}downloadStl(){let e=this.viewer?.exportStl(10);if(!e)return;let t=URL.createObjectURL(new Blob([e],{type:"model/stl"})),r=document.createElement("a");r.href=t,r.download=`nextfloor-${new Date().toISOString().slice(0,10)}.stl`,r.click(),setTimeout(()=>URL.revokeObjectURL(t),5e3)}secondBlinds(){let e=new Map;for(let[t,r]of this.openingLinks??[])r.cover2&&!r.lock&&r.cover&&e.set(t,r.cover2);return e}scheduleThumbs(e=600){clearTimeout(this.thumbTimer);let t=this.building?.floors.filter(i=>i.rooms.length).length??0;if(!this.floorThumbs||t<2){this._thumbs=[];return}let r=Math.max(e,this.thumbsAt+(this._low?8e3:4e3)-Date.now());this.thumbTimer=setTimeout(()=>{if(!(!this.viewer||this.dimmed&&this._thumbs.length)){if(document.hidden){this.scheduleThumbs(3e3);return}this.thumbsAt=Date.now(),this._thumbs=this.viewer.floorThumbnails(this.narrowThumbs?104:150,this.narrowThumbs?78:112)}},r)}get narrowThumbs(){return this._narrowStage}renderThumbs(){if(!this._thumbs.length||!this.building||this._phoneStage)return f;let e=new Map(this.building.floors.map(o=>[o.id,o.name])),t=[...this._thumbs].sort((o,s)=>(this.building.floors.find(a=>a.id===s.floorId)?.elevation??0)-(this.building.floors.find(a=>a.id===o.floorId)?.elevation??0)),r=this._thumbsCompact,i=()=>{this._thumbsCompact=!r;try{localStorage.setItem("nextfloor.thumbs_compact",this._thumbsCompact?"1":"0")}catch{}};return p``}onDeviceHold(e,t,r){let i=P(e);i==="light"||i==="cover"||i==="switch"||i==="fan"||i==="lock"?this._menu={entity:e,x:t,y:r}:Se(this,e)}onDeviceSwipe(e,t,r,i,o){let s=this.hass?.states[e];if(t==="start"){if(!s||C(s)||!W(this.hass,e)||this.confirmSet.has(e))return!1;let l=P(e);if(l==="light"&&is(s).dim){let c=s.state==="on"?typeof s.attributes.brightness=="number"?Math.round(s.attributes.brightness/2.55):100:0;return this._swipe={entity:e,kind:"light",start:c,value:c,x:i,y:o},!0}if(l==="fan"&&typeof s.attributes.percentage_step=="number"){let c=s.state==="on"&&typeof s.attributes.percentage=="number"?s.attributes.percentage:0;return this._swipe={entity:e,kind:"fan",start:c,value:c,x:i,y:o},!0}if(l==="cover"&&os(s)){let c=s.attributes.current_position;return this._swipe={entity:e,kind:"cover",start:c,value:c,x:i,y:o},!0}return!1}let a=this._swipe;if(!a||a.entity!==e)return!1;if(t==="move"){let l=Math.round(Math.min(100,Math.max(0,a.start-r/220*100)));l!==a.value&&(this._swipe={...a,value:l});let c=performance.now();c-this.swipeSent>350&&(this.swipeSent=c,this.applySwipe())}else this.applySwipe(),clearTimeout(this.swipeTimer),this.swipeTimer=setTimeout(()=>this._swipe=null,700);return!0}applySwipe(){if(this._swipe&&!W(this.hass,this._swipe.entity))return;let e=this._swipe;!e||!this.hass||(e.kind==="light"?e.value<=0?this.hass.callService("light","turn_off",{entity_id:e.entity}):this.hass.callService("light","turn_on",{entity_id:e.entity,brightness_pct:e.value}):e.kind==="fan"?e.value<=0?this.hass.callService("fan","turn_off",{entity_id:e.entity}):this.hass.callService("fan","set_percentage",{entity_id:e.entity,percentage:e.value}):this.hass.callService("cover","set_cover_position",{entity_id:e.entity,position:e.value}))}openRoom(e,t){this.floorId===e&&this.roomId===t||(this.floorId!==e?(this.fire("floor-tap",{floorId:e}),setTimeout(()=>this.fire("room-tap",{floorId:e,roomId:t}),60)):this.fire("room-tap",{floorId:e,roomId:t}))}goTo(e){if(this._find=null,e.kind==="room"||e.kind==="circuit"){e.roomId&&this.openRoom(e.floorId,e.roomId);return}this.floorId!==e.floorId&&this.fire("floor-tap",{floorId:e.floorId}),setTimeout(()=>this.viewer?.focus(e.floorId,e.x,e.z,e.y,e.entity),120)}listenToAnnouncements(e){if(!e){this.stopAnnouncements?.(),this.stopAnnouncements=null,clearTimeout(this.announceTimer);return}if(this.stopAnnouncements)return;let t=!1;this.stopAnnouncements=()=>t=!0,gl(this.hass,r=>this.announce(r)).then(r=>{t?r():this.stopAnnouncements=r})}announce(e){let t=e;if(t?.reload===!0){(!t.template||t.template===this.templateName)&&setTimeout(()=>location.reload(),500+Math.random()*6e3);return}if(typeof e?.message!="string"||!e.message.trim()||!hl(e,this.screenName)||!ml(e))return;let r=pl(e.message);this._announcement={message:e.message,until:Date.now()+r},clearTimeout(this.announceTimer),this.announceTimer=setTimeout(()=>this._announcement=null,r),fl(this.hass,e)}renderAnnouncement(){let e=this._announcement;return e?p``:f}renderAlerts(){let e=this.building;if(!this._alerts.length||!e)return f;let t=this._alerts.slice(0,3);return p``}renderScenes(){let e=this.building;if(!this.scenes||!this.roomId||this.panelOpen||!e||!this.hass)return f;let t=e.floors.flatMap(o=>o.rooms).find(o=>o.id===this.roomId),r=t?j(this.hass,t).filter(o=>P(o)==="scene"||P(o)==="script").slice(0,6):[];if(!r.length)return f;let i=t?.area_id?this.hass.areas?.[t.area_id]?.name:void 0;return p`
${r.map(o=>p``)}
`}renderFind(){let e=this.building;if(!e||!this.hass)return f;if(this._find===null)return p``;let t=Cu(this.findIndex??=Iu(this.hass,e),this._find);return p`
this._find=r.target.value} @keydown=${r=>{r.key==="Escape"&&(this._find=null),r.key==="Enter"&&t[0]&&this.goTo(t[0])}} /> ${this._find.trim()?p`
${t.length?t.map(r=>p``):p`

${M(this.hass,"find_none")}

`}
`:f}
`}renderCentral(){let e=this.building,t=this.hass;if(!e||!t||!this.central||this._find!==null)return f;let r=(b,y)=>M(t,b,y),i=p``;if(!this._central)return i;let o=this.floorId?e.floors.find(b=>b.id===this.floorId):void 0,s=o?[o]:e.floors,a=s.flatMap(b=>to(t,b).lights).filter(b=>W(t,b)),l=s.flatMap(b=>to(t,b).covers).filter(b=>W(t,b)),c=a.filter(b=>t.states[b]?.state==="on").length,u=!o,h=(b,y,$,S)=>{if(S.length){if(u&&this._armed!==b){this._armed=b,clearTimeout(this.armTimer),this.armTimer=setTimeout(()=>this._armed=null,3500);return}this._armed=null,t.callService(y,$,{entity_id:S})}},m=(b,y,$,S,A)=>p``,d=e.settings.favorite_floors??{},g=(e.settings.favorites??[]).filter(b=>t.states[b]&&(!d[b]||!o||d[b]===o.id)),_=this.buttons??e.settings.buttons??[];return p`${i} `}toggleLock(){this._locked=!this._locked;try{localStorage.setItem(Yu,this._locked?"1":"0")}catch{}}async openTravel(e){if(clearInterval(this.travelTimer),this.travelTimer=void 0,e===null||!this.hass){this._travel=null,this.syncDevices(!0);return}let t=Date.now(),r=t-e*36e5;this._travel={history:new Map,from:r,to:t,t:r,playing:!1,speed:e>24?3600:600,hours:e,moments:[],loading:!0};try{let i=await Fn(this.hass,_c(this.watched),r,t);if(!this._travel||this._travel.from!==r)return;this._travel={...this._travel,history:i,moments:bc(i,r,t),loading:!1}}catch{this._travel=null,this._error=M(this.hass,"travel_failed");return}this.syncDevices(!0)}travelTo(e){let t=this._travel;t&&(this._travel={...t,t:Math.min(t.to,Math.max(t.from,e))},this.syncDevices(!0))}playTravel(e){let t=this._travel;t&&(clearInterval(this.travelTimer),this.travelTimer=void 0,this._travel={...t,playing:e,t:e&&t.t>=t.to?t.from:t.t},e&&(this.travelTimer=setInterval(()=>{let r=this._travel;if(!r)return;let i=r.t+250*r.speed;i>=r.to&&this.playTravel(!1),this.travelTo(i)},250)))}renderTravel(){if(!this.hass||this.clean)return f;let e=a=>M(this.hass,a),t=this._travel;if(!t)return this.travelButton?p``:f;let r=this.hass.language??navigator.language,i=new Intl.DateTimeFormat(r,{weekday:"short",hour:"2-digit",minute:"2-digit"}).format(new Date(t.t)),o=t.to-t.from||1,s=[[60,"travel_speed_min"],[600,"travel_speed_10min"],[3600,"travel_speed_hour"]];return p`
${t.loading?e("travel_loading"):i}
this.travelTo(Number(a.target.value))} />
`}toggleWalk(){let e=this.viewer;e&&(this._walking?(e.stopWalk(),this._walking=!1):this._walking=e.startWalk()!==null,this._stick=null)}stickMove(e,t=!1){let r=e.currentTarget;if(t)r.setPointerCapture(e.pointerId);else if(!this._stick)return;let i=r.getBoundingClientRect(),o=i.width/2,[s,a]=[(e.clientX-i.left-o)/o,(e.clientY-i.top-o)/o],l=Math.hypot(s,a);l>1&&([s,a]=[s/l,a/l]),this._stick=[s,a],this.viewer?.setWalkStick(Math.abs(s)<.12?0:s,Math.abs(a)<.12?0:a)}stickEnd(){this._stick=null,this.viewer?.setWalkStick(0,0)}renderWalk(){if(!this.hass||this.clean||!this.walkButton&&!this._walking)return f;let e=r=>M(this.hass,r),t=this._stick??[0,0];return p` ${this._walking?p`
this.stickMove(r,!0)} @pointermove=${r=>this.stickMove(r)} @pointerup=${()=>this.stickEnd()} @pointercancel=${()=>this.stickEnd()}>

${e("walk_hint")}

`:f}`}renderLock(){if(!this.lockButton||!this.hass||this.clean)return f;let e=M(this.hass,this._locked?"lock3d_off":"lock3d_on");return p``}renderClock(e=!1){if(!this.clock||!this.hass||this.clock==="top_left"&&!e)return f;let t=this.hass.language??navigator.language,r=new Date(this._now),i=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(r),o=new Intl.DateTimeFormat(t,{weekday:"long",day:"numeric",month:"long"}).format(r);return p``}renderEye(){if(!this.cleanButton||!this.hass||this._find!==null&&!this.clean)return f;let e=M(this.hass,this.clean?"controls_show":"controls_hide");return p``}renderSwipe(){let e=this._swipe;if(!e||!this.hass)return f;let t=e.kind==="light"&&e.value<=0;return p`
${O(this.hass,e.entity)} ${t?M(this.hass,"swipe_off"):`${e.value} %`}
`}tapPlate(e,t,r){let i=this.building?.floors.flatMap(s=>s.furniture).find(s=>s.id===e),o=i?ro(i.gang_entities,ee(i.type)?.gangs??0):[];if(o.length===1)return this.onDeviceTap(o[0],t,r);o.length>1&&(this._plate={ids:o,x:t,y:r})}renderPlate(){let e=this._plate;if(!e||!this.hass)return f;let t=this.hass,r=()=>this._plate=null;return p`
`}renderMenu(){let e=this._menu;if(!e||!this.hass)return f;let t=this.renderRoot.querySelector(".nf-stage"),r=t?.clientWidth??800,i=t?.clientHeight??600,o=Math.max(8,Math.min(r-240,e.x-116)),s=Math.max(8,Math.min(i-360,e.y-170));return p`
this._menu=null}>
!a.speakers?.length||a.speakers.includes(e.entity))} ?confirmSwitch=${this.confirmSet.has(e.entity)} .myPosition=${this.myPositionOf(e.entity)} .tiltEntity=${$r(this.hass,this.building?.floors??[],e.entity)} @close=${()=>this._menu=null} >`}myPositionOf(e){for(let t of this.building?.floors??[])for(let r of t.openings){let i=this.openingLinks?.get(r.id);if(r.my_position!=null&&(i?.cover===e||i?.cover2===e))return r.my_position}return null}onDeviceTap(e,t=0,r=0){if(e.startsWith("lamp:")||this._travel)return;if(e.startsWith("hydronic:")){let s=this.building?.floors.flatMap(a=>a.furniture).find(a=>a.id===e.slice(9));s&&this.hass&&Yo().then(a=>{if(this.isConnected&&this.hass)return this.hydronicModule=a,a.openHydronic(this.hass,s)}).catch(a=>{this._error=String(a)});return}let i=e.startsWith("tap:")?e.slice(4):this.tapPins.get(e);if(i){let s=this.building?.floors.flatMap(a=>a.furniture).find(a=>a.id===i);s?.tap&&no(this.hass,this,s.tap);return}if(this.pluginTapped(e))return;if(e.startsWith("gang:"))return this.tapPlate(e.slice(5),t,r);if(e.startsWith("outdoor:")){this.fire("room-tap",{floorId:null,roomId:"nf-outside"});return}if(e==="grid"){let s=this.building,a=s?s.energy.grid??Ye(s,l=>this.furnitureLinks?.get(l.id)?.power??null).grid:null;a&&Se(this,a);return}let o=P(e);if(this.hass.symconObjects!==void 0&&!W(this.hass,e)){this.hass.states[e]&&(this._menu={entity:e,x:t,y:r});return}if(o==="cover"||o==="media"){this._menu={entity:e,x:t,y:r};return}if(o==="lock"){let s=Qi(this.hass,e),a=O(this.hass,e);confirm(M(this.hass,s?"lock_confirm_lock":"lock_confirm_unlock",{name:a}))&&this.hass.callService("lock",s?"lock":"unlock",{entity_id:e});return}if(o&&va.has(o)){if(this.confirmSet.has(e)&&!confirm(M(this.hass,"confirm_switch",{name:O(this.hass,e)})))return;cl(this.hass,e)}else Se(this,e)}pluginTapped(e){let t=this.hass?.states[e],r=this.placementInfo.get(e);if(!t||!r)return!1;let i=this.building?.floors.find(o=>o.id===r.floorId)?.placements.find(o=>o.entity_id===e);return Qs({hass:this.hass,entityId:e,state:t},r,i?.plugin??void 0,{showWindow:(o,s)=>{o&&"hass"in o&&(o.hass=this.hass),this._pluginWindow=o?{node:o,title:s?.title??""}:null},moreInfo:o=>Se(this,o??e)})}renderPluginWindow(){let e=this._pluginWindow;return e?p`
t.stopPropagation()}>
${e.title}
${e.node}
`:f}startViewOf(){return this.startView??this.building?.settings.start_view??null}currentView(){return this.viewer?.currentView()??null}resetView(){this.viewer?.resetView()}fire(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}toggleFlows(){this._flows=!this._flows;try{localStorage.setItem("nextfloor.flows",this._flows?"1":"0")}catch{}this.syncDevices(!0)}liveHeatPumps(e){let t=this.hass;if(!t)return[];let r=[];for(let i of e.floors)for(let o of i.furniture){if(!Su(o.type))continue;let s=this.furnitureLinks?.get(o.id),a=ku(t,s?.entity??s?.power??null);a&&r.push({id:o.id,name:o.name||le(t,o.type),floorId:i.id,x:o.x,z:o.z,at:{floorId:i.id,x:o.x,z:o.z,y:se(i,o)+o.h+.5},pump:a})}return r}livePrinters(e){let t=this.hass,r=[];if(!t)return r;for(let i of e.floors)for(let o of i.furniture){if(!Qo(o.type))continue;let s=this.furnitureLinks?.get(o.id),a=Jo(t,s?.entity??s?.power??null);!a||!a.printing&&!/pause|finish|complete|error/.test(a.status)||r.push({id:o.id,name:o.name||le(t,o.type),at:{floorId:i.id,x:o.x,z:o.z,y:se(i,o)+o.h+.5},printer:a})}return r}liveCars(e,t){let r=[];for(let i of t.floors)for(let o of i.furniture){if(o.type!=="parking")continue;let s=Ru(e,o);if(!s||s.soc===null&&s.range===null&&s.locked===null&&s.climateOn===null)continue;let a=Co(e,o),l=a?Bc(o,a):null,c=o.name||(a?le(e,a):le(e,o.type));r.push({spot:o.id,name:c,at:{floorId:i.id,x:o.x,z:o.z,y:se(i,o)+(l?.h??.2)+.6},car:s})}return r}liveMedia(e,t){let r=[];for(let i of t.floors){for(let o of i.furniture){let s=this.furnitureLinks?.get(o.id)?.entity;s?.startsWith("media_player.")&&r.push({entity:s,name:o.name||le(e,o.type),at:{floorId:i.id,x:o.x,z:o.z,y:se(i,o)+o.h+.15},rings:o.sound_rings})}for(let o of i.placements)o.entity_id.startsWith("media_player.")&&r.push({entity:o.entity_id,name:o.name||O(e,o.entity_id),at:{floorId:i.id,x:o.x,z:o.z,y:(o.y??1.1)+.15},rings:o.sound_rings})}return Ac(e,r)}refreshToday(e){let t=this.hass,r=e.settings.calendars??[],i=Math.max(1,Math.min(7,e.settings.today_days??1)),o=`${new Date().toDateString()}|${i}`;!t||!r.length||Date.now()-this.todayAt<9e5&&o===this.todayDay||(this.todayAt=Date.now(),this.todayDay=o,bu(t,r,i).then(s=>this._todayItems=s))}refreshForecast(e){let t=this.hass,r=e.settings.forecast&&t?lt(t,this.weatherEntityId??e.settings.weather_entity):null;if(!t||!r)return;let i=`${r}|${new Date().toDateString()}`;Date.now()-this.forecastAt<18e5&&i===this.forecastKey||(this.forecastAt=Date.now(),this.forecastKey=i,wu(t,r).then(o=>this._forecast=o))}renderForecast(e){let t=this.building,r=this.hass,i=t?.settings.forecast;if(!t||!r||!i||i.corner!==e||this.clean)return f;if(e==="top_right"&&(this.roomId||this.panelOpen))return f;let o=vu(this._forecast,Math.max(1,Math.min(7,i.days)));if(!o.length)return f;let s=lt(r,this.weatherEntityId??t.settings.weather_entity),a=s?r.states[s]?.attributes:void 0,l=String(a?.temperature_unit??"\xB0"),c=String(a?.precipitation_unit??"mm"),u=r.language??navigator.language,h=new Intl.DateTimeFormat(u,{weekday:"short"}),m=d=>d===null?"\u2013":`${Math.round(d)}\xB0`;return p`
    ${o.map((d,g)=>p`
  • ${g===0?M(r,"today"):h.format(new Date(d.day))} ${m(d.high)} ${m(d.low)} ${d.rain!==null&&d.rain>0?`\u{1F4A7}${d.rain.toLocaleString(u,{maximumFractionDigits:1})} ${c}`:d.chance!==null&&d.chance>0?`\u{1F4A7}${Math.round(d.chance)} %`:""}
  • `)}
`}renderToday(e){let t=this.building,r=this.hass;if(!t||!r||this.clean||this.roomId||this.panelOpen)return f;let i=this.renderForecast("top_right"),o=this.today===!1?f:this.renderTodayCard(t,r);return o===f&&i===f&&e===f?f:p`
${e}${o}${i}
`}renderTodayCard(e,t){let r=gu(t,e,Date.now(),{today:M(t,"care_bin_today"),tomorrow:M(t,"care_bin_tomorrow")}),i=_u([...r,...this._todayItems??[]]);if(!i.length&&!(e.settings.calendars??[]).length)return f;let o=this._todayOpen!==!1,s=new Intl.DateTimeFormat(t.language??navigator.language,{weekday:"long",day:"numeric",month:"long"}).format(new Date),a=t.language??navigator.language,l=u=>{if(u===1)return M(t,"tomorrow");let h=new Date;return h.setDate(h.getDate()+u),new Intl.DateTimeFormat(a,{weekday:"long",day:"numeric",month:"numeric"}).format(h)},c=i.flatMap((u,h)=>[(u.day??0)>0&&(i[h-1]?.day??0)!==u.day?p`
  • ${l(u.day??0)}
  • `:f,p`
  • ${u.title}${u.source}
  • `]);return p`
    ${o?i.length?p`
      ${c}
    `:p`

    ${M(t,"today_none")}

    `:f}
    `}week=null;weekAt=0;refreshWeek(e){let t=this.hass;if(!t||this._travel||Date.now()-this.weekAt<36e5)return;this.weekAt=Date.now();let r=Ye(e,s=>this.furnitureLinks?.get(s.id)?.power??null),i=e.energy,o={solar:i.solar?[i.solar]:r.solar,grid:i.grid??r.grid,gridInvert:!!i.grid_invert,battery:i.battery?[i.battery]:r.battery,batteryInvert:!!i.battery_invert,consumption:i.consumption};ic(t,o).then(s=>{this.week=s,this.syncDevices(!0)}).catch(()=>this.week=null)}meterRows(e,t=null){let r=this.hass,i=[],o=this.floorId?e.floors.find(l=>l.id===this.floorId):void 0,s=o&&B(r)?Ne(r,o,e.floors.flatMap(l=>l.rooms)).find(l=>l.kind==="electricity"&&l.metric==="power"&&l.unit==="W"):void 0,a=B(r)?s?.value??null:o?.power_entity?Z(r?.states[o.power_entity]):null;if(o&&(s||a!==null)){let l=!s?.incomplete&&a!==null&&t&&t>0?` \xB7 ${M(r,"floor_power_share",{n:Math.round(Math.max(0,a)/t*100)})}`:"";i.push({icon:"\u26A1",label:o.name,value:`${s?Le(r,s):kt(r,a)}${l}`})}for(let[l,c,u]of[["gas","\u{1F525}","energy_gas_short"],["water","\u{1F4A7}","energy_water_short"]]){let h=e.energy[l],m=h?r?.states[h]:void 0;m&&!C(m)&&i.push({icon:c,label:M(r,u),value:ae(r,m)})}return i}refreshDayCurves(e){let t=this.hass;if(!t||this._travel||Date.now()-this.curvesAt<6e5)return;this.curvesAt=Date.now();let r=a=>An(a,e,Mn(a,e),Ye(e,l=>this.furnitureLinks?.get(l.id)?.power??null)),i=yc(t,r),o=Date.now(),s=o-24*36e5;Fn(t,i,s,o,!0).then(a=>{this.dayCurves=vc(t,a,s,o,r),this.syncDevices(!0)}).catch(()=>this.dayCurves=null)}syncHydronics(e,t,r){let i=++this.hydronicGeneration,o=this.shownBuilding(r).floors.filter(s=>!this.floorId||s.id===this.floorId).flatMap(s=>s.furniture.filter(a=>st(a.type)).map(a=>({floor:s,item:a})));if(!o.length){e.setHydronics([]),this.hydronicModule?.refreshHydronic(r,t,!!this._travel);return}Yo().then(s=>{i!==this.hydronicGeneration||this.viewer!==e||!this.isConnected||(this.hydronicModule=s,e.setHydronics(o.map(({floor:a,item:l})=>({...s.hydronicVisual(r,l,a.id,se(a,l)),animate:!this.dimmed&&!this._travel}))),s.refreshHydronic(r,t,!!this._travel))}).catch(s=>{this._error=String(s)})}syncLhCards(e,t,r,i,o,s){let a=[],l=r.summary,c=l.solar!==null||l.grid!==null||l.battery!==null||l.consumption!==null,u=On(t),h=(this.floorId?t.floors.find(m=>m.id===this.floorId):void 0)??[...t.floors].sort((m,d)=>d.elevation-m.elevation)[0];if(this.liveCardsOn&&!this.dimmed&&!this.roomId&&c&&u&&h){let m=0,d=0,g=0;for(let _ of h.rooms)for(let[b,y]of _.points)m+=b,d+=y,g++;a.push({kind:"house",at:{floorId:h.id,x:g?m/g:u.x,z:g?d/g:u.z,y:h.height+(this.floorId?1.2:3.2)},summary:l,autarky:r.autarky,curves:this.dayCurves??void 0,week:this.week??void 0,meters:this.meterRows(t,l.consumption)}),this.refreshDayCurves(t),this.refreshWeek(t)}if(this.liveCardsOn&&!this.dimmed&&!this.roomId){for(let m of i)a.push({kind:"car",at:m.at,spot:m.spot,name:m.name,car:m.car});for(let m of this.livePrinters(t))a.push({kind:"printer",at:m.at,name:m.name,printer:m.printer});for(let m of this.liveHeatPumps(t))a.push({kind:"heatpump",at:m.at,name:m.name,pump:m.pump});for(let m of o)a.push({kind:"media",at:{...m.at,y:m.at.y+.5},media:m})}if(this.liveCardsOn&&!this.dimmed){a.push(...uu(s,t,this.floorId,this.roomId)),a.push(...du(s,t,this.furnitureLinks??new Map,this.floorId,this.roomId));for(let m of t.floors)for(let d of m.furniture){if(!st(d.type)||d.hydronic?.card===!1||this.floorId&&m.id!==this.floorId||!je(s,d))continue;let g=this.roomId?m.rooms.find(_=>_.id===this.roomId):null;this.roomId&&(!g||!H([d.x,d.z],g.points))||a.push({kind:"hydronic",item:d,readOnly:!!this._travel,at:{floorId:m.id,x:d.x+(d.pin_offset?.x??0),z:d.z+(d.pin_offset?.z??0),y:se(m,d)+d.h+.3+(d.pin_offset?.y??0)}})}}JSON.stringify(a)!==JSON.stringify(this._liveCards)&&(this._liveCards=a),e.setLiveAnchors(a.map(m=>m.at),a.length?(m,d,g,_,b)=>this.placeLhCard(m,d,g,_,b):null)}placeLhCard(e,t,r,i,o){let s=this.renderRoot.querySelector(`.live-card[data-i="${e}"]`);if(!s)return;let a=this._liveCards[e],l=`${a.kind}:${a.at.floorId}:${a.at.x}:${a.at.z}`,c=s.dataset.zoomKey===l&&s.dataset.zoomVisible==="1",u=this.shadowRoot?.activeElement,h=!!u&&s.contains(u),m=h||Hu(a,o,c);s.dataset.zoomKey=l,s.dataset.zoomVisible=m?"1":"0",s.dataset.density=String(Math.round(o)),s.dataset.priority=String(h?110:ts(a).priority),s.dataset.focused=h?"1":"0",s.dataset.x=String(t),s.dataset.y=String(r),s.style.visibility=i&&m?"visible":"hidden",e===this._liveCards.length-1&&Tu(this.renderRoot)}toggleHouseFold(){this._houseFolded=!this._houseFolded;try{localStorage.setItem("nextfloor.house_card_folded",this._houseFolded?"1":"0")}catch{}}toggleLhCards(){this._liveCardOn=!this._liveCardOn;try{localStorage.setItem("nextfloor.cards",this._liveCardOn?"1":"0")}catch{}this.syncDevices(!0)}renderTopLeft(){let e=this.clean?f:this.renderLhEnergy(),t=this.renderForecast("top_left");return this.clock!=="top_left"&&t===f||!this.hass?e:p`
    ${this.clock==="top_left"?this.renderClock(!0):f}${e}${t}
    `}renderLhEnergy(){let e=this.ownSensors(),t=this._liveEnergy?.summary,r=!!t&&!this.roomId&&this.showEnergy&&!!this.hass&&!(t.consumption===null&&t.grid===null&&t.solar===null&&t.battery===null),o=this.building?.floors.some(c=>c.rooms.some(u=>u.climate_card)||c.furniture.some(u=>u.power_card||st(u.type)&&u.hydronic?.card!==!1))?this.renderCardToggle():f,s=this.roomNamesButton?p``:f;if(!r)return e.length||o!==f||s!==f?p`
    ${s}${e}${o}
    `:f;let a=c=>M(this.hass,c),l=[];if(t.solar!==null&&l.push({cls:"solar",label:a("energy_solar"),value:me(this.hass,t.solar)}),t.consumption!==null&&l.push({cls:"total",label:a("energy_consumption"),value:me(this.hass,t.consumption)}),t.rest!==void 0&&t.rest!==null&&l.push({cls:"total",label:a("energy_rest"),value:me(this.hass,t.rest)}),t.battery!==null||t.soc!==null){let c=[t.battery!==null?me(this.hass,Math.abs(t.battery)):null,t.soc!==null?`${Math.round(t.soc)} %`:null].filter(Boolean);l.push({cls:"battery",label:a("energy_battery"),value:c.join(" \xB7 ")})}if(t.grid!==null){let c=t.grid<0;l.push({cls:c?"export":"grid",label:a(c?"energy_grid_export":"energy_grid_import"),value:me(this.hass,Math.abs(t.grid))})}if(t.tariff&&l.push({cls:"tariff",label:a("energy_tariff"),value:`${L(this.hass,t.tariff.value,3)} ${t.tariff.unit}`.trim()}),this.building)for(let c of this.meterRows(this.building))l.push({cls:"meter",label:`${c.icon} ${c.label}`,value:c.value});return p`
    ${s} ${this.liveCardsOn&&this._liveCards.some(c=>c.kind==="house")?f:l.map(c=>p`
    ${c.label}${c.value}
    `)} ${this.flows!==null?f:p``} ${this.renderCardToggle()} ${e}
    `}renderCardToggle(){return this.holograms!==null?f:p``}utilityOverview(e){let t=this.building;if(!t||!B(this.hass)||!this.showEnergy||this.clean||this.roomId||this.panelOpen||!e&&!this._utilityOverviewVisible)return f;let r=t.floors.flatMap(o=>o.rooms);return(this.floorId?t.floors.filter(o=>o.id===this.floorId):t.floors).some(o=>Ne(this.hass,o,r).length||Kt(this.hass,o,r,!0).length)?p`{o.stopPropagation(),o.detail.roomId?this.openRoom(o.detail.floorId,o.detail.roomId):this.fire("floor-tap",{floorId:o.detail.floorId})}}>`:f}ownSensors(){let e=this.utilityOverview(!0),t=e===f?f:p``,r=this.sensorBar&&this.hass?this.building?.settings.status_entities??[]:[],i=B(this.hass)?(this.building?.presence??[]).filter(c=>_a(this.hass,c.person,[0])).map(c=>p`
    ${c.name||O(this.hass,c.person)}${ce(this.hass.states[c.person])===null?"\u2013":ce(this.hass.states[c.person])?"Anwesend":"Abwesend"}${U(this.hass,[c.person],c.name||"Anwesenheit")}
    `):[],o=B(this.hass)?Object.entries(this.building?.settings.weather_variables??{}).filter(c=>!!c[1]&&c[1]!=="none").map(([c,u])=>[Gu[c]||c,u]):[];B(this.hass)&&this.building?.settings.rain_sensor&&this.building.settings.rain_sensor!=="none"&&o.push(["Regensensor",this.building.settings.rain_sensor]);let s=o.length?p` c.stopPropagation()}>
    Wetter
    ${o.map(([c,u])=>p`

    ${c}${De(this.hass.states[u])}${U(this.hass,[u],c)}

    `)}
    `:f,a=B(this.hass)?(this.building?.floors??[]).filter(c=>!this.floorId||c.id===this.floorId).map(c=>({floor:c,readings:Ne(this.hass,c,this.building?.floors.flatMap(u=>u.rooms))})).filter(c=>c.readings.length):[],l=a.length?p` c.stopPropagation()}>
    Stockwerkszähler
    ${a.map(({floor:c,readings:u})=>p`

    ${c.name}

    `)}
    `:f;return[t,e,...i,s,l,...r.filter(c=>this.hass.states[c]).map(c=>p`${U(this.hass,[c],O(this.hass,c))}`)]}renderMapCredit(){let e=this.building?.settings.map;return qc(e)?p`${Oo(e).text}`:f}renderLegend(){if(this.heatMode==="wifi")return this.renderWifiLegend();if(this.heatMode==="none"||this.heatMode==="values")return f;let e=xt(new Date,this.hass?.config?.latitude??50),t=Ur(this.heatMode,e),r=this.heatMode==="temperature",i=r?ue(this.hass,t.stops[0][0]):t.stops[0][0],o=r?ue(this.hass,t.stops[t.stops.length-1][0]):t.stops[t.stops.length-1][0],s=r?ie(this.hass):t.unit,a=l=>M(this.hass,l);return p`
    ${a(`heat_${this.heatMode}`)}${this.heatMode==="temperature"?p` ${a(e?"heat_summer":"heat_winter")}`:f} ${L(this.hass,i,0)} ${s}${L(this.hass,o,0)} ${s} ${this.heatValues.size?f:p`${a("heat_none_found")}`}
    `}renderWifiLegend(){let e=this.hass,t=this.building;if(!e||!t)return f;let r=(c,u)=>M(e,c,u),i=t.floors.flatMap(c=>c.furniture.filter(u=>Xo(u.type)).map(u=>es(e,this.furnitureLinks?.get(u.id)?.entity??this.furnitureLinks?.get(u.id)?.power??null))),s=i.filter(c=>!!c).reduce((c,u)=>c+(u.clients??0),0),a=t.floors.flatMap(c=>c.placements.map(u=>e.states[u.entity_id])),l=Au(a);return p`
    📶 ${r("heat_wifi")} ${r("wifi_aps",{n:i.length,clients:s})} ${l.online+l.offline.length?p`${r("wifi_network",{online:l.online,offline:l.offline.length})}`:f} ${l.offline.length?p`${l.offline.slice(0,4).join(", ")}`:f} ${i.length?f:p`${r("wifi_none")}`}
    `}skyColor(){let e=Hn[this.theme]??Hn.neon,t=this._sky;return e.night[0].map((r,i)=>Math.round(r+(e.day[0][i]-r)*t))}render(){let e=this.utilityOverview(!1),t=this._sky,r=(s,a)=>`rgb(${s.map((l,c)=>Math.round(l+(a[c]-l)*t)).join(",")})`,i=Hn[this.theme]??Hn.neon,o=`--nf-sky:${r(i.night[0],i.day[0])};--nf-ground:${r(i.night[1],i.day[1])}`+$c(this.building?.settings.backdrop);return p`
    ${this._error?p`

    ${this._error}

    `:f} ${this.renderTopLeft()} ${Fu(this.hass,this._liveCards,(s,a,l,c)=>this.hass?.callService(s,a,{entity_id:l,...c}),{folded:this._houseFolded,toggle:()=>this.toggleHouseFold()},!!this.roomId||this.panelOpen)} ${this.clean?f:this.renderLegend()} ${this.renderMapCredit()} ${this.renderAlerts()} ${this.renderAnnouncement()} ${this.clean?f:p`${this.renderThumbs()} ${this.renderScenes()} ${this.renderFind()} ${this.renderCentral()}`} ${this.renderSwipe()} ${this.renderMenu()} ${this.renderPlate()} ${this.renderEye()} ${this.renderLock()} ${this.renderWalk()} ${this.renderTravel()} ${this.renderClock()} ${this.renderToday(e)} ${this.renderLayers()} ${this.renderPluginWindow()} ${this.showStats&&this._stats?p`${this._stats.fps?M(this.hass,"stats_fps",{fps:this._stats.fps,ms:this._stats.worstMs}):M(this.hass,"stats_idle")} ${this._stats.busy.length?p`(${this._stats.busy.map(s=>M(this.hass,`stats_busy_${s}`)).join(", ")})`:f} · ${M(this.hass,"stats",{calls:this._stats.calls,tris:this._stats.triangles.toLocaleString()})} · ${M(this.hass,this._stats.low?"stats_low":"stats_full",{r:L(this.hass,this._stats.pixelRatio,2)})}`:f}
    `}static styles=[ve,Pe,Du,Q` :host { display: block; position: relative; min-height: 200px; } .nf-alert-banner { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; justify-content: center; gap: 6px; max-width: calc(100% - 24px); z-index: 4; } .nf-alert { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 7px 14px 7px 12px; border: 0; border-left: 4px solid #ff3b4f; border-radius: 12px; background: var(--nf-chrome-solid); color: var(--nf-text); font: 600 13.5px var(--nf-font); box-shadow: 0 0 18px rgba(255, 59, 79, 0.35); cursor: pointer; animation: nf-alert-pulse 1.2s ease-in-out infinite; } .nf-alert-water, .nf-alert-window_rain { border-left-color: #4fb3ff; box-shadow: 0 0 18px rgba(79, 179, 255, 0.35); } .nf-alert-alarm_pending { border-left-color: #ffb547; box-shadow: 0 0 18px rgba(255, 181, 71, 0.35); } .nf-announcement { position: absolute; inset: 18% 8% auto; z-index: 30; display: flex; align-items: center; gap: 18px; margin: 0 auto; max-width: 860px; padding: 22px 28px; border: 1px solid color-mix(in srgb, var(--nf-accent) 55%, transparent); border-radius: 22px; background: var(--nf-chrome-solid); color: var(--nf-text); box-shadow: 0 0 40px color-mix(in srgb, var(--nf-accent) 35%, transparent), 0 18px 50px rgba(0, 0, 0, 0.45); font: 700 clamp(22px, 3.6vw, 40px) / 1.25 var(--nf-font); text-align: left; cursor: pointer; animation: nf-announce-in 0.35s ease-out; } .nf-announcement-icon { font-size: 1.3em; } @keyframes nf-announce-in { from { opacity: 0; transform: translateY(-12px) scale(0.98); } } @media (prefers-reduced-motion: reduce) { .nf-announcement { animation: none; } } /* a contact that stopped answering is a chore, not an emergency: no glow, no pulse */ .nf-alert-contact_lost, .nf-alert-own { border-left-color: #ffb547; box-shadow: none; animation: none; } .nf-alert-more { align-self: center; color: var(--nf-muted); font-size: 13px; } @keyframes nf-alert-pulse { 50% { box-shadow: 0 0 4px transparent; } } .nf-has-alerts .nf-energy, .nf-has-alerts .nf-topleft { top: 58px; } /* the clock top left stacks above the sensor and energy bar rather than covering it */ .nf-topleft { position: absolute; left: 12px; top: 10px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: calc(100% - 24px); pointer-events: none; } .nf-topleft > .nf-clock, .nf-topleft > .nf-energy { position: static; max-width: 100%; } .nf-scenes { position: absolute; left: 60px; right: 60px; bottom: calc(10px + var(--nf-bottom-inset, 0px)); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; z-index: 2; pointer-events: none; } .nf-scenes .nf-chip { pointer-events: auto; } @media (prefers-reduced-motion: reduce) { .nf-alert, .nf-dev-found { animation: none; } } .nf-stage { position: absolute; inset: 0; overflow: hidden; container-type: size; container-name: nf; background: radial-gradient(ellipse at 50% 35%, var(--nf-sky, var(--nf-bg2)), var(--nf-ground, var(--nf-bg)) 72%); transition: background 2s ease; } .nf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; } .nf-canvas:active { cursor: grabbing; } :host([readable]) .nf-pin { font-size: 15px; padding: 6px 12px; } :host([readable]) .nf-pin-info small, :host([readable]) .nf-pin-floor span { font-size: 14px; opacity: 1; } :host([readable]) .nf-pin-floor b { font-size: 18px; } :host([readable]) .nf-dev { font-size: 14px; color: var(--nf-text); } .nf-note-pin { background: #ffe58a; color: #3a2e00; border-color: #c9a400; max-width: 260px; overflow: hidden; text-overflow: ellipsis; } .nf-note-pin.nf-note-due { background: #ffa726; color: #2a1600; } .nf-note-pin.nf-note-open { white-space: normal; text-align: left; } .nf-note-photo { display: block; width: 100%; max-height: 200px; object-fit: cover; margin-top: 6px; border-radius: 6px; } .nf-labels { position: absolute; inset: 0; pointer-events: none; } .nf-pin-info { display: grid; gap: 1px; text-align: center; } .nf-pin-info small { font-size: 11px; font-weight: 500; opacity: 0.9; font-variant-numeric: tabular-nums; } .nf-pin { position: absolute; left: 0; top: 0; pointer-events: auto; font: 600 12.5px var(--nf-title-font); color: var(--nf-text); background: var(--nf-chrome); border: 1px solid var(--nf-line); border-radius: 10px; padding: 5px 10px; cursor: pointer; white-space: nowrap; backdrop-filter: blur(6px); box-shadow: var(--nf-shadow); } .nf-pin-floor { display: grid; justify-items: start; gap: 1px; padding: 8px 14px; border-radius: 12px; background: var(--nf-accent); color: var(--nf-accent-text); border-color: transparent; box-shadow: var(--nf-shadow); } .nf-pin-floor b { font: 700 15px var(--nf-title-font); letter-spacing: -0.01em; } .nf-pin-floor span { font: 500 12px var(--nf-font); opacity: 0.78; } .nf-dev { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px; border: 1px solid var(--nf-line); background: var(--nf-chrome); color: var(--nf-muted); font: 600 12px var(--nf-font); cursor: pointer; white-space: nowrap; backdrop-filter: blur(6px); touch-action: manipulation; -webkit-user-select: none; user-select: none; transition: opacity 0.2s ease; } .nf-dev-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: color-mix(in srgb, var(--nf-soft) 14%, transparent); } .nf-dev-text { display: none; padding-right: 6px; color: var(--nf-text); font-variant-numeric: tabular-nums; max-width: 160px; overflow: hidden; text-overflow: ellipsis; } .nf-dev-watt:empty { display: none; } .nf-dev-watt { padding: 1px 6px 1px 0; color: var(--nf-accent); font-variant-numeric: tabular-nums; font-weight: 700; } .nf-dev-on .nf-dev-watt { color: #2a1a00; } .nf-person { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: #ff5fd2; color: #fff; font: 700 12px var(--nf-font); box-shadow: 0 0 0 2px rgba(255, 95, 210, 0.45), 0 0 18px #ff5fd2; pointer-events: auto; } .nf-person img { width: 100%; height: 100%; object-fit: cover; } .nf-person[hidden] { display: none; } .nf-no-room-names .nf-pin[data-room] { display: none !important; } /* tablet level: blur over the canvas and glowing shadows are expensive on weak GPUs */ .nf-stage.nf-low { transition: none; } .nf-low .nf-pin, .nf-low .nf-dev, .nf-low .nf-dev-on, .nf-low .nf-energy-item, .nf-low .nf-find input, .nf-low .nf-find-list, .nf-low .nf-find-btn, .nf-low .nf-swipe, .nf-low .nf-thumb { backdrop-filter: none; box-shadow: none; transition: none; } .nf-thumbs { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; max-height: calc(100% - 140px); overflow-y: auto; scrollbar-width: none; z-index: 2; } .nf-thumb { position: relative; display: grid; padding: 0; width: 150px; border: 1px solid var(--nf-line); border-radius: 14px; background: color-mix(in srgb, var(--nf-chrome) 70%, transparent); color: var(--nf-text); cursor: pointer; overflow: hidden; font: inherit; box-shadow: var(--nf-shadow); opacity: 0.72; transition: opacity 0.15s, border-color 0.15s; } .nf-thumb:hover, .nf-thumb[aria-pressed="true"] { opacity: 1; } .nf-thumb[aria-pressed="true"] { border-color: var(--nf-accent); box-shadow: var(--nf-shadow), 0 0 0 2px var(--nf-accent); } .nf-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; } .nf-thumb span { position: absolute; left: 8px; bottom: 6px; font-size: 12px; font-weight: 600; } .nf-thumb img + span { inset: auto 0 0 0; padding: 18px 10px 6px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.62)); } .nf-thumbs-fold { align-self: flex-start; width: 26px; height: 22px; padding: 0; border: 1px solid var(--nf-line); border-radius: 8px; background: var(--nf-chrome); color: var(--nf-text); font-size: 11px; cursor: pointer; } /* folded: plain floor buttons with their names, no pictures (D177) */ .nf-thumbs-compact .nf-thumb { padding: 6px 10px; min-width: 0; } .nf-thumbs-compact .nf-thumb span { position: static; background: none; padding: 0; } .nf-thumb-house { display: flex; align-items: center; gap: 8px; padding: 8px 10px; } .nf-thumb-house span { position: static; text-shadow: none; } /* a low stage (a card of 420 px): the pictures start under the top bar and stop above the buttons at the bottom left */ .nf-thumbs.nf-thumbs-short { top: 52px; transform: none; max-height: calc(100% - 52px - 150px); } .nf-thumbs-small .nf-thumb { width: 104px; } .nf-find-btn { position: absolute; left: 12px; bottom: calc(10px + var(--nf-bottom-inset, 0px)); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 13px; background: var(--nf-chrome); color: var(--nf-text); box-shadow: var(--nf-shadow); cursor: pointer; } /* the star sits above the search button, its menu opens above it */ .nf-central-btn { position: absolute; left: 12px; bottom: calc(56px + var(--nf-bottom-inset, 0px)); width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 13px; background: var(--nf-chrome); color: var(--nf-text); box-shadow: var(--nf-shadow); cursor: pointer; z-index: 3; } .nf-central-on { color: var(--nf-accent); } .nf-central { position: absolute; left: 12px; bottom: calc(104px + var(--nf-bottom-inset, 0px)); width: min(320px, calc(100% - 24px)); max-height: calc(100% - 140px); overflow-y: auto; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--nf-line); border-radius: 16px; background: var(--nf-chrome); color: var(--nf-text); box-shadow: var(--nf-shadow); backdrop-filter: blur(10px); z-index: 4; } .nf-central > b { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; } .nf-central-row { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; } .nf-central-row small { opacity: 0.6; } .nf-central .nf-btn { min-width: 64px; } .nf-central-armed { background: #ff8a3d !important; color: #1a0d00 !important; } .nf-central-favs { display: flex; flex-wrap: wrap; gap: 6px; } .nf-own-btn { display: inline-flex; align-items: center; gap: 6px; } .nf-own-btn ha-icon { --mdc-icon-size: 18px; } .nf-central-hint { margin: 0; font-size: 13px; opacity: 0.7; } .nf-layers { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; } .nf-has-alerts .nf-layers { top: 58px; } /* top right: "Today" and the forecast below it, one column */ .nf-right-col { position: absolute; top: 12px; right: 12px; width: min(280px, calc(100% - 24px)); max-height: calc(100% - 140px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 3; pointer-events: none; } .nf-right-col > * { pointer-events: auto; } .nf-utility-right { height: calc(100% - 140px); } .nf-has-utility-overview:not(.nf-narrow) > .nf-energy, .nf-has-utility-overview:not(.nf-narrow) > .nf-topleft { max-width: calc(100% - 316px); } .nf-has-utility-overview .nf-energy { align-items: flex-start; } .nf-narrow .nf-utility-right { top: auto !important; bottom: 64px; height: 42%; max-height: 42%; justify-content: flex-end; width: min(280px, calc(100% - 24px)); } .nf-has-alerts .nf-right-col { top: 58px; } /* "Today": the day's appointments and bins, folds to its title */ .nf-today { width: 100%; min-height: 0; overflow-y: auto; box-sizing: border-box; padding: 8px 12px 10px; border-radius: 16px; border: 1px solid var(--nf-line); background: var(--nf-chrome); box-shadow: var(--nf-shadow); backdrop-filter: blur(10px); color: var(--nf-text); z-index: 3; } .nf-low :is(.nf-today, .nf-forecast) { backdrop-filter: none; } .nf-today-day { display: block !important; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--nf-muted); } /* the forecast: a row per day */ .nf-forecast { box-sizing: border-box; flex: none; padding: 6px 12px; border-radius: 16px; border: 1px solid var(--nf-line); background: var(--nf-chrome); box-shadow: var(--nf-shadow); backdrop-filter: blur(10px); color: var(--nf-text); pointer-events: auto; } .nf-forecast ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto auto auto auto; column-gap: 10px; row-gap: 2px; align-items: baseline; font-size: 13px; } .nf-forecast li { display: contents; } .nf-fc-day { color: var(--nf-muted); } .nf-fc-temp { font-variant-numeric: tabular-nums; white-space: nowrap; } .nf-fc-temp small { color: var(--nf-muted); } .nf-fc-rain { font-size: 12px; color: var(--nf-soft); white-space: nowrap; } .nf-today-folded { width: auto; align-self: flex-end; padding-bottom: 8px; } .nf-today-head { display: flex; gap: 8px; align-items: baseline; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; } .nf-today-head span { font-size: 12px; color: var(--nf-muted); } .nf-today ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; } .nf-today li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: baseline; font-size: 14px; } .nf-today time { font-variant-numeric: tabular-nums; color: var(--nf-accent); font-weight: 600; } .nf-today small { display: block; font-size: 11px; color: var(--nf-muted); } .nf-today-past { opacity: 0.45; } .nf-today-none { margin: 6px 0 0; font-size: 13px; color: var(--nf-muted); } /* opened from the start on a wall tablet: a size larger, easy to hit */ .nf-central-big { width: min(420px, calc(100% - 24px)); font-size: 16px; } .nf-central-big .nf-chip, .nf-central-big .nf-btn { min-height: 44px; padding: 8px 16px; font-size: 15px; } .nf-own-btn[aria-pressed="true"] { border-color: var(--nf-accent); color: var(--nf-accent); box-shadow: 0 0 12px color-mix(in srgb, var(--nf-accent) 45%, transparent); } .nf-low .nf-central { backdrop-filter: none; } /* the eye sits beside the search button; alone in the corner once the view is clean */ .nf-travel-btn { position: absolute; left: 188px; bottom: calc(10px + var(--nf-bottom-inset, 0px)); width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid rgba(160, 240, 255, 0.35); background: rgba(8, 16, 34, 0.7); color: var(--nf-text); font-size: 14px; cursor: pointer; z-index: 4; } .nf-travel { position: absolute; left: 50%; bottom: calc(62px + var(--nf-bottom-inset, 0px)); transform: translateX(-50%); width: min(860px, calc(100% - 24px)); display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 18px; background: rgba(8, 16, 34, 0.82); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4); color: var(--nf-text); z-index: 5; flex-wrap: wrap; } .nf-travel button, .nf-travel select { min-height: 32px; border: 0; border-radius: 999px; padding: 0 10px; background: rgba(127, 127, 127, 0.16); color: inherit; font: inherit; font-size: 13px; cursor: pointer; } .nf-travel select option { color: #111; } .nf-travel .nf-travel-play { width: 36px; padding: 0; background: var(--nf-accent); color: #041018; } .nf-travel-span[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--nf-accent); color: var(--nf-accent); } .nf-travel-live { color: #ff5a6b !important; } .nf-travel-when { min-width: 92px; font-variant-numeric: tabular-nums; font-size: 14px; } .nf-travel-track { position: relative; flex: 1 1 220px; height: 28px; } .nf-travel-track svg { position: absolute; inset: 9px 0; width: 100%; height: 10px; fill: var(--nf-accent); opacity: 0.55; pointer-events: none; } .nf-travel-track input { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; accent-color: var(--nf-accent); } .nf-walk-btn { position: absolute; left: 144px; bottom: calc(10px + var(--nf-bottom-inset, 0px)); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(160, 240, 255, 0.35); background: rgba(8, 16, 34, 0.7); color: var(--nf-text); font-size: 16px; cursor: pointer; z-index: 4; } .nf-walk-on { color: #041018; background: var(--nf-accent); border-color: var(--nf-accent); } .nf-stick { position: absolute; right: 28px; bottom: calc(70px + var(--nf-bottom-inset, 0px)); width: 120px; height: 120px; border-radius: 50%; background: rgba(8, 16, 34, 0.45); border: 1px solid rgba(160, 240, 255, 0.35); display: grid; place-items: center; touch-action: none; z-index: 4; } .nf-stick span { width: 52px; height: 52px; border-radius: 50%; background: var(--nf-accent); opacity: 0.85; pointer-events: none; } .nf-walk-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(8, 16, 34, 0.6); color: var(--nf-muted); font-size: 12px; pointer-events: none; z-index: 3; } .nf-lock3d { position: absolute; left: 100px; bottom: calc(10px + var(--nf-bottom-inset, 0px)); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(160, 240, 255, 0.35); background: rgba(8, 16, 34, 0.7); color: var(--nf-text); cursor: pointer; z-index: 4; } .nf-lock3d-on { color: #041018; background: var(--nf-accent); border-color: var(--nf-accent); } .nf-plugin-window { position: absolute; right: 12px; bottom: 12px; z-index: 6; width: min(420px, calc(100% - 24px)); border-radius: 12px; overflow: hidden; background: rgba(10, 16, 22, 0.92); border: 1px solid rgba(127, 208, 255, 0.35); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); color: #e6f4fb; } .nf-pw-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; font-size: 13px; } .nf-pw-head span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .nf-pw-close { border: 0; background: transparent; color: inherit; font-size: 16px; cursor: pointer; padding: 2px 6px; } .nf-pw-body { line-height: 0; } .nf-clock { position: absolute; z-index: 3; display: flex; flex-direction: column; padding: 8px 14px; border-radius: 16px; background: rgba(8, 16, 34, 0.55); color: var(--nf-text); pointer-events: none; line-height: 1.1; } .nf-clock b { font-size: clamp(28px, 6cqmin, 64px); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; } .nf-clock span { font-size: clamp(12px, 1.8cqmin, 18px); color: var(--nf-muted); } .nf-clock-top_left { left: 16px; top: 16px; } .nf-clock-top_right { right: 16px; top: 16px; align-items: flex-end; } .nf-clock-bottom_left { left: 16px; bottom: calc(60px + var(--nf-bottom-inset, 0px)); } .nf-clock-bottom_right { right: 16px; bottom: calc(60px + var(--nf-bottom-inset, 0px)); align-items: flex-end; } .nf-eye { position: absolute; left: 56px; bottom: calc(10px + var(--nf-bottom-inset, 0px)); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid rgba(160, 240, 255, 0.35); background: rgba(8, 16, 34, 0.7); color: var(--nf-text); cursor: pointer; z-index: 4; } /* in the clean view the button sits at the top: a tablet's taskbar or gesture bar covers the bottom edge and the button was lost there (#75) */ .nf-eye-clean { left: auto; bottom: auto; right: calc(12px + env(safe-area-inset-right, 0px)); top: calc(12px + env(safe-area-inset-top, 0px)); opacity: 0.55; } .nf-eye:hover, .nf-eye-clean:hover { opacity: 1; } .nf-find { position: absolute; left: 12px; bottom: calc(10px + var(--nf-bottom-inset, 0px)); width: min(340px, calc(100% - 24px)); display: flex; flex-direction: column-reverse; gap: 6px; z-index: 3; } .nf-find input { box-sizing: border-box; width: 100%; height: 42px; padding: 0 42px 0 14px; border: 1px solid var(--nf-line); border-radius: 14px; background: var(--nf-chrome); color: var(--nf-text); font: inherit; font-size: 15px; box-shadow: var(--nf-shadow); backdrop-filter: blur(8px); } .nf-find-close { position: absolute; right: 6px; bottom: 6px; width: 30px; height: 30px; border: 0; border-radius: 10px; background: none; color: var(--nf-muted); cursor: pointer; } .nf-find-list { display: grid; padding: 6px; border-radius: 14px; background: var(--nf-chrome); box-shadow: var(--nf-shadow); backdrop-filter: blur(8px); } .nf-find-list button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--nf-text); text-align: left; font: inherit; cursor: pointer; } .nf-find-list button:hover, .nf-find-list button:focus-visible { background: rgba(127, 127, 127, 0.14); } .nf-find-list b { display: block; font-weight: 600; } .nf-find-list small, .nf-find-list p { color: var(--nf-muted); font-size: 12px; margin: 0; } .nf-find-list p { padding: 8px 10px; } .nf-find-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgba(127, 127, 127, 0.15); flex: none; } .nf-find-icon svg { width: 16px; height: 16px; } .nf-swipe { position: absolute; transform: translate(-50%, calc(-100% - 28px)); display: grid; grid-template-columns: auto auto; align-items: center; gap: 2px 12px; padding: 8px 12px; border-radius: 14px; background: var(--nf-chrome); box-shadow: var(--nf-shadow); pointer-events: none; white-space: nowrap; z-index: 4; } .nf-swipe span { font-size: 12px; color: var(--nf-muted); } .nf-swipe b { grid-row: 2; font: 700 22px var(--nf-title-font); } .nf-swipe i { grid-row: 1 / 3; grid-column: 2; position: relative; width: 10px; height: 44px; border-radius: 5px; background: rgba(127, 127, 127, 0.25); overflow: hidden; } .nf-swipe em { position: absolute; left: 0; right: 0; bottom: 0; background: var(--nf-warm); } .nf-plate-menu { position: absolute; z-index: 6; display: flex; flex-direction: column; gap: 4px; min-width: 220px; padding: 6px; border-radius: 16px; background: var(--nf-bg2, #1c2233); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); } .nf-plate-menu button { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: var(--nf-text, #e8eeff); font: inherit; text-align: left; cursor: pointer; } .nf-plate-menu button:hover { background: rgba(127, 127, 127, 0.14); } .nf-plate-menu button.on b { background: var(--nf-accent, #37e0ff); color: #041018; } .nf-plate-menu b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(127, 127, 127, 0.2); font-size: 12px; } .nf-plate-menu i { font-style: normal; color: var(--nf-muted, #9aa5bd); font-size: 13px; } .nf-menu-backdrop { position: absolute; inset: 0; z-index: 5; } .nf-through { position: absolute; inset: 0; z-index: 4; pointer-events: none; } /* the camera wall: a glass sheet over the scene with every camera's picture */ .nf-wall { position: absolute; inset: 56px 12px calc(var(--nf-bottom-inset, 0px) + 12px); z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 16px; background: rgba(8, 16, 34, 0.86); border: 1px solid rgba(160, 240, 255, 0.4); box-shadow: var(--nf-shadow); overflow: auto; } .nf-wall-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; color: var(--nf-text); } .nf-wall-head .nf-wall-title { flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; } .nf-wall-title b { color: #ff6b6b; font-weight: 600; } .nf-wall-tools { display: flex; gap: 6px; } .nf-wall-big { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; background: #0a1426; } .nf-wall-big img { width: 100%; height: 100%; object-fit: contain; } /* the stream player: a bare card, as wide as the sheet allows for a 16:9 picture */ .nf-wall-big > hui-picture-entity-card, .nf-wall-big > hui-error-card { width: min(100%, calc((100vh - 200px) * 16 / 9)); --ha-card-background: transparent; --ha-card-border-width: 0; --ha-card-box-shadow: none; } .nf-wall-grid { flex: 1; display: grid; align-content: safe center; justify-content: center; gap: 12px; min-height: 0; overflow-y: auto; } .nf-wall-cam { position: relative; padding: 0; border: 1px solid rgba(160, 240, 255, 0.3); border-radius: 12px; overflow: hidden; background: #0a1426; cursor: pointer; width: 100%; height: 100%; } .nf-wall-cam img, .nf-wall-none { width: 100%; height: 100%; object-fit: cover; display: flex; align-items: center; justify-content: center; color: #8aa; } .nf-wall-seen { border-color: rgba(255, 80, 90, 0.9); box-shadow: 0 0 14px rgba(255, 60, 70, 0.5); } .nf-wall-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 8px; font-size: 12px; text-align: left; color: var(--nf-text); background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); } .nf-wall-name b { color: #ff6b6b; font-weight: 600; } /* a lightning bolt of the weather layer lights up the whole stage for a moment */ .live-flash::after { content: ""; position: absolute; inset: 0; z-index: 3; background: radial-gradient(circle at 50% 20%, rgba(235, 242, 255, 0.55), rgba(200, 215, 255, 0.18) 70%); pointer-events: none; } .nf-through-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: var(--nf-blend); } .nf-through-bar { position: absolute; left: 50%; bottom: calc(var(--nf-bottom-inset, 0px) + 14px); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--nf-chrome); backdrop-filter: blur(12px); border: 1px solid var(--nf-line); pointer-events: auto; } .nf-through-name { font-weight: 600; white-space: nowrap; } /* a small note that the picture is a still, so nobody wonders why it does not move */ .nf-still { font-size: 11px; font-weight: 400; opacity: 0.65; white-space: nowrap; margin-left: 6px; } .nf-through-bar input[type="range"] { width: 140px; accent-color: var(--nf-accent); } .nf-through-on :is(.nf-pin, .nf-dev, .nf-energy, .nf-legend, .nf-thumbs, .nf-scenes, .nf-find-btn, .nf-stats) { display: none; } nf-quick-menu { position: absolute; z-index: 6; } .nf-dev-found { animation: nf-found 0.6s ease-in-out 4; } @keyframes nf-found { 50% { scale: 1.35; filter: drop-shadow(0 0 12px var(--nf-accent)); } } .nf-map-credit { position: absolute; right: 8px; bottom: 4px; z-index: 2; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--nf-chrome) 80%, transparent); color: var(--nf-soft); font-size: 10px; text-decoration: none; } .nf-legend { position: absolute; left: 12px; /* above the star button */ bottom: calc(104px + var(--nf-bottom-inset, 0px)); display: grid; gap: 4px; min-width: 180px; padding: 8px 11px; border-radius: 12px; background: var(--nf-chrome); box-shadow: var(--nf-shadow); font-size: 12px; pointer-events: none; } .nf-legend-bar { height: 8px; border-radius: 4px; } .nf-legend-range { display: flex; justify-content: space-between; color: var(--nf-muted); font-variant-numeric: tabular-nums; } .nf-legend-none { color: var(--nf-warm); } .nf-energy { position: absolute; left: 12px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 24px); pointer-events: none; } .nf-energy-item { display: grid; padding: 5px 11px 6px; border-radius: 12px; background: var(--nf-chrome); border-left: 3px solid var(--nf-line); box-shadow: var(--nf-shadow); backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; } .nf-energy-item span { font-size: 11px; color: var(--nf-muted); } .nf-energy-item b { font: 700 15px var(--nf-title-font); } .nf-energy-total { border-left-color: #6fd8ff; } .nf-energy-grid { border-left-color: var(--nf-accent); } .nf-energy-export, .nf-energy-solar { border-left-color: #ffc633; } .nf-energy-battery { border-left-color: #59ff8c; } .nf-flow-toggle { pointer-events: auto; cursor: pointer; border: 0; border-left: 3px solid var(--nf-line); color: inherit; text-align: left; font: inherit; } .nf-weather-dialog { pointer-events:auto; width:min(380px,calc(100vw - 32px)); max-height:75dvh; overflow:auto; box-sizing:border-box; padding:16px; background:var(--nf-chrome-solid); color:var(--nf-text); font:14px/1.5 system-ui,sans-serif; border:1px solid var(--nf-line); border-radius:12px; box-shadow:var(--nf-shadow); } .nf-weather-dialog::backdrop { background:#0008; } .nf-weather-dialog header,.nf-weather-dialog p { display:flex; justify-content:space-between; gap:16px; margin:8px 0; } .nf-weather-dialog p span { color:var(--nf-muted); } .nf-weather-dialog p b { font-size:13px; white-space:nowrap; } .nf-own-sensor { pointer-events: auto; cursor: pointer; border: 0; border-left: 3px solid var(--nf-accent); color: inherit; text-align: left; font: inherit; max-width: 220px; } .nf-own-sensor span, .nf-own-sensor b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .nf-flow-toggle[aria-pressed="true"] { border-left-color: var(--nf-accent); } .nf-flow-toggle span { display: none; } .nf-flow-toggle b { opacity: 0.4; filter: grayscale(1); } .nf-flow-toggle[aria-pressed="true"] b { opacity: 1; filter: none; } .nf-energy-tariff { border-left-color: #b98cff; } /* narrow stages (portrait tablets, phones): the energy values scroll in one row */ @container nf (max-width: 900px) { .nf-energy { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; pointer-events: auto; } .nf-legend { bottom: auto; top: 62px; } .nf-has-alerts .nf-legend { top: 110px; } } /* a room sheet covers the lower half: the view's own controls step aside */ @container nf ((max-width: 700px) or ((orientation: portrait) and (max-width: 1000px))) { .nf-panel-open :is(.nf-find-btn, .nf-find, .nf-thumbs, .nf-legend, .nf-stats, .nf-scenes) { display: none; } } @media (pointer: coarse) { .nf-find-close { width: 40px; height: 40px; right: 1px; bottom: 1px; } .nf-dev { padding: 6px; } .nf-pin { padding: 8px 12px; } } .nf-dev-full .nf-dev-text { display: inline; } .nf-dev-name:empty { display: none; } .nf-dev-name { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 600; line-height: 1.35; /* a fixed dark plate, so a fixed light text: the theme text colour can be dark (day themes, pins that are on) */ color: #f2f5fb; background: rgba(10, 16, 32, 0.72); pointer-events: none; } .nf-dev-sel { outline: 2px solid var(--nf-accent); outline-offset: 2px; } .nf-dev-on { color: #2a1a00; border-color: transparent; background: var(--nf-glow, var(--nf-warm)); box-shadow: 0 0 16px var(--nf-glow, var(--nf-warm)); } .nf-dev-on .nf-dev-icon { background: color-mix(in srgb, var(--nf-text) 28%, transparent); } .nf-dev-on .nf-dev-text { color: #2a1a00; } .nf-dev-na { opacity: 0.45; } .nf-dev-dim { opacity: 0.35; } .nf-dev[hidden], .nf-pin[hidden] { display: none; } .nf-pin-active { background: var(--nf-accent); color: var(--nf-accent-text); border-color: transparent; box-shadow: var(--nf-shadow); } .nf-stats b { color: var(--nf-accent); font-weight: 700; } .nf-stats { padding: 4px 9px; border-radius: 8px; background: var(--nf-chrome); position: absolute; right: 10px; bottom: calc(8px + var(--nf-bottom-inset, 0px)); font-size: 11.5px; color: var(--nf-muted); font-variant-numeric: tabular-nums; pointer-events: none; } .nf-error { position: absolute; inset: auto 16px 16px; color: var(--nf-danger); } `]};customElements.get("nf-view3d")||customElements.define("nf-view3d",cs);function me(n,e){return Math.abs(e)>=1e3?`${L(n,e/1e3,1)} kW`:`${Math.round(e)} W`}function ls(n){return n.type==="tv_board"?n.h+.9:n.type==="tv_wall"||n.type==="kitchen_wall"?n.h+.25:n.h+.35}function lg(n,e){let t=e.attributes.percentage;return e.state==="on"&&typeof t=="number"?`${Math.round(t)} %`:ae(n,e)}var Qu;function Xu(){let n=new URL("./nextfloor-editor.js?v=50eb4951fc8d",new URL(import.meta.url)).href;return Qu??=import(n),Qu}var cg=.25,ed=n=>Math.round(n*1e3)/1e3,td=(n,e,t)=>n.rooms.find(r=>r.points.length>=3&&H([e,t],r.points));function ds(n,e,t,r,i){let o=td(n,e,t);if(!o)return[r,i];let s=(a,l)=>H([a,l],o.points);return s(r,i)?[r,i]:s(r,t)?[r,t]:s(e,i)?[e,i]:[e,t]}function ug(n,e,t,r){return n.rooms.some(i=>i.id!==e.id&&i.points.some((o,s)=>{let a=i.points[(s+1)%i.points.length];return Math.abs(de(te(o,t),r))<.02&&Math.abs(de(te(a,t),r))<.02}))}var us=(n,e)=>Math.abs((n-e+540)%360-180);function nd(n,e,t,r=cg){let i=td(n,e.x,e.z);if(!i)return null;let o=i.points,s=bt(o)>=0?1:-1,a=null;return o.forEach((l,c)=>{let u=o[(c+1)%o.length],h=Ze(te(u,l));if(h<.3)return;let m=[(u[0]-l[0])/h,(u[1]-l[1])/h],d=[-m[1]*s,m[0]*s],g=de(te([e.x,e.z],l),m);if(g<0||g>h)return;let _=ug(n,i,l,d)?t/2:0,b=de(te([e.x,e.z],l),d)-_,y=Math.atan2(-d[0],d[1])*180/Math.PI,S=[{rotation:y,extent:e.d/2},{rotation:y+90,extent:e.w/2},{rotation:y-90,extent:e.w/2}].reduce((z,x)=>us(e.rotation,x.rotation)50)return;let A=b-S.extent;Math.abs(A)>r||a&&Math.abs(A)>=Math.abs(a.gap)||(a={x:ed(e.x-d[0]*A),z:ed(e.z-d[1]*A),rotation:(Math.round(S.rotation)%360+360)%360,gap:A})}),a&&{x:a.x,z:a.z,rotation:a.rotation}}function mi(n,e,t){let r=structuredClone(n);for(let i of r.floors){let o=i.furniture.find(s=>s.id===e);o&&t(o,i)}return r}function pi(n,e,t){let r=structuredClone(n);for(let i of r.floors){let o=i.placements.find(s=>s.entity_id===e);o&&t(o,i)}return r}function rd(n,e){let t=structuredClone(n);for(let r of t.floors)r.furniture=r.furniture.filter(i=>i.id!==e);return t}function id(n,e){let t=structuredClone(n);for(let r of t.floors)r.placements=r.placements.filter(i=>i.entity_id!==e);return t}function od(n,e,t,r){return pi(n,e,(i,o)=>{[i.x,i.z]=ds(o,i.x,i.z,t,r)})}function sd(n,e,t,r){let i=n.settings.wall_interior??.12;return mi(n,e,(o,s)=>{[o.x,o.z]=ds(s,o.x,o.z,t,r);let a=nd(s,o,i);a&&Object.assign(o,a)})}var hs=(n,e)=>((n+e)%360+360)%360,ad=n=>Number.parseFloat(n.replace(",",".")),jn=(n,e)=>Math.round(n*10**e)/10**e;function ms(n){let{min:e,max:t,accepts:r=()=>!0}=n,i=o=>{let s=ad(o.target.value);!Number.isFinite(s)||!r(s)||n.apply(t===void 0?s:Math.min(t,Math.max(e,s)))};return p``}var cd=(n,e)=>p``,ld=(n,e)=>p``;function dg(n,e){let t=n.building.floors.find(s=>s.furniture.some(a=>a.id===e)),r=t?.furniture.find(s=>s.id===e);if(!t||!r)return f;let i=(s,a)=>ms({label:n.t(a),title:n.t(`size_${s}`),value:r[s],step:.05,min:.05,accepts:l=>l>0,apply:l=>n.editFurniture(e,c=>c[s]=jn(l,3))}),o=pa(r)?p`${ms({label:"\u2195",title:n.t("mount_height"),value:r.mount_y??se(t,r),step:.05,min:0,accepts:s=>s>=0,apply:s=>n.editFurniture(e,a=>a.mount_y=jn(s,3))})} ${r.mount_y!=null?cd(n,()=>n.editFurniture(e,s=>s.mount_y=null)):f}`:f;return p`${i("w","size_short_w")}${i("d","size_short_d")}${i("h","size_short_h")} ${o}`}function hg(n,e){let t=n.building.floors.find(l=>l.placements.some(c=>c.entity_id===e)),r=t?.placements.find(l=>l.entity_id===e);if(!t||!r)return f;let i=P(e),o=(l,c,u)=>p``,s=["ceiling","floor","table","wall"].map(l=>[l,n.t(`lamp_${l}`)]),a=i?It(i,ke(t,r.x,r.z),i==="light"?r.mount??"ceiling":null):1;return p`${i==="light"?o("lamp_mount",s,r.mount??"ceiling"):f} ${ms({label:n.t("size_short_h"),title:n.t("marker_height"),value:r.y??a,step:.05,min:0,accepts:l=>l>=0,apply:l=>n.editDevice(e,c=>c.y=jn(l,3))})} ${r.y!==null?cd(n,()=>n.editDevice(e,l=>l.y=null)):f}`}function ud(n,e,t){let r=n.t,i;if(e){let o=n.building.floors.flatMap(s=>s.furniture).find(s=>s.id===e)?.type;i=p`${o?le(n.hass,o):""} ${dg(n,e)} ${ld(45,s=>n.turnFurniture(e,s))} `}else t?i=p`${O(n.hass,t)} ${hg(n,t)} ${ld(45,o=>n.turnDevice(t,o))} `:i=p`${r("furnish_hint")}`;return p`
    ${i}
    `}var dd=re``;var pe=(n,e)=>({name:n,fallback:e,read:t=>e?t!=="0":t==="1",write:t=>t?"1":"0"}),nn=(n,e,t)=>({name:n,fallback:t,read:r=>e.find(i=>i===r)??t,write:r=>r}),ps={explode:pe("explode",!0),keepRoof:pe("roof",!1),solidWalls:pe("solid_walls",!1),quality:nn("quality",["auto","low","high"],"auto"),stats:pe("stats",!1),markers:nn("markers",["none","important","all"],"important"),heat:nn("heat",["none","temperature","humidity","co2","mould","comfort","power","sun","values","wifi"],"none"),theme:nn("theme",ei,"neon"),clock:nn("clock",["none","top_left","top_right","bottom_left","bottom_right"],"none"),accent:{name:"accent",fallback:null,read:n=>/^#[0-9a-f]{6}$/i.test(n)?n:null,write:n=>n??""},floorStack:nn("floor_stack",["dim","stacked","single"],"dim"),roomNames:pe("room_names",!0),clean:pe("clean",!1),navWrap:pe("nav_wrap",!1),weather:pe("weather",!0),timeSlider:pe("time_slider",!1),menuOpen:pe("menu_open",!1),keepCamera:pe("keep_camera",!1),readable:pe("readable",!1),plain:pe("plain",!1),rightBack:pe("right_back",!1),zoom:{name:"zoom",fallback:100,read:n=>/^\d{2,3}$/.test(n)?Math.min(250,Math.max(60,Number(n))):100,write:n=>String(Math.round(Math.min(250,Math.max(60,n))))},screenName:{name:"screen_name",fallback:"",read:n=>n.slice(0,60),write:n=>n.trim().slice(0,60)},announceMuted:pe("announce_muted",!1),glassWalls:{name:"glass_walls",fallback:20,read:n=>/^\d{1,3}$/.test(n)?Math.min(100,Number(n)):20,write:n=>String(Math.round(Math.min(100,Math.max(0,n))))}};function hd(n=gi()){try{return n?.getItem("nextfloor.screen_name")?.trim()||null}catch{return null}}function md(n=gi()){try{return n?.getItem("nextfloor.announce_muted")==="1"}catch{return!1}}function gi(){try{return localStorage}catch{return null}}var fi=class{storage;constructor(e){this.storage=e}raw(e){try{return this.storage?.getItem(`nextfloor.${e}`)??null}catch{return null}}load(e=""){let t={};for(let r of Object.keys(ps)){let i=ps[r],o=this.raw(i.name);t[r]=o===null?i.fallback:i.read(o)}return new URLSearchParams(e).has("nf_stats")&&(t.stats=!0),t}save(e,t){let r=ps[e];try{this.storage?.setItem(`nextfloor.${r.name}`,r.write(t))}catch{}}};var pd=Q` .nf-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #ffb547; box-shadow: 0 0 8px #ffb547; vertical-align: middle; } :host { display: block; /* HA gives the custom panel's parent no explicit height, so 100% collapses. */ height: 100vh; height: 100dvh; background: var(--nf-bg); } .nf-app { display: flex; flex-direction: column; height: 100%; min-height: 0; } .nf-header { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 4px; min-height: 56px; border-bottom: var(--app-header-border-bottom, 1px solid var(--nf-line)); background: var(--app-header-background-color, var(--nf-chrome-solid)); color: var(--app-header-text-color, var(--nf-text)); flex-wrap: wrap; /* above the room bar, so a menu opened from the header (the screen's announcements) is not covered */ position: relative; z-index: 30; } ha-menu-button { color: var(--app-header-text-color, var(--nf-text)); } h1 { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 20px; margin: 0 4px 0 8px; white-space: nowrap; } .nf-mark { flex: none; width: 26px; height: 28px; color: var(--nf-accent); } .nf-view-title { min-width: 0; max-width: min(340px, 45vw); overflow: hidden; text-overflow: ellipsis; } .nf-notices { display: grid; gap: 6px; padding: 8px 14px 0; } .nf-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--nf-line); background: var(--nf-chrome-solid); font-size: 13.5px; } .nf-notice span { flex: 1; min-width: 200px; } .nf-notice-warn { border-color: color-mix(in srgb, var(--nf-warm) 60%, transparent); color: var(--nf-warm); } .nf-notice-error { border-color: color-mix(in srgb, var(--nf-danger) 60%, transparent); color: var(--nf-danger); word-break: break-word; } .nf-chip-on { background: var(--nf-accent); color: var(--nf-accent-text); } .nf-furnish-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: calc(100% - 24px); padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--nf-chrome); box-shadow: var(--nf-shadow); font-size: 13.5px; } .nf-size-select { font: inherit; color: var(--nf-text); background: var(--nf-chrome-solid); border: 1px solid var(--nf-line); border-radius: 999px; padding: 4px 10px; } .nf-size { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--nf-muted); } .nf-size input { width: 58px; padding: 5px 6px; border: 1px solid rgba(127, 127, 127, 0.35); border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 13px; } .nf-danger-chip { color: var(--nf-danger); } .nf-grow { flex: 1; } .nf-save { font-size: 12.5px; color: var(--nf-muted); } .nf-view-opts { display: contents; } .nf-opts-btn { display: none; } /* phones: the view options fold behind ⚙ (one header row instead of three) */ @media (max-width: 700px) { .nf-opts-btn { display: grid; place-items: center; order: 3; width: 36px; height: 36px; border: 1px solid var(--nf-line); border-radius: 10px; background: transparent; color: var(--nf-text); font-size: 17px; cursor: pointer; } .nf-opts-btn[aria-expanded="true"] { color: var(--nf-accent); border-color: var(--nf-accent); } .nf-view-opts { display: none; } .nf-view-opts.nf-opts-open { display: flex; flex-wrap: wrap; gap: 8px; order: 5; width: 100%; } .nf-version { order: 4; } .nf-header .nf-grow { display: none; } } /* the installed version, at the far right of the header */ .nf-version { margin-left: auto; font-size: 11.5px; color: var(--nf-muted); white-space: nowrap; opacity: 0.8; } .nf-save-error { color: var(--nf-danger); } .nf-body { flex: 1; min-height: 0; } /* the colour well beside the look: a small round swatch, the reset arrow next to it */ .nf-accent-pick { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; } .nf-clock-pick { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 10px; font-size: 14px; } .nf-clock-pick select { border: 0; background: none; color: var(--nf-text); font: inherit; font-size: 13px; padding: 6px 2px; cursor: pointer; } .nf-clock-pick option { color: #111; } .nf-glass-pick { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 13px; } .nf-glass-pick input { width: 80px; accent-color: var(--nf-accent); } .nf-screen-pick { position: relative; display: inline-flex; align-items: center; } .nf-screen-pick > summary { list-style: none; cursor: pointer; padding: 6px 10px; font-size: 14px; } .nf-screen-pick > summary::-webkit-details-marker { display: none; } .nf-screen-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; gap: 10px; width: 260px; padding: 12px; border: 1px solid var(--nf-line); border-radius: 14px; background: var(--nf-chrome-solid); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); } .nf-screen-menu .nf-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--nf-text); } .nf-screen-hint { margin: 0; font-size: 12px; color: var(--nf-muted); } .nf-accent-pick input[type="color"] { width: 22px; height: 22px; padding: 0; border: 1px solid var(--nf-line); border-radius: 50%; background: none; cursor: pointer; } .nf-accent-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; } .nf-accent-pick input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; } .nf-accent-reset { border: none; background: none; color: var(--nf-muted); cursor: pointer; font-size: 14px; padding: 0 2px; } .nf-nav { display: flex; align-items: center; gap: 6px; padding: 10px 14px; overflow-x: auto; scrollbar-width: none; flex: none; } /* a desktop shows a thin scrollbar while the pointer rests on the bar */ .nf-nav:hover { scrollbar-width: thin; } /* wrapped: several lines, at most about three before the bar itself scrolls */ .nf-nav-wrap { flex-wrap: wrap; overflow-x: visible; overflow-y: auto; max-height: 132px; } .nf-nav-floor { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--nf-muted); margin-left: 6px; } .nf-nav-toggle { flex: none; margin-left: auto; position: sticky; right: 0; min-width: 34px; padding-left: 8px; padding-right: 8px; } .nf-nav .nf-chip { box-shadow: none; border: 1px solid var(--nf-line); } .nf-sep { flex: none; width: 1px; margin: 4px 4px; background: var(--nf-line); } .nf-stage-wrap { position: relative; flex: 1; min-height: 0; display: flex; container-type: size; container-name: nf; } .nf-stage-wrap nf-view3d { flex: 1; } .nf-room-panel { position: absolute; top: 58px; right: 14px; bottom: 14px; width: min(360px, calc(100% - 28px)); display: flex; flex-direction: column; justify-content: flex-start; pointer-events: none; } /* folded, the panel is only its title bar: on a wide stage it drops to the bottom edge, above the switches, instead of hanging in the picture */ .nf-room-panel[folded] { justify-content: flex-end; bottom: 62px; } .nf-clean .nf-room-panel[folded] { bottom: 14px; } /* the switches sit at the bottom (as in the card), where they never meet the energy values or warnings */ nf-view3d { --nf-bottom-inset: 52px; } .nf-clean nf-view3d { --nf-bottom-inset: 0px; } .nf-furnish-bar { bottom: 68px; } /* small landscape tablets: the room panel gets a little more of the width, its rows stay easy to hit */ @container nf ((min-width: 701px) and (max-width: 1180px)) { .nf-room-panel { width: min(420px, 44%); } } /* phones and portrait tablets: panel as a sheet at the bottom, the switches step aside */ @container nf ((max-width: 700px) or ((orientation: portrait) and (max-width: 1000px))) { .nf-room-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 55%; justify-content: flex-end; } .nf-room-open .nf-overlay { display: none; } } .nf-overlay { position: absolute; right: 12px; bottom: 12px; /* room for the search button and the row beside it (eye, lock, walk, time travel) */ left: 236px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; align-items: center; pointer-events: none; } .nf-overlay > * { pointer-events: auto; } /* phones: the bar only holds the switches button and "back", so it can span the bottom; the buttons of the view sit above it */ @container nf (max-width: 700px) { .nf-overlay { left: 12px; } .nf-switches { left: 0; width: auto; } } /* the switches: a menu that opens upwards from the bar, over the stage, closed by a tap beside it or Escape */ .nf-switches-veil { position: fixed; inset: 0; z-index: 4; } .nf-switches { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: min(520px, calc(100cqw - 24px)); max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--nf-line); border-radius: 14px; background: var(--nf-chrome-solid); box-shadow: var(--nf-shadow); } .nf-switches .nf-seg { flex-wrap: wrap; } .nf-switches .nf-chip { box-shadow: none; } .nf-caret { font-size: 0.75em; opacity: 0.7; } .nf-quality button { padding: 5px 11px; min-height: 30px; font-size: 13px; } .nf-message, .nf-empty { padding: 32px 20px; color: var(--nf-muted); text-align: center; } .nf-empty { display: grid; justify-items: center; gap: 12px; margin: auto; } `;var fd=new WeakMap,gd=new WeakMap;function Mt(n,e){let t=gd.get(n)??n,r=fd.get(t)??new WeakMap;fd.set(t,r);let i=r.get(e);if(i)return i;let o=new Map;for(let l of e)for(let c of l.placements)c.entity_id.startsWith("cover.")&&o.set(c.entity_id,{tilt:c.cover_tilt==="none"?null:c.cover_tilt,position:c.position});for(let l of Ve(t,e).values())l.cover&&!o.has(l.cover)&&o.set(l.cover,{tilt:l.coverTilt,position:l.position}),l.cover2&&!o.has(l.cover2)&&o.set(l.cover2,{tilt:l.cover2Tilt});let s={...t.states};for(let[l,c]of o){let u=t.states[l];if(!u)continue;let h={...u.attributes,nf_cover_control:!0},m=Ct(t,c.position);m===null&&(m=typeof u.attributes.current_position=="number"?u.attributes.current_position:null),m!==null&&(h.current_position=m);let d=c.tilt?t.states[c.tilt]:u,g=typeof d?.attributes.current_tilt_position=="number"?d.attributes.current_tilt_position:c.tilt?Ct(t,c.tilt):null;g!==null&&(h.current_tilt_position=g,h.supported_features=Number(h.supported_features??0)|128);let _=u.state;typeof h.current_position=="number"&&_!=="unavailable"&&_!=="unknown"&&_!=="opening"&&_!=="closing"&&(_=h.current_position>0?"open":"closed"),s[l]={...u,state:_,attributes:h}}let a={...t,states:s,callService:async(l,c,u={})=>{if(l!=="cover")return t.callService(l,c,u);let h=Array.isArray(u.entity_id)?u.entity_id:[u.entity_id],m=async d=>{let g=typeof d=="string"?o.get(d):void 0;if(!g)return t.callService(l,c,{...u,entity_id:d});let _={...u,entity_id:d},b=c;(b==="toggle"||b==="toggle_cover")&&(b=s[String(d)]?.state==="closed"?"open_cover":"close_cover");let y=b.includes("tilt");y&&g.tilt&&(_.entity_id=g.tilt);let $=g.tilt?t.states[g.tilt]:void 0;return y&&g.tilt&&!$?.attributes.symcon_id&&typeof $?.attributes.current_tilt_position!="number"&&(b==="set_cover_tilt_position"?(b="set_cover_position",_.position=_.tilt_position,delete _.tilt_position):b==="open_cover_tilt"?b="open_cover":b==="close_cover_tilt"&&(b="close_cover")),t.callService(l,b,_)};return Array.isArray(u.entity_id)?Promise.all(h.map(m)):m(h[0])}};return gd.set(a,t),r.set(e,a),a}var fs=class extends X{static properties={hass:{attribute:!1},narrow:{type:Boolean},route:{attribute:!1},panel:{attribute:!1},_mode:{state:!0},_editorReady:{state:!0},_floorId:{state:!0},_roomId:{state:!0},_wallMode:{state:!0},_prefs:{state:!0},_furnish:{state:!0},_selFurniture:{state:!0},_selDevice:{state:!0},_optsOpen:{state:!0},_switchesOpen:{state:!0},_timeOfDay:{state:!0},_outside:{state:!0},_timeDrag:{state:!0},_floorUndo:{state:!0},_variablesLoading:{state:!0},_variablesNotice:{state:!0},_variablesError:{state:!0}};outsideMemo=null;floorUndoTimer;data=new Pt(this);store=new fi(gi());constructor(){super(),this.narrow=!1,this._mode="view",this._editorReady=!!customElements.get("nf-editor"),this._floorId=null,this._roomId=null,this._wallMode="auto",this._prefs=this.store.load(location.search),this._furnish=!1,this._selFurniture=null,this._selDevice=null,this._optsOpen=!1,this._switchesOpen=!1,this._timeOfDay=null,this._outside=!1,this._timeDrag=null,this._floorUndo=null,this._variablesLoading=!1,this._variablesNotice="",this._variablesError=!1}toggleTimeSlider(e){this.setPref("timeSlider",e),e||([this._timeOfDay,this._timeDrag]=[null,null])}sunState(){let e=this.hass?.config;return this._timeOfDay===null||e?.latitude===void 0||e.longitude===void 0?this.hass?.states["sun.sun"]?.state:_t(zt(this._timeOfDay,e.time_zone),e.latitude,e.longitude).elevation>0?"above_horizon":"below_horizon"}renderTimeOfDay(){let e=this.t;if(this.hass?.config?.latitude===void 0)return f;let t=this._timeDrag??this._timeOfDay,r=o=>`${String(Math.floor(o)).padStart(2,"0")}:${String(Math.round(o%1*60)).padStart(2,"0")}`,i=()=>{let o=new Date;return Math.round((o.getHours()+o.getMinutes()/60)*4)/4};return p` ${t!==null?p``:f}`}t=(e,t)=>M(this.hass,e,t);setPref(e,t){this._prefs={...this._prefs,[e]:t},this.store.save(e,t)}willUpdate(e){this.toggleAttribute("readable",!!this._prefs?.readable),e.has("hass")&&this.hass&&(this.style.colorScheme=Hr(this.hass),this.data.setHass(this.hass));let t=this.data.building;t&&this._floorId&&!t.floors.some(r=>r.id===this._floorId)&&(this._floorId=null,this._roomId=null)}get isAdmin(){return this.hass?.user?.is_admin??!1}setMode(e){e!=="view"&&!this.isAdmin||e!==this._mode&&(e==="view"&&this.data.flush(),this._mode=e)}openFloor(e){this._floorId=e,this._roomId=null,this._outside=!1}outsideIds(e){let t=this.outsideMemo;if(t&&t.building===e&&t.entities===this.hass.entities)return t.ids;let r=yn(this.hass,e.floors,e.settings.outside_hidden);return this.outsideMemo={building:e,entities:this.hass.entities,ids:r},r}openOutside(){let e=!this._outside;this.openFloor(null),this._outside=e}onRoomTap(e){let{floorId:t,roomId:r}=e.detail;if(r==="nf-outside")return this.openOutside();if((this.data.building?.floors.length??0)>1&&t&&this._floorId!==t)return this.openFloor(t);r&&(this._roomId=r===this._roomId?null:r,this._outside=!1)}furnishHost={hass:void 0,building:void 0,t:this.t,editFurniture:(e,t)=>this.applyEdit(r=>mi(r,e,t)),editDevice:(e,t)=>this.applyEdit(r=>pi(r,e,t)),turnFurniture:(e,t)=>this.applyEdit(r=>mi(r,e,i=>i.rotation=hs(i.rotation,t))),turnDevice:(e,t)=>this.applyEdit(r=>pi(r,e,i=>i.rotation=hs(i.rotation??0,t))),removeFurniture:e=>{this.applyEdit(t=>rd(t,e)),this._selFurniture=null},removeDevice:e=>{this.applyEdit(t=>id(t,e)),this._selDevice=null},finish:()=>{this._furnish=!1,this._selFurniture=null,this._selDevice=null}};saveMoods(e,t){this.applyEdit(r=>({...r,floors:r.floors.map(i=>({...i,rooms:i.rooms.map(o=>o.id===e?{...o,moods:t.length?t:void 0}:o)}))}))}applyEdit(e){let t=this.data.building;t&&this.data.edit(e(t))}view3d(){return this.renderRoot.querySelector("nf-view3d")}back(){this._outside?this._outside=!1:this._roomId?this._roomId=null:this._floorId&&(this.data.building?.floors.length??0)>1?this._floorId=null:this.view3d()?.resetView()}onKey=e=>{e.key!=="Escape"||this._mode!=="view"||(this._prefs.clean?this.setPref("clean",!1):this.back())};connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.onKey)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.onKey)}render(){if(this.hass&&Er(this.hass,this))return f;let e=this.data.building,t=this._prefs.clean&&this._mode==="view",r=f;return e&&(this._mode==="editor"&&this.isAdmin?r=this.renderEditor(e):this._mode==="extensions"&&this.isAdmin?r=this.renderExtensions():r=this.renderView(e)),p`
    ${t?f:p`${this.renderHeader(e)}${this.renderNotices()}`} ${this.data.error&&!e?p`

    ${this.t("load_error")}: ${this.data.error}

    `:f} ${!e&&!this.data.error?p`

    ${this.t("loading")}

    `:f} ${r}
    `}choiceRow(e,t,r,i,o,s=f){return p`
    ${t.map(a=>p``)}${s}
    `}accentPicker(){let e=this._prefs.accent;return p``}renderViewOptions(){let e=this._prefs;return p`
    ${this.choiceRow("quality",["auto","low","high"],e.quality,t=>this.t(`quality_${t}`),t=>this.setPref("quality",t))} ${this.choiceRow("theme",ei,e.theme,t=>this.t(`theme_${t}`),t=>this.setPref("theme",t),this.accentPicker())} ${this.choiceRow("markers",["none","important","all"],e.markers,t=>this.t(`markers_${t}`),t=>this.setPref("markers",t))} ${B(this.hass)?f:p`
    ${e.announceMuted?"\u{1F507}":"\u{1F4E2}"}

    ${this.t("screen_name_hint")}

    `}
    `}async reloadVariables(){if(!(this._variablesLoading||!this.hass.symconRefresh)){this._variablesLoading=!0,this._variablesNotice="",this._variablesError=!1;try{await this.hass.symconRefresh(),this._variablesNotice=this.t("symcon_variables_loaded")}catch(e){this._variablesError=!0,this._variablesNotice=this.t("symcon_variables_error",{error:e instanceof Error?e.message:String(e)})}finally{this._variablesLoading=!1}}}renderHeader(e){let t=this.hass?.symconTitle?.trim()||"NextFloor",r=this.data.saveState,i=(s,a,l="")=>p``,o=r==="saving"?"saving":r==="saved"?"saved":"save_error";return p`

    ${dd}${t}

    ${this.isAdmin?p`
    ${i("view",this.t("view"))}${i("editor",this.t("editor"))}${i("extensions",`\u2726 ${this.t("ext_tab")}`,"nf-tab-ext")}
    `:f} ${this._mode==="view"&&e?.floors.some(s=>s.rooms.length)?p``:f} ${this.isAdmin&&this.hass.symconRefresh?p``:f} ${this._mode==="view"&&e?.floors.some(s=>s.rooms.length)?this.renderViewOptions():f} ${this._mode==="editor"&&r!=="idle"?p`${this.t(o)}`:f} v${this.data.frontendVersion}
    `}renderNotices(){let e=this.data,t=[];if(this._variablesNotice&&t.push(p`
    ${this._variablesNotice}
    `),e.needsRestart&&t.push(e.versionGap==="frontend"?p`
    ${this.t("needs_reload",{frontend:e.frontendVersion,backend:e.backendVersion??"?"})}
    `:p`
    ${e.backendVersion?this.t("needs_restart",{version:e.backendVersion,frontend:e.frontendVersion}):this.t("needs_restart_old")}
    `),e.saveState==="error"&&e.saveError&&t.push(p`
    ${this.t("save_failed_detail",{error:e.saveError})}
    `),e.draft&&this.isAdmin){let r=new Date(e.draft.savedAt).toLocaleString(this.hass?.language);t.push(p`
    ${this.t("draft_found",{time:r})}
    `)}return t.length>0?p`
    ${t}
    `:f}whenEditorLoaded(e){return this._editorReady?e():(Xu().then(()=>this._editorReady=!0,t=>this.data.error=String(t)),p`

    ${this.t("loading")}

    `)}renderExtensions(){return this.whenEditorLoaded(()=>p`{this.data.reloadPacks()}} @plugins-changed=${e=>this.applyEdit(t=>({...t,settings:{...t.settings,plugins:e.detail}}))}>`)}renderEditor(e){return this.whenEditorLoaded(()=>p`this.setPref("roomNames",t.detail.value)} .packs=${this.data.packs} .loadCardEditor=${Xn} @packs-changed=${()=>{this.data.reloadPacks()}} @building-changed=${t=>this.data.edit(t.detail.building)} >`)}onNavWheel=e=>{if(this._prefs.navWrap||!e.deltaY||e.deltaX)return;let t=e.currentTarget;t.scrollWidth<=t.clientWidth||(t.scrollLeft+=e.deltaY,e.preventDefault())};allOffChip(e){let t=this._floorId?e.floors.find(i=>i.id===this._floorId):e.floors.length===1?e.floors[0]:void 0;if(!t||!this.hass)return f;if(this._floorUndo){let i=this._floorUndo;return p``}let r=Tn(gc(t).map(i=>this.hass.states[i]));return r.count<2?f:p``}renderNav(e){let t=e.floors.filter(c=>!this._floorId||c.id===this._floorId),r=e.floors.length>1,i=this._prefs.navWrap,o=this.outsideIds(e).length?p``:f,s=r?p` ${[...e.floors].reverse().map(c=>p``)} ${o} ${this.allOffChip(e)} `:p`${o} ${this.allOffChip(e)}`,a=t.flatMap(c=>[t.length>1&&c.rooms.length?p`${c.name}`:f,...c.rooms.map(u=>p``)]),l=this.t(i?"nav_row":"nav_wrap");return p``}toggleChip(e,t,r){return p``}renderOverlay(e){let t=this._prefs,r=this.t,i=(u,h)=>p`
    ${[u,h].map(([m,d,g])=>p``)}
    `,o=["none","temperature","humidity","co2","mould","comfort","power","sun","values","wifi"],s=["dim","stacked","single"],a=e.floors.length>1,l=this._roomId||this._floorId&&a?p``:f,c=p``;return this._switchesOpen?p`
    this._switchesOpen=!1}>
    u.key==="Escape"&&(this._switchesOpen=!1)}>
    ${["auto","cut","slope"].map(u=>p``)}
    ${a&&!this._floorId?i([t.explode,()=>this.setPref("explode",!0),r("floors_apart")],[!t.explode,()=>this.setPref("explode",!1),r("floors_stacked")]):f} ${!this._floorId&&e.settings.roof.type!=="none"?p`
    `:f} ${a&&this._floorId?p`
    ${s.map(u=>p``)}
    `:f}
    ${o.map(u=>p``)}
    ${this.toggleChip("roomNames","room_names_short")} ${this.toggleChip("weather","weather_short","weather_hint")} ${t.timeSlider?this.renderTimeOfDay():f}
    ${c}${l}
    `:p`
    ${c}${l}
    `}renderView(e){if(!e.floors.some(i=>i.rooms.length))return p`

    ${this.t(this.isAdmin?e.floors.length?"no_rooms_admin":"no_building_admin":"no_building")}

    ${this.isAdmin?p``:f}
    `;let t=this._prefs,r=e.floors.flatMap(i=>i.rooms).find(i=>i.id===this._roomId)??null;return this.furnishHost.hass=this.hass,this.furnishHost.building=e,p` ${t.clean?f:this.renderNav(e)}
    this.setPref("clean",!t.clean)} ?weather=${t.weather} .panelOpen=${!!this._roomId||this._outside} .floorId=${e.floors.length>1?this._floorId:e.floors[0]?.id??null} .roomId=${this._roomId} .outsideOpen=${this._outside} .wallMode=${this._wallMode} .solidWalls=${t.solidWalls} .explode=${t.explode} .keepRoof=${t.keepRoof} .markerMode=${t.markers} .heatMode=${t.heat} .theme=${ti(t.theme,this.sunState())} .timeOfDay=${this._timeOfDay} .clock=${t.clock==="none"?null:t.clock} .announcements=${!B(this.hass)&&!t.announceMuted} .glassWalls=${t.glassWalls} .screenName=${t.screenName||null} .lockButton=${!0} .walkButton=${!0} .travelButton=${!0} .accent=${t.accent} .centralOpen=${t.menuOpen} .keepCamera=${t.keepCamera} .plain=${t.plain} .rightBack=${t.rightBack} .readable=${t.readable} .zoom=${t.zoom/100} ?furnish=${this._furnish} .selectedFurniture=${this._selFurniture} @furniture-select=${i=>this._selFurniture=i.detail.id} @furniture-move=${i=>this.applyEdit(o=>sd(o,i.detail.id,i.detail.x,i.detail.z))} @device-select=${i=>this._selDevice=i.detail.id} @device-move=${i=>this.applyEdit(o=>od(o,i.detail.id,i.detail.x,i.detail.z))} .quality=${t.quality} ?showStats=${t.stats} @room-tap=${this.onRoomTap} @floor-tap=${i=>this.openFloor(i.detail.floorId)} @back=${()=>this.back()} > ${r?p`i.rooms.some(o=>o.id===this._roomId))??null} .confirmEntities=${vt(this.hass,e.floors)} .phrases=${e.settings.announce_phrases??null} .rooms=${e.floors.flatMap(i=>i.rooms)} @mood-change=${i=>this.saveMoods(i.detail.roomId,i.detail.moods)} @close=${()=>this._roomId=null} >`:this._outside?p`this._outside=!1} >`:f} ${t.clean?f:this.renderOverlay(e)} ${this._furnish?ud(this.furnishHost,this._selFurniture,this._selDevice):f}
    `}static styles=[ve,Pe,pd,Dr]};customElements.get("nextfloor-panel")||customElements.define("nextfloor-panel",fs);var mg=/^(\d{1,2}):(\d{2})\s*-\s*(\d{1,2}):(\d{2})$/,_d=(n,e)=>Number(n)*60+Number(e);function qn(n,e,t=new Date){if(!n||n==="off")return!1;if(n==="sun")return e?.states["sun.sun"]?.state==="below_horizon";let r=mg.exec(n.trim());if(!r)return!1;let i=_d(r[1],r[2]),o=_d(r[3],r[4]),s=t.getHours()*60+t.getMinutes();return i>o?s>=i||s=i&&s0&&(e&&this.host.isClean()&&this.host.setClean(!1),this.cleanTimer=setTimeout(()=>this.host.setClean(!0),t*1e3))}stopClean(){clearTimeout(this.cleanTimer)}armIdle(){clearTimeout(this.idleTimer);let e=this.host.config()?.idle_return??0;e>0&&(this.idleTimer=setTimeout(()=>this.host.goHome(),e*1e3))}touched(){this.host.isOrbit()&&this.host.setOrbit(!1),this.armIdle(),this.armClean(!0)}start(){this.armIdle(),this.nightTimer=setInterval(()=>this.host.setNight(qn(this.host.config()?.night,this.host.hass())),6e4)}stop(){clearTimeout(this.cleanTimer),clearTimeout(this.idleTimer),clearInterval(this.nightTimer)}};function bd(n,e){return n?n.floors.filter(t=>(e===null||t.id===e)&&t.rooms.length>0).map(t=>({floorId:t.id,floorName:t.name,rooms:t.rooms.map(r=>({id:r.id,name:r.name||"\u2013",floorId:t.id}))})):[]}var yd=Q` ha-card { overflow: hidden; background: var(--nf-bg); height: 100%; } /* night (kiosk): the whole card dimmed */ ha-card.nf-night .nf-card-body { filter: brightness(0.55); } .nf-card-body { position: relative; display: flex; height: 100%; container-type: size; container-name: nf; } nf-view3d { flex: 1; } .nf-card-msg { margin: auto; color: var(--nf-muted); padding: 16px; text-align: center; } /* the room buttons: a row along the top, clear of the toggles at the left and the corner buttons at the right */ .nf-card-rooms { position: absolute; top: 8px; left: 56px; right: 56px; z-index: 3; display: flex; align-items: center; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; } /* with the room's side panel open the row ends where the panel starts */ @container nf (min-width: 700px) { .nf-card-rooms-beside { right: 372px; } } .nf-card-rooms::-webkit-scrollbar { display: none; } .nf-card-rooms button { flex: none; } .nf-card-rooms-floor { flex: none; color: var(--nf-soft); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; margin-left: 6px; } .nf-card-controls { position: absolute; left: 60px; right: 10px; bottom: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; pointer-events: none; } .nf-card-controls > * { pointer-events: auto; } .nf-card-full { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--nf-chrome); color: var(--nf-text); box-shadow: var(--nf-shadow); font-size: 18px; cursor: pointer; } .nf-card-dash { width: auto; min-width: 38px; padding: 0 12px; font-size: 14px; font-weight: 600; } .nf-card-dash-2 { right: 56px; } .nf-card-panel { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(340px, calc(100% - 20px)); display: flex; flex-direction: column; pointer-events: none; } /* folded, only the title bar is left: it drops to the bottom edge instead of hanging in the picture */ .nf-card-panel[folded] { justify-content: flex-end; } /* phones and portrait tablets: the room panel becomes a sheet at the bottom */ @container nf ((max-width: 700px) or ((orientation: portrait) and (max-width: 1000px))) { .nf-card-panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: 55%; justify-content: flex-end; } } `;function gs(n,e){let t=n.template,r=t?e?.[t]:void 0;if(!r)return n;let{type:i,template:o,...s}=r;return{...s,...n}}function vd(n,e){let t=new Set(e),r=[];for(let o of n.floors){let s=o.rooms.filter(c=>t.has(c.id));if(!s.length)continue;let a=(c,u)=>s.some(h=>h.points.length>=3&&H([c,u],h.points)),l=new Set(s.map(c=>c.id));r.push({...o,rooms:s,openings:o.openings.filter(c=>l.has(c.room_id)),furniture:o.furniture.filter(c=>a(c.x,c.z)),placements:o.placements.filter(c=>a(c.x,c.z)),walls:(o.walls??[]).filter(c=>a((c.a[0]+c.b[0])/2,(c.a[1]+c.b[1])/2)),outdoor:[]})}let i={...n.settings.roof,type:"none",sections:[],solar:[]};return{...n,floors:r,settings:{...n.settings,roof:i}}}var rn="nf-outside",_s=class extends X{static properties={hass:{attribute:!1},_config:{state:!0},_roomId:{state:!0},_floorId:{state:!0},_walls:{state:!0},_heat:{state:!0},_explode:{state:!0},_fullscreen:{state:!0},_clean:{state:!0},_night:{state:!0},_orbit:{state:!0},_roomNames:{state:!0}};_own=null;templatesSeen;roomApplied=!1;data=new Pt(this);kiosk=new _i({config:()=>this._config,hass:()=>this.hass,setClean:e=>this._clean=e,isClean:()=>this._clean,setOrbit:e=>this._orbit=e,isOrbit:()=>this._orbit,setNight:e=>this._night=e,goHome:()=>this.returnHome()});constructor(){super(),this._roomId=null,this._floorId=void 0,this._walls=null,this._heat=null,this._explode=null,this._fullscreen=!1,this._clean=!1,this._night=!1,this._orbit=!1,this._roomNames=null}view3d(){return this.shadowRoot?.querySelector("nf-view3d")}returnHome(){this._roomId=this._config?.room??null,this._floorId=void 0,this.view3d()?.resetView(),this._config?.idle_orbit&&(this._orbit=!0)}openDashboard(e){history.pushState(null,"",e),window.dispatchEvent(new CustomEvent("location-changed",{bubbles:!0,composed:!0,detail:{replace:!1}}))}onFullscreen=()=>this._fullscreen=!!document.fullscreenElement&&this.shadowRoot?.contains(document.fullscreenElement)===!0;connectedCallback(){super.connectedCallback(),document.addEventListener("fullscreenchange",this.onFullscreen),this.kiosk.start()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("fullscreenchange",this.onFullscreen),this.kiosk.stop()}toggleFullscreen(){document.fullscreenElement?document.exitFullscreen():this.shadowRoot?.querySelector("ha-card")?.requestFullscreen?.()}static async getConfigElement(){return await Xn(),document.createElement("nextfloor-card-editor")}static getStubConfig(){return{type:"custom:nextfloor-card"}}setConfig(e){if(e.height!==void 0&&!(e.height>100))throw new Error("height must be a number of pixels above 100");this._roomNames=null,this._own=e,this._config=gs(e,this.data.building?.settings.card_templates),this._floorId=void 0,this._walls=null,this._heat=null,this._explode=null,this._orbit=!1,this._night=qn(e.night,this.hass),this._clean=e.controls_hidden===!0,this.kiosk.armClean(),this.kiosk.armIdle()}getCardSize(){return Math.ceil((this._config?.height??420)/50)}getGridOptions(){return{columns:"full",rows:this._config?.fill?12:Math.ceil((this._config?.height??420)/56),min_rows:4}}willUpdate(e){let t=this.data.building?.settings.card_templates;if(this._own?.template&&t!==this.templatesSeen&&(this.templatesSeen=t,this._config=gs(this._own,t)),this.toggleAttribute("readable",this._config?.readable===!0),e.has("hass")&&(this.style.colorScheme=Hr(this.hass)),!e.has("hass")||!this.hass)return;this.data.setHass(this.hass);let r=qn(this._config?.night,this.hass);r!==this._night&&(this._night=r)}get canSwitch(){return!this._config?.floor||this.thumbs}get thumbs(){return this._config?.floor_thumbs??!this._config?.floor}back(){this._roomId?this._roomId=null:this.canSwitch&&(this._floorId=null)}roomsMemo=null;plan(){let e=this.data.building??null,t=this._config?.rooms;if(!e||!t?.length)return e;let r=t.join(",");return(!this.roomsMemo||this.roomsMemo.source!==e||this.roomsMemo.ids!==r)&&(this.roomsMemo={source:e,ids:r,result:vd(e,t)}),this.roomsMemo.result}t=e=>M(this.hass,e);stage(){let e=this.plan(),t=this._config,r=this._floorId===void 0?t?.floor??null:this._floorId,i=e&&e.floors.length===1?e.floors[0].id:e?.floors.some(a=>a.id===r)?r:null,o=!!this._roomId&&t?.room_panel!==!1,s=!!this._roomId&&t?.room_panel===!1||!this.thumbs&&this.canSwitch&&!this._roomId&&!!i&&(e?.floors.length??0)>1;return{floorId:i,walls:this._walls??t?.walls??"auto",heat:this._heat??t?.heatmap??"none",explode:this._explode??t?.explode??!0,canGoBack:s,showBar:!!e&&!this._clean&&(s||!!t?.controls&&!o)}}shows(e){let t=this._config?.controls;return t===!0||Array.isArray(t)&&t.includes(e)}renderBar(e){let t=this.plan(),r=this.t,i=["temperature","humidity","co2"].filter(s=>this.shows(s)),o=(s,a)=>p`
    ${a.map(([l,c,u])=>p``)}
    `;return p`
    ${e.canGoBack?p``:f} ${this.shows("walls")?o(void 0,[[e.walls==="auto",()=>this._walls="auto",r("walls_auto")],[e.walls==="cut",()=>this._walls="cut",r("walls_cut")],[e.walls==="slope",()=>this._walls="slope",r("walls_slope")]]):f} ${this.shows("floors")&&t.floors.length>1&&!e.floorId?o(void 0,[[e.explode,()=>this._explode=!0,r("floors_apart")],[!e.explode,()=>this._explode=!1,r("floors_stacked")]]):f} ${i.length>0?o(r("heatmap"),["none",...i].map(s=>[e.heat===s,()=>this._heat=s,r(s==="none"?"heat_off":`heat_short_${s}`)])):f}
    `}renderRoomButtons(e){let t=this.plan();if(!this._config?.room_buttons||!t||this._clean)return f;let r=bd(t,e.floorId);if(!r.length)return f;let i=r.length>1,o=(l,c)=>{this.canSwitch&&l!==e.floorId&&(this._floorId=l),this._roomId=c===this._roomId?null:c},s=yn(this.hass,t.floors).length>0,a=()=>{this.canSwitch&&(this._floorId=null),this._roomId=this._roomId===rn?null:rn};return p`
    ${r.map(l=>p`${i?p`${l.floorName}`:f}${l.rooms.map(c=>p``)}`)} ${s?p``:f}
    `}renderCorners(){let e=this._config,t=this.t,r=this._clean||!!this._roomId&&e?.room_panel!==!1;return p`${e?.fullscreen_button&&!r?p``:f} ${e?.dashboard&&!r?p``:f}`}renderStage(e){let t=this.plan(),r=this._config,i=()=>{this._clean=!this._clean,this._clean?this.kiosk.stopClean():this.kiosk.armClean()},o=r?.controls_hidden!==void 0||(r?.controls_hide_after??0)>0;return p`({id:`card_${a}`,...s}))??null} .heatMode=${e.heat} .theme=${ti(r?.theme,this.hass?.states["sun.sun"]?.state)} .clock=${r?.clock&&r.clock!=="none"?r.clock:null} .lockButton=${r?.lock_button!==!1} .walkButton=${r?.walk_button!==!1} .travelButton=${r?.time_travel!==!1} .accent=${r?.accent??null} .furnitureColors=${r?.furniture_colors??null} .showEnergy=${r?.energy??!0} .flows=${r?.flows??null} .holograms=${r?.holograms??null} .floorThumbs=${this.thumbs} .roomLabels=${this._roomNames??r?.room_names!==!1} .roomNamesButton=${!0} @room-names-change=${s=>this._roomNames=s.detail.value} .floorStack=${r?.floor_stack??"dim"} .panelOpen=${!!this._roomId&&r?.room_panel!==!1} .alerts=${r?.alerts!==!1} .alertJump=${!!r?.alert_jump} .announcements=${!B(this.hass)&&r?.announcements!==!1&&!md()} .sensorBar=${r?.sensor_bar!==!1} .glassWalls=${typeof r?.glass_walls=="number"?Math.min(100,Math.max(0,r.glass_walls)):null} .screenName=${r?.screen_name??hd()} .scenes=${r?.scenes!==!1} .clean=${this._clean} .cleanButton=${o} @clean-toggle=${i} ?weather=${r?.weather!==!1} .weatherEntityId=${r?.weather_entity??null} .weatherDensity=${r?.weather_density??1} .dimmed=${this._night} .autoOrbit=${this._orbit} .startView=${r?.start_view??null} style=${e.showBar?"--nf-bottom-inset: 52px":""} @room-tap=${s=>{this.canSwitch&&t.floors.length>1&&s.detail.floorId&&e.floorId!==s.detail.floorId?(this._floorId=s.detail.floorId,this._roomId=null):s.detail.roomId&&(this._roomId=s.detail.roomId===this._roomId?null:s.detail.roomId)}} @floor-tap=${s=>{this._floorId=s.detail.floorId,this._roomId=null}} @back=${()=>this.back()} >`}renderRoomPanel(){let e=this.plan();return p`t.rooms).find(t=>t.id===this._roomId)??null} .floor=${e.floors.find(t=>t.rooms.some(r=>r.id===this._roomId))??null} .outside=${this._roomId===rn?yn(this.hass,e.floors):null} .confirmEntities=${vt(this.hass,e.floors)} .phrases=${e.settings.announce_phrases??null} @close=${()=>this._roomId=null} >`}render(){if(this.hass&&Er(this.hass,this))return f;let e=this.plan(),t=this._config;!this.roomApplied&&e&&t?.room&&(this.roomApplied=!0,e.floors.some(a=>a.rooms.some(l=>l.id===t.room))&&(this._roomId=t.room));let r=this.stage(),i=this._fullscreen?"100vh":t?.fill?"calc(100vh - var(--header-height, 56px) - 16px)":`${t?.height??420}px`,o=/^#[0-9a-f]{6}$/i.test(t?.accent??"")?t.accent:null,s=()=>this.kiosk.touched();return p`
    ${e&&e.floors.some(a=>a.rooms.length)?this.renderStage(r):p`

    ${this.data.error??(e?M(this.hass,"no_building"):M(this.hass,"loading"))}

    `} ${this._roomId&&e&&t?.room_panel!==!1?this.renderRoomPanel():f} ${this.renderRoomButtons(r)} ${r.showBar&&e?this.renderBar(r):f} ${this.renderCorners()}
    `}static styles=[ve,Pe,yd,Dr]};if(!customElements.get("nextfloor-card")){customElements.define("nextfloor-card",_s);let n=window;n.customCards=n.customCards??[],n.customCards.push({type:"nextfloor-card",name:M(void 0,"card_name"),description:M(void 0,"card_description"),preview:!1})}Ni();var ut=class extends Error{},pg="nextfloor-chunks-v1",fg=64*1024*1024;async function bs(n,e,t){let r=await fetch(`${n.endpoint}/api${n.csrf?"":n.token?`?token=${encodeURIComponent(n.token)}`:""}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",...n.csrf?{"X-NextFloor-CSRF":n.csrf}:{}},credentials:"same-origin",body:JSON.stringify({...t,action:e,transport:pg})}),i=await r.text();if(r.status===401)throw new ut("Die Anmeldung ist abgelaufen. Bitte erneut anmelden.");let o;try{o=JSON.parse(i)}catch{throw/Output-Buffer exceeds Limit/i.test(i)?new Error("Symcon hat die Antwort wegen seiner Ausgabebegrenzung abgebrochen. Bitte das NextFloor-Modul aktualisieren und den Designer neu laden."):new Error(`Symcon liefert ${i.trim()?"kein g\xFCltiges JSON":"eine leere Antwort"} f\xFCr \u201E${e}\u201C (HTTP ${r.status}).`)}if(!r.ok||!o||typeof o!="object"||"error"in o){let s=o&&typeof o=="object"&&"error"in o?o.error:`HTTP ${r.status}`;throw s==="csrf_invalid"?new ut("Die Anmeldung hat sich ge\xE4ndert. Bitte erneut laden."):new Error(String(s))}return o}async function on(n,e,t={}){let r=await bs(n,e,t);if(!("_nextfloor_transfer"in r))return r;let i=r._nextfloor_transfer;if(!i||!/^[a-f0-9]{32}$/.test(i.id)||!Number.isSafeInteger(i.bytes)||i.bytes<=0||i.bytes>fg||!Number.isSafeInteger(i.chunk_bytes)||i.chunk_bytes<=0||i.chunk_bytes>128*1024||i.chunks!==Math.ceil(i.bytes/i.chunk_bytes)||i.chunks>512)throw new Error("Symcon hat eine ung\xFCltige Daten\xFCbertragung angek\xFCndigt.");try{let o=new TextDecoder("utf-8",{fatal:!0}),s=[];for(let a=0;au.charCodeAt(0));if(c.length!==Math.min(i.chunk_bytes,i.bytes-a*i.chunk_bytes))throw new Error("Ein Symcon-Datenpaket wurde unvollst\xE4ndig \xFCbertragen.");s.push(o.decode(c,{stream:!0}))}return s.push(o.decode()),JSON.parse(s.join(""))}finally{await bs(n,"transport/release",{transfer_id:i.id}).catch(()=>{})}}function gg(){let n=window.__NEXTFLOOR_SYMCON__;if(!n?.endpoint||!n.csrf&&!n.token)throw new Error("NextFloor Symcon host configuration is missing");return n}var bi=class{onExpired;settings=gg();changeListeners=new Set;buildingListeners=new Set;timer;stateRevision=-1;buildingRevision=-1;objectsSignature="";refreshTask;states={};entities={};areas={};facade={language:this.settings.language||navigator.language||"de",user:this.settings.user??{is_admin:!1,name:"IP-Symcon"},states:this.states,entities:this.entities,areas:this.areas,symconObjects:[],symconTitle:this.settings.title?.trim()||"NextFloor",symconRefresh:()=>this.refresh(!0),config:{unit_system:{temperature:"\xB0C"}},themes:{darkMode:window.matchMedia?.("(prefers-color-scheme: dark)").matches??!0},services:{},connection:{subscribeMessage:async(e,t)=>{if(t.type==="nextfloor/building/subscribe"){let r=i=>e({revision:i});return this.buildingListeners.add(r),async()=>{this.buildingListeners.delete(r)}}return async()=>{}}},callWS:e=>this.callWS(e),callService:(e,t,r)=>this.callService(e,t,r),fetchWithAuth:(e,t)=>this.fetchWithToken(e,t),hassUrl:(e="")=>new URL(e,window.location.origin).href};async start(){let e=await on(this.settings,"bootstrap");return e.access&&(this.facade.user=e.access),this.apply(e),this.stateRevision=e.state_revision,this.buildingRevision=e.building_revision,this.timer=setInterval(()=>{this.refresh().catch(t=>{t instanceof ut&&(this.stop(),this.states={},this.entities={},this.onExpired?.())})},800),this.snapshot()}stop(){this.timer&&clearInterval(this.timer),this.timer=void 0}onChange(e){return this.changeListeners.add(e),()=>this.changeListeners.delete(e)}snapshot(){return{...this.facade,states:{...this.states},entities:{...this.entities},areas:{...this.areas}}}refresh(e=!1){if(this.refreshTask)return e?this.refreshTask.catch(()=>{}).then(()=>this.refresh(!0)):this.refreshTask;let t=this.loadSnapshot(e).finally(()=>{this.refreshTask===t&&(this.refreshTask=void 0)});return this.refreshTask=t,t}async loadSnapshot(e){let t=e?await on(this.settings,"bootstrap"):await on(this.settings,"variables/snapshot",{revision:this.stateRevision});if((e||t.state_revision!==this.stateRevision)&&t.variables){this.stateRevision=t.state_revision,this.apply({variables:t.variables,areas:t.areas,objects:t.objects});for(let r of this.changeListeners)r()}if(t.building_revision!==this.buildingRevision){this.buildingRevision=t.building_revision;for(let r of this.buildingListeners)r(t.building_revision)}}apply(e){this.states=Object.fromEntries(e.variables.map(t=>[t.entity_id,{entity_id:t.entity_id,state:t.state,attributes:{...t.attributes,friendly_name:t.name,symcon_path:t.path}}])),this.entities=Object.fromEntries(e.variables.map(t=>[t.entity_id,{entity_id:t.entity_id,name:t.name,area_id:t.area_id??null,device_id:t.device_id??null}]));for(let t of Object.values(this.states))for(let r of["light","cover"]){let i=Aa(t,r);!i||i.entity_id===t.entity_id||this.states[i.entity_id]||(this.states[i.entity_id]=i,this.entities[i.entity_id]={...this.entities[t.entity_id],entity_id:i.entity_id,hidden:!0})}if(e.areas&&(this.areas=Object.fromEntries(e.areas.map(t=>[t.area_id,t]))),this.facade.states=this.states,this.facade.entities=this.entities,this.facade.areas=this.areas,e.objects){let t=JSON.stringify(e.objects);t!==this.objectsSignature&&(this.facade.symconObjects=e.objects,this.objectsSignature=t)}}async callWS(e){let t=String(e.type??"");if(!t.startsWith("nextfloor/"))throw new Error(`Unsupported Symcon websocket command: ${t}`);let{type:r,...i}=e;return on(this.settings,t.slice(10),i)}async callService(e,t,r={}){if((Array.isArray(r.entity_id)?r.entity_id:[r.entity_id]).some(o=>typeof o!="string"||this.states[o]?.attributes.symcon_can_control===!1))throw new Error("F\xFCr dieses Ger\xE4t ist nur die Anzeige freigegeben.");return on(this.settings,"variables/action",{domain:e,service:t,data:r})}fetchWithToken(e,t={}){let r=new URL(e,window.location.origin);return!this.settings.csrf&&this.settings.token&&r.searchParams.set("token",this.settings.token),fetch(r,{...t,credentials:"same-origin"})}};function yi(){return new URLSearchParams(window.location.search).get("mode")==="tile"?"tile":"designer"}async function _g(){try{localStorage.removeItem("nextfloor.unsaved")}catch{}let n=new bi,e=window.__NEXTFLOOR_SYMCON__;n.onExpired=()=>{document.body.replaceChildren(),window.location.replace(`${e.endpoint}/login?mode=${yi()}`)};let t=await n.start(),r=yi()==="tile",i=r?document.createElement("nextfloor-card"):document.createElement("nextfloor-panel");i.className=r?"nf-symcon-tile":"nf-symcon-designer",i.hass=t,r?i.setConfig({type:"custom:nextfloor-card",fill:!0,room_buttons:!0,controls:!0,weather:!1,announcements:!1}):i.narrow=window.innerWidth<870;let o=()=>{r||(i.narrow=window.innerWidth<870)};window.addEventListener("resize",o);let s=document.createElement("nav");s.className="nf-session-bar",s.setAttribute("aria-label","Benutzerkonto");let a=document.createElement("span");a.textContent=`${t.user?.name??""} \xB7 ${t.user?.is_admin?"Administrator":e.user?.can_control===!1?"Nur ansehen":e.user?.control_all?"Bedienung":e.user?.view_all?"Ansicht und freigegebene Bedienung":"Freigegebene R\xE4ume / Ger\xE4te"}`;let l=document.createElement("form");l.method="post",l.action=`${e.endpoint}/logout?mode=${yi()}`;let c=document.createElement("input");c.type="hidden",c.name="csrf",c.value=e.csrf||"";let u=document.createElement("button");u.type="submit",u.textContent="Abmelden",l.append(c,u),s.append(a,l),document.body.replaceChildren(s,i),n.onChange(()=>{i.hass=n.snapshot()}),window.addEventListener("pagehide",()=>{n.stop(),window.removeEventListener("resize",o),document.body.replaceChildren()},{once:!0}),window.addEventListener("pageshow",h=>{h.persisted&&location.reload()})}_g().catch(n=>{if(n instanceof ut){window.location.replace(`${window.__NEXTFLOOR_SYMCON__.endpoint}/login?mode=${yi()}`);return}document.body.textContent=`NextFloor konnte nicht geladen werden: ${n instanceof Error?n.message:String(n)}`}); /*! Bundled license information: @lit/reactive-element/css-tag.js: (** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/reactive-element.js: lit-html/lit-html.js: lit-element/lit-element.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/is-server.js: (** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) */