@@ -1,13 +1,13 @@
/*! 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 jn = globalThis , qn = jn . ShadowRoot && ( jn . ShadyCSS === void 0 || jn . ShadyCSS . nativeShadow ) && "adoptedStyleSheets" in Document . prototype && "replace" in CSSStyleSheet . prototype , _i = Symbol ( ) , gs = new WeakMap , rn = class { constructor ( e , t , r ) { if ( this . _$cssResult$ = ! 0 , r !== _i ) 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 ( qn && e === void 0 ) { let r = t !== void 0 && t . length === 1 ; r && ( e = gs . get ( t ) ) , e === void 0 && ( ( this . o = e = new CSSStyleSheet ) . replaceSync ( this . cssText ) , r && gs . set ( t , e ) ) } return e } toString ( ) { return this . cssText } } , _s = n => new rn ( typeof n == "string" ? n : n + "" , void 0 , _i ) , J = ( 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 rn ( t , n , _i ) } , bs = ( n , e ) => { if ( qn ) n . adoptedStyleSheets = e . map ( t => t instanceof CSSStyleSheet ? t : t . styleSheet ) ; else for ( let t of e ) { let r = document . createElement ( "style" ) , i = jn . litNonce ; i !== void 0 && r . setAttribute ( "nonce" , i ) , r . textContent = t . cssText , n . appendChild ( r ) } } , bi = qn ? n => n : n => n instanceof CSSStyleSheet ? ( e => { let t = "" ; for ( let r of e . cssRules ) t += r . cssText ; return _s ( t ) } ) ( n ) : n ; var { is : yd , defineProperty : vd , getOwnPropertyDescriptor : wd , getOwnPropertyNames : xd , getOwnPropertySymbols : kd , getPrototypeOf : Sd } = Object , Zn = globalThis , ys = Zn . trustedTypes , $d = ys ? ys . emptyScript : "" , Md = Zn . reactiveElementPolyfillSupport , on = ( n , e ) => n , yi = { toAttribute ( n , e ) { switch ( e ) { case Boolean : n = n ? $d : 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 } } , ws = ( n , e ) => ! yd ( n , e ) , vs = { attribute : ! 0 , type : String , converter : yi , reflect : ! 1 , useDefault : ! 1 , hasChanged : ws } ; Symbol . metadata ? ? = Symbol ( "metadata" ) , Zn . litPropertyMetadata ? ? = new WeakMap ; var Le = 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 = vs ) { 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 && vd ( this . prototype , e , i ) } } static getPropertyDescriptor ( e , t , r ) { let { get : i , set : o } = wd ( 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 ) ? ? vs } static _$Ei ( ) { if ( this . hasOwnProperty ( on ( "elementProperties" ) ) ) return ; let e = Sd ( this ) ; e . finalize ( ) , e . l !== void 0 && ( this . l = [ ... e . l ] ) , this . elementProperties = new Map ( e . elementProperties ) } static finalize ( ) { if ( this . hasOwnProperty ( on ( "finalized" ) ) ) return ; if ( this . finalized = ! 0 , this . _$Ei ( ) , this . hasOwnProperty ( on ( "properties" ) ) ) { let t = this . properties , r = [ ... xd ( t ) , ... kd ( 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 ( bi ( i ) ) } else e !== void 0 && t . push ( bi ( 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 . shad Line truncated
\ f \ r ] ` ,s n=/<(?:(!--| \/ [^a-zA-Z])|( \/ ?[a-zA-Z][^> \s ]*)|( \/ ? $ ))/g,S s=/-->/g, $ s=/>/g,u t=RegExp( ` > | $ { vi } ( ? : ( [ ^ \ \ s " ' >= / ] + ) ( $ { v i } * = $ { v i } * ( ? : [ ^
\ f \ r "'\`<>=]|(" | ')|))|$)`,"g"),Ms=/' / g , As = /"/g , Ts = /^(?:script|style|textarea|title)$/i , Ri = n => ( e , ... t ) => ( { _$litType$ : n , strings : e , values : t } ) , p = Ri ( 1 ) , ne = Ri ( 2 ) , kg = Ri ( 3 ) , mt = Symbol . for ( "lit-noChange" ) , f = Symbol . for ( "lit-nothing" ) , Rs = new WeakMap , dt = ht . createTreeWalker ( ht , 129 ) ; function Fs ( n , e ) { if ( ! Ai ( n ) || ! n . hasOwnProperty ( "raw" ) ) throw Error ( "invalid template strings array" ) ; return ks !== void 0 ? ks . createHTML ( e ) : e } var Ed = ( n , e ) => { let t = n . length - 1 , r = [ ] , i , o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "" , s = sn ; for ( let a = 0 ; a < t ; a ++ ) { let l = n [ a ] , c , u , h = - 1 , m = 0 ; for ( ; m < l . length && ( s . lastIndex = m , u = s . exec ( l ) , u !== null ) ; ) m = s . lastIndex , s === sn ? u [ 1 ] === "!--" ? s = Ss : u [ 1 ] !== void 0 ? s = $s : u [ 2 ] !== void 0 ? ( Ts . test ( u [ 2 ] ) && ( i = RegExp ( "</" + u [ 2 ] , "g" ) ) , s = ut ) : u [ 3 ] !== void 0 && ( s = ut ) : s === ut ? u [ 0 ] === ">" ? ( s = i ? ? sn , h = - 1 ) : u [ 1 ] === void 0 ? h = - 2 : ( h = s . lastIndex - u [ 2 ] . length , c = u [ 1 ] , s = u [ 3 ] === void 0 ? ut : u [ 3 ] === '"' ? As : Ms ) : s === As || s === Ms ? s = ut : s === Ss || s === $s ? s = sn : ( s = ut , i = void 0 ) ; let d = s === ut && n [ a + 1 ] . startsWith ( "/>" ) ? " " : "" ; o += s === sn ? l + Ad : h >= 0 ? ( r . push ( c ) , l . slice ( 0 , h ) + Es + l . slice ( h ) + tt + d ) : l + tt + ( h === - 2 ? a : d ) } return [ Fs ( n , o + ( n [ t ] || "<?>" ) + ( e === 2 ? "</svg>" : e === 3 ? "</math>" : "" ) ) , r ] } , cn = 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 ] = Ed ( e , t ) ; if ( this . el = n . createElement ( c , r ) , dt . currentNode = this . el . content , t === 2 || t === 3 ) { let h = this . el . content . firstChild ; h . replaceWith ( ... h . childNodes ) } for ( ; ( i = dt . nextNode ( ) ) !== null && l . length < a ; ) { if ( i . nodeType === 1 ) { if ( i . hasAttributes ( ) ) for ( let h of i . getAttributeNames ( ) ) if ( h . endsWith ( Es ) ) { let m = u [ s ++ ] , d = i . getAttribute ( h ) . split ( tt ) , g = /([.?@])?(.*)/ . exec ( m ) ; l . push ( { type : 1 , index : o , name : g [ 2 ] , strings : d , ctor : g [ 1 ] === "." ? xi : g [ 1 ] === "?" ? ki : g [ 1 ] === "@" ? Si : At } ) , i . removeAttribute ( h ) } else h . startsWith ( tt ) && ( l . push ( { type : 6 , index : o } ) , i . removeAttribute ( h ) ) ; if ( Ts . test ( i . tagName ) ) { let h = i . textContent . split ( tt ) , m = h . length - 1 ; if ( m > 0 ) { i . textContent = Yn ? Yn . emptyScript : "" ; for ( let d = 0 ; d < m ; d ++ ) i . append ( h [ d ] , an ( ) ) , dt . nextNode ( ) , l . push ( { type : 2 , index : ++ o } ) ; i . append ( h [ m ] , an ( ) ) } } } else if ( i . nodeType === 8 ) if ( i . data === zs ) l . push ( { type : 2 , index : o } ) ; else { let h = - 1 ; for ( ; ( h = i . data . indexOf ( tt , h + 1 ) ) !== - 1 ; ) l . push ( { type : 7 , index : o } ) , h += tt . length - 1 } o ++ } } static createElement ( e , t ) { let r = ht . createElement ( "template" ) ; return r . innerHTML = e , r } } ; function Mt ( n , e , t = n , r ) { if ( e === mt ) return e ; let i = r !== void 0 ? t . _$Co ? . [ r ] : t . _$Cl , o = ln ( e ) ? void 0 : e . _$litDirective$ ; return i ? . constructor !== o && ( i ? . _$AO ? . ( ! 1 ) , o === void 0 ? i = void 0 : ( i = new o ( n ) , i . _$AT ( n , t , r ) ) , r !== void 0 ? ( t . _$Co ? ? = [ ] ) [ r ] = i : t . _$Cl = i ) , i !== void 0 && ( e = Mt ( n , i . _$AS ( n , e . values ) , i , r ) ) , e } var wi = class { constructor ( e , t ) { this . _$AV = [ ] , this . _$AN = void 0 , this . _$AD = e , this . _$AM = t } get parentNode ( ) { return this . _$AM . parentNode } get _$AU ( ) { return this . _$AM . _$AU } u ( e ) { let { el : { content : t } , parts : r } = this . _$AD , i = ( e ? . creationScope ? ? ht ) . importNode ( t , ! 0 ) ; dt . currentNode = i ; let o = dt . nextNode ( ) , s = 0 , a = 0 , l = r [ 0 ] ; for ( ; l !== void 0 ; ) { if ( s === l . index ) { let c ; l . type === 2 ? c = new un ( o , o . nextSibling , this , e ) : l . type === 1 ? c = new l . ctor ( o , l . name , l . strings , this , e ) : l . type === 6 && ( c = new $i ( o , this , e ) ) , this . _$AV . push ( c ) , l = r [ ++ a ] } s !== l ? . index && ( o = dt . nextNode ( ) , s ++ ) } return dt . currentNode = ht , i } p ( e ) { let t = 0 ; for ( let r of this . _$AV ) r !== void 0 && ( r . strings !== void 0 ? ( r . _$AI ( e , r , t ) , t += r . strings . length - 2 ) : r . _$AI ( e [ t ] ) ) , t ++ } } , un = class n { get _$AU ( ) { return this . _$AM ? . _$AU ? ? this . _$Cv } constructor ( e , t , r , i ) { this . type = 2 , this . _$AH = f , this . _$AN = void 0 , this . _$AA = e , this . _$AB = t , this . _$AM = r , this . options = i , this . _$Cv = i ? . isConnected ? ? ! 0 } get parentNode ( ) { let e = this . _$AA . parentNode , t = this . _$AM ; return t !== void 0 && e ? . nodeType === 11 && ( e = t . parentNode ) , e } get startNode ( ) { return this . _$AA } get endNode ( ) { return this . _$AB } _$AI ( e , t = this ) { e = Mt ( this , e , t ) , ln ( e ) ? e === f || e == null || e === "" ? ( this . _$AH !== f && this . _$AR ( ) , this . _$AH = f ) : e !== this . _$AH && e !== mt && this . _ ( e ) : e . _$litType$ !== void 0 ? this . $ ( e ) : e . nodeType !== void 0 ? this . T ( e ) : Rd ( e ) ? this . k ( e ) : this . _ ( e ) } O ( e ) { return this . _$AA . parentNode . insertBefore ( e , this . _$AB ) } T ( e ) { this . _$AH !== e && ( this . _$AR ( ) , this . _$AH = this . O ( e ) ) } _ ( e ) { this . _$AH !== f && ln ( this . _$AH ) ? this . _$AA . nextSibling . data = e : this . T ( ht . createTextNode ( e ) ) , this . _$AH = e } $ ( e ) { let { values : t , _$litType$ : r } = e , i = typeof r == "number" ? this . _$AC ( e ) : ( r . el === void 0 && ( r . el = cn . createElement ( Fs ( r . h , r . h [ 0 ] ) , this . options ) ) , r ) ; if ( this . _$AH ? . _$AD === i ) this . _$AH . p ( t ) ; else { let o = new wi ( i , this ) , s = o . u ( this . options ) ; o . p ( t ) , this . T ( s ) , this . _$AH = o } } _$AC ( e ) { let t = Rs . get ( e . strings ) ; return t === void 0 && Rs . set ( e . strings , t = new cn ( e ) ) , t } k ( e ) { Ai ( this . _$AH ) || ( this . _$AH = [ ] , this . _$AR ( ) ) ; let t = this . _$AH , r , i = 0 ; for ( let o of e ) i === t . length ? t . push ( r = new n ( this . O ( an ( ) ) , this . O ( an ( ) ) , this , this . options ) ) : r = t [ i ] , r . _$AI ( o ) , i ++ ; i < t . length && ( this . _$AR ( r && r . _$AB . nextSibling , i ) , t . length = i ) } _$AR ( e = this . _$AA . nextSibling , t ) { for ( this . _$AP ? . ( ! 1 , ! 0 , t ) ; e !== this . _$AB ; ) { let r = xs ( e ) . nextSibling ; xs ( e ) . remove ( ) , e = r } } setConnected ( e ) { this . _$AM === void 0 && ( this . _$Cv = e , this . _$AP ? . ( e ) ) } } , At = class { get tagName ( ) { return this . element . tagName } get _$AU ( ) { return this . _$AM . _$AU } constructor ( e , t , r , i , o ) { this . type = 1 , this . _$AH = f , this . _$AN = void 0 , this . element = e , this . name = t , this . _$AM = i , this . options = o , r . length > 2 || r [ 0 ] !== "" || r [ 1 ] !== "" ? ( this . Line truncated
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 . shad Line truncated
\ f \ r ] ` ,l n=/<(?:(!--| \/ [^a-zA-Z])|( \/ ?[a-zA-Z][^> \s ]*)|( \/ ? $ ))/g,A s=/-->/g,E s=/>/g,d t=RegExp( ` > | $ { ki } ( ? : ( [ ^ \ \ s " ' >= / ] + ) ( $ { k i } * = $ { k i } * ( ? : [ ^
\ 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 ) , pt = Symbol . for ( "lit-noChange" ) , f = Symbol . for ( "lit-nothing" ) , Ts = new WeakMap , ht = mt . createTreeWalker ( mt , 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 ? "<svg>" : e === 3 ? "<math>" : "" , s = ln ; for ( let a = 0 ; a < t ; a ++ ) { let l = n [ a ] , c , u , h = - 1 , m = 0 ; for ( ; m < l . length && ( s . lastIndex = m , u = s . exec ( l ) , u !== null ) ; ) m = s . lastIndex , s === ln ? u [ 1 ] === "!--" ? s = As : u [ 1 ] !== void 0 ? s = Es : u [ 2 ] !== void 0 ? ( Hs . test ( u [ 2 ] ) && ( i = RegExp ( "</" + u [ 2 ] , "g" ) ) , s = dt ) : u [ 3 ] !== void 0 && ( s = dt ) : s === dt ? u [ 0 ] === ">" ? ( 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 ? dt : u [ 3 ] === '"' ? zs : Rs ) : s === zs || s === Rs ? s = dt : s === As || s === Es ? s = ln : ( s = dt , i = void 0 ) ; let d = s === dt && 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 ? "</svg>" : e === 3 ? "</math>" : "" ) ) , 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 ) , ht . currentNode = this . el . content , t === 2 || t === 3 ) { let h = this . el . content . firstChild ; h . replaceWith ( ... h . childNodes ) } for ( ; ( i = ht . nextNode ( ) ) !== null && l . length < a ; ) { if ( i . nodeType === 1 ) { if ( i . hasAttributes ( ) ) for ( let h of i . getAttributeNames ( ) ) if ( h . endsWith ( Fs ) ) { let m = u [ s ++ ] , d = i . getAttribute ( h ) . split ( nt ) , g = /([.?@])?(.*)/ . exec ( m ) ; l . push ( { type : 1 , index : o , name : g [ 2 ] , strings : d , ctor : g [ 1 ] === "." ? $i : g [ 1 ] === "?" ? Mi : g [ 1 ] === "@" ? Ai : Rt } ) , i . removeAttribute ( h ) } else h . startsWith ( nt ) && ( l . push ( { type : 6 , index : o } ) , i . removeAttribute ( h ) ) ; if ( Hs . test ( i . tagName ) ) { let h = i . textContent . split ( nt ) , m = h . length - 1 ; if ( m > 0 ) { i . textContent = Qn ? Qn . emptyScript : "" ; for ( let d = 0 ; d < m ; d ++ ) i . append ( h [ d ] , cn ( ) ) , ht . nextNode ( ) , l . push ( { type : 2 , index : ++ o } ) ; i . append ( h [ m ] , cn ( ) ) } } } else if ( i . nodeType === 8 ) if ( i . data === Ds ) l . push ( { type : 2 , index : o } ) ; else { let h = - 1 ; for ( ; ( h = i . data . indexOf ( nt , h + 1 ) ) !== - 1 ; ) l . push ( { type : 7 , index : o } ) , h += nt . length - 1 } o ++ } } static createElement ( e , t ) { let r = mt . createElement ( "template" ) ; return r . innerHTML = e , r } } ; function Et ( n , e , t = n , r ) { if ( e === pt ) return e ; let i = r !== void 0 ? t . _$Co ? . [ r ] : t . _$Cl , o = un ( e ) ? void 0 : e . _$litDirective$ ; return i ? . constructor !== o && ( i ? . _$AO ? . ( ! 1 ) , o === void 0 ? i = void 0 : ( i = new o ( n ) , i . _$AT ( n , t , r ) ) , r !== void 0 ? ( t . _$Co ? ? = [ ] ) [ r ] = i : t . _$Cl = i ) , i !== void 0 && ( e = Et ( n , i . _$AS ( n , e . values ) , i , r ) ) , e } var Si = class { constructor ( e , t ) { this . _$AV = [ ] , this . _$AN = void 0 , this . _$AD = e , this . _$AM = t } get parentNode ( ) { return this . _$AM . parentNode } get _$AU ( ) { return this . _$AM . _$AU } u ( e ) { let { el : { content : t } , parts : r } = this . _$AD , i = ( e ? . creationScope ? ? mt ) . importNode ( t , ! 0 ) ; ht . currentNode = i ; let o = ht . nextNode ( ) , s = 0 , a = 0 , l = r [ 0 ] ; for ( ; l !== void 0 ; ) { if ( s === l . index ) { let c ; l . type === 2 ? c = new hn ( o , o . nextSibling , this , e ) : l . type === 1 ? c = new l . ctor ( o , l . name , l . strings , this , e ) : l . type === 6 && ( c = new Ei ( o , this , e ) ) , this . _$AV . push ( c ) , l = r [ ++ a ] } s !== l ? . index && ( o = ht . nextNode ( ) , s ++ ) } return ht . currentNode = mt , i } p ( e ) { let t = 0 ; for ( let r of this . _$AV ) r !== void 0 && ( r . strings !== void 0 ? ( r . _$AI ( e , r , t ) , t += r . strings . length - 2 ) : r . _$AI ( e [ t ] ) ) , t ++ } } , hn = class n { get _$AU ( ) { return this . _$AM ? . _$AU ? ? this . _$Cv } constructor ( e , t , r , i ) { this . type = 2 , this . _$AH = f , this . _$AN = void 0 , this . _$AA = e , this . _$AB = t , this . _$AM = r , this . options = i , this . _$Cv = i ? . isConnected ? ? ! 0 } get parentNode ( ) { let e = this . _$AA . parentNode , t = this . _$AM ; return t !== void 0 && e ? . nodeType === 11 && ( e = t . parentNode ) , e } get startNode ( ) { return this . _$AA } get endNode ( ) { return this . _$AB } _$AI ( e , t = this ) { e = Et ( this , e , t ) , un ( e ) ? e === f || e == null || e === "" ? ( this . _$AH !== f && this . _$AR ( ) , this . _$AH = f ) : e !== this . _$AH && e !== pt && this . _ ( e ) : e . _$litType$ !== void 0 ? this . $ ( e ) : e . nodeType !== void 0 ? this . T ( e ) : Td ( e ) ? this . k ( e ) : this . _ ( e ) } O ( e ) { return this . _$AA . parentNode . insertBefore ( e , this . _$AB ) } T ( e ) { this . _$AH !== e && ( this . _$AR ( ) , this . _$AH = this . O ( e ) ) } _ ( e ) { this . _$AH !== f && un ( this . _$AH ) ? this . _$AA . nextSibling . data = e : this . T ( mt . createTextNode ( e ) ) , this . _$AH = e } $ ( e ) { let { values : t , _$litType$ : r } = e , i = typeof r == "number" ? this . _$AC ( e ) : ( r . el === void 0 && ( r . el = dn . createElement ( Ps ( r . h , r . h [ 0 ] ) , this . options ) ) , r ) ; if ( this . _$AH ? . _$AD === i ) this . _$AH . p ( t ) ; else { let o = new Si ( i , this ) , s = o . u ( this . options ) ; o . p ( t ) , this . T ( s ) , this . _$AH = o } } _$AC ( e ) { let t = Ts . get ( e . strings ) ; return t === void 0 && Ts . set ( e . strings , t = new dn ( e ) ) , t } k ( e ) { zi ( this . _$AH ) || ( this . _$AH = [ ] , this . _$AR ( ) ) ; let t = this . _$AH , r , i = 0 ; for ( let o of e ) i === t . length ? t . push ( r = new n ( this . O ( cn ( ) ) , this . O ( cn ( ) ) , this , this . options ) ) : r = t [ i ] , r . _$AI ( o ) , i ++ ; i < t . length && ( this . _$AR ( r && r . _$AB . nextSibling , i ) , t . length = i ) } _$AR ( e = this . _$AA . nextSibling , t ) { for ( this . _$AP ? . ( ! 1 , ! 0 , t ) ; e !== this . _$AB ; ) { let r = $s ( e ) . nextSibling ; $s ( e ) . remove ( ) , e = r } } setConnected ( e ) { this . _$AM === void 0 && ( this . _$Cv = e , this . _$AP ? . ( e ) ) } } , Rt = class { get tagName ( ) { return this . element . tagName } get _$AU ( ) { return this . _$AM . _$AU } constructor ( e , t , r , i , o ) { this . type = 1 , this . _$AH = f , this . _$AN = void 0 , this . element = e , this . name = t , this . _$AM = i , this . options = o , r . length > 2 || r [ 0 ] !== "" || r [ 1 ] !== "" ? ( this . Line truncated
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 \x F6gen von den Solarfeldern zum Wechselrichter, zwischen Haus, Akku, Netz und Verbrauchern \u 2013 schneller und dichter, je mehr Strom flie \x DFt. Die Module funkeln mit ihrer Produktion, eine Glaskarte \x FCber 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 \x E4che) 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 \x E4dt",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 \x FCck",live_media_playpause:"Abspielen/Pause",live_media_next:"Weiter",live_media_volume:"Lautst \x E4rke",live_car_device:"Auto (eine Entit \x E4t des Autos)",live_car_device_hint:"Ladestand, Reichweite, Laden, Stecker, Schloss und Klima findet NextFloor selbst am Ger \x E4t 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 \x FCse",printer_bed:"Bett",heatpump_heating:"heizt",heatpump_water:"macht Warmwasser",heatpump_cooling:"k \x FChlt",heatpump_defrost:"taut ab",heatpump_idle:"in Ruhe",heatpump_flow_return:"Vor- \u 2192 R \x FCcklauf",heatpump_heat:"W \x E4rme",heatpump_power:"Strom",heatpump_outside:"au \x DFen",pack_missing_item:"M \x F6bel aus entferntem Pack",back_to_room:"Zur \x FCck zu {room}",back_to_floor:"Zur \x FCck zur Etage",hint_furniture:"Raum antippen, dann rechts ein M \x F6belst \x FCck w \x E4hlen \x B7 M \x F6bel ziehen, an den Ecken die Gr \x F6 \x DFe \x E4ndern",furniture_into:"Neue M \x F6bel kommen in die Mitte von \u 201E{room} \u 201C.",furniture_pick_room:"Tipp: Erst einen Raum antippen \u 2013 dann landen neue M \x F6bel in seiner Mitte.",flows:"Stromfluss",flows_hint:"Energieb \x F6gen 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 \x E4hler mit Netzsensor",chk_meter_sensor:"Stromz \x E4hler: Netzsensor (W) fehlt",chk_meter_add:"Stromz \x E4hler 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 \x E4dt ohne Sonne und ohne Netzbezug. Sein Sensor hat wahrscheinlich das umgekehrte Vorzeichen.",energy_sign_flip:"Vorzeichen umkehren",help_title:"Hilfe und R \x FCckmeldung",help_hint:"Fehler bitte als Issue auf GitHub, W \x FCnsche als Diskussion \u 2013 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 \u 2013 das L-Sofa andersherum, der Schrank mit der T \x FCr auf der anderen Seite, die K \x FCchenzeile gespiegelt.",hint_opening:"Auf eine Wand tippen, um eine T \x FCr oder ein Fenster einzusetzen \u 2013 die Art w \x E4hlst du danach rechts",preset_door:"T \x FCr",preset_door_double:"Doppelt \x FCr",preset_window:"Fenster",preset_window_double:"Fenster 2-fl \x FCgelig",preset_terrace:"Terrassent \x FCr",preset_terrace_double:"Terrassent \x FCr 2-fl \x FCgelig",preset_lift_slide:"Hebe-Schiebet \x FCr",preset_garage:"Garagentor",preset_front:"Haust \x FCr",opening_style:"Stil",sidelight_auto:"automatisch",sidelight_hinge:"Seitenteil an der Anschlagseite",sidelight_hinge_hint:"Das Seitenteil sitzt sonst gegen \x FCber dem Anschlag; mit Haken neben den B \x E4ndern.",sidelight_width:"Breite Seitenteil (m)",sidelight_width_left:"Seitenteil links (m)",sidelight_width_right:"Seitenteil rechts (m)",style_auto:"Automatisch ({style})",style_interior:"Zimmert \x FCr",style_front:"Haust \x FCr",style_front_glass:"Haust \x FCr mit Glasausschnitt",style_sidelight:"Haust \x FCr mit Seitenteil",style_sidelights:"Haust \x FCr mit 2 Seitenteilen",style_glass:"Glast \x FCr",style_sliding:"Schiebet \x FCr",style_p
Line truncated
{ url } ` ,manual:"Anleitung",manual_more:"Mehr erfahren",feature_text_energy:"Energieteilchen fliegen in B \x F6gen von den Solarfeldern zum Wechselrichter, zwischen Haus, Akku, Netz und Verbrauchern \u 2013 schneller und dichter, je mehr Strom flie \x DFt. Die Module funkeln mit ihrer Produktion, eine Glaskarte \x FCber 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 \x E4che) 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 \x E4dt",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 \x FCck",live_media_playpause:"Abspielen/Pause",live_media_next:"Weiter",live_media_volume:"Lautst \x E4rke",live_car_device:"Auto (eine Entit \x E4t des Autos)",live_car_device_hint:"Ladestand, Reichweite, Laden, Stecker, Schloss und Klima findet NextFloor selbst am Ger \x E4t 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 \x FCse",printer_bed:"Bett",heatpump_heating:"heizt",heatpump_water:"macht Warmwasser",heatpump_cooling:"k \x FChlt",heatpump_defrost:"taut ab",heatpump_idle:"in Ruhe",heatpump_flow_return:"Vor- \u 2192 R \x FCcklauf",heatpump_heat:"W \x E4rme",heatpump_power:"Strom",heatpump_outside:"au \x DFen",pack_missing_item:"M \x F6bel aus entferntem Pack",back_to_room:"Zur \x FCck zu {room}",back_to_floor:"Zur \x FCck zur Etage",hint_furniture:"Raum antippen, dann rechts ein M \x F6belst \x FCck w \x E4hlen \x B7 M \x F6bel ziehen, an den Ecken die Gr \x F6 \x DFe \x E4ndern",furniture_into:"Neue M \x F6bel kommen in die Mitte von \u 201E{room} \u 201C.",furniture_pick_room:"Tipp: Erst einen Raum antippen \u 2013 dann landen neue M \x F6bel in seiner Mitte.",flows:"Stromfluss",flows_hint:"Energieb \x F6gen 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 \x E4hler mit Netzsensor",chk_meter_sensor:"Stromz \x E4hler: Netzsensor (W) fehlt",chk_meter_add:"Stromz \x E4hler 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 \x E4dt ohne Sonne und ohne Netzbezug. Sein Sensor hat wahrscheinlich das umgekehrte Vorzeichen.",energy_sign_flip:"Vorzeichen umkehren",help_title:"Hilfe und R \x FCckmeldung",help_hint:"Fehler bitte als Issue auf GitHub, W \x FCnsche als Diskussion \u 2013 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 \u 2013 das L-Sofa andersherum, der Schrank mit der T \x FCr auf der anderen Seite, die K \x FCchenzeile gespiegelt.",hint_opening:"Auf eine Wand tippen, um eine T \x FCr oder ein Fenster einzusetzen \u 2013 die Art w \x E4hlst du danach rechts",preset_door:"T \x FCr",preset_door_double:"Doppelt \x FCr",preset_window:"Fenster",preset_window_double:"Fenster 2-fl \x FCgelig",preset_terrace:"Terrassent \x FCr",preset_terrace_double:"Terrassent \x FCr 2-fl \x FCgelig",preset_lift_slide:"Hebe-Schiebet \x FCr",preset_garage:"Garagentor",preset_front:"Haust \x FCr",opening_style:"Stil",sidelight_auto:"automatisch",sidelight_hinge:"Seitenteil an der Anschlagseite",sidelight_hinge_hint:"Das Seitenteil sitzt sonst gegen \x FCber dem Anschlag; mit Haken neben den B \x E4ndern.",sidelight_width:"Breite Seitenteil (m)",sidelight_width_left:"Seitenteil links (m)",sidelight_width_right:"Seitenteil rechts (m)",style_auto:"Automatisch ({style})",style_interior:"Zimmert \x FCr",style_front:"Haust \x FCr",style_front_glass:"Haust \x FCr mit Glasausschnitt",style_sidelight:"Haust \x FCr mit Seitenteil",style_sidelights:"Haust \x FCr mit 2 Seitenteilen",style_glass:"Glast \x FCr",style_sliding:"Schiebet \x FCr",style_p
Line truncated
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 \u 2013 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 \u 2192 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 \x B7 drag items, resize them by their corners",furniture_into:"New items go into the middle of \u 201C{room} \u 201D.",furniture_pick_room:"Tip: tap a room first \u 2013 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 \u 2013 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 \u 2013 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 \u 2013 choose its kind on the right afterwards",preset_door:"Door",preset_door_double:"Double door",preset_window:"Window",preset_window_double:"Double window",preset_terrace:"Terrace door",preset_terrace_double:"French doors",preset_lift_slide:"Lift-and-slide door",preset_garage:"Garage door",preset_front:"Front door",opening_style:"Style",sidelight_auto:"automatic",sidelight_hinge:"Sidelight on the hinge side",sidelight_hinge_hint:"The sidelight sits opposite the hinge otherwise; ticked, it sits next to the hinges.",sidelight_width:"Sidelight width (m)",sidelight_width_left:"Left sidelight (m)",sidelight_width_right:"Right sidelight (m)",style_auto:"Automatic ({style})",style_interior:"Room door",style_front:"Front door",style_front_glass:"Front door with glass",style_sidelight:"Front door with sidelight",style_sidelights:"Front door with two sidelights",style_glass:"Glass door",style_sliding:"Sliding door",style_passage:"Opening (no door)",style_standard:"Standard",style_bars:"With glazing bars",style_glass_wall:"Glass wall (fixed)",preset_glass_wall:"Glass wall",glass_panes:"Panes",glass_panes_auto:"automatic (about 0.9 m)",glass_panes_hint:"0 = one single pane without mullions, empty = about every 0.9 m",flip_hinge:"Swap hinge side",flip_main_leaf:"Swap main leaf",flip_hinge_hint:"Hinges to the other side"
Line truncated
{ url } ` ,manual:"Manual",manual_more:"Learn more",feature_text_energy:"Energy particles fly in arcs from the solar fields to the inverter, between house, battery, grid and consumers \u 2013 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 \u 2192 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 \x B7 drag items, resize them by their corners",furniture_into:"New items go into the middle of \u 201C{room} \u 201D.",furniture_pick_room:"Tip: tap a room first \u 2013 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 \u 2013 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 \u 2013 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 \u 2013 choose its kind on the right afterwards",preset_door:"Door",preset_door_double:"Double door",preset_window:"Window",preset_window_double:"Double window",preset_terrace:"Terrace door",preset_terrace_double:"French doors",preset_lift_slide:"Lift-and-slide door",preset_garage:"Garage door",preset_front:"Front door",opening_style:"Style",sidelight_auto:"automatic",sidelight_hinge:"Sidelight on the hinge side",sidelight_hinge_hint:"The sidelight sits opposite the hinge otherwise; ticked, it sits next to the hinges.",sidelight_width:"Sidelight width (m)",sidelight_width_left:"Left sidelight (m)",sidelight_width_right:"Right sidelight (m)",style_auto:"Automatic ({style})",style_interior:"Room door",style_front:"Front door",style_front_glass:"Front door with glass",style_sidelight:"Front door with sidelight",style_sidelights:"Front door with two sidelights",style_glass:"Glass door",style_sliding:"Sliding door",style_passage:"Opening (no door)",style_standard:"Standard",style_bars:"With glazing bars",style_glass_wall:"Glass wall (fixed)",preset_glass_wall:"Glass wall",glass_panes:"Panes",glass_panes_auto:"automatic (about 0.9 m)",glass_panes_hint:"0 = one single pane without mullions, empty = about every 0.9 m",flip_hinge:"Swap hinge side",flip_main_leaf:"Swap main leaf",flip_hinge_hint:"Hinges to the other side"
Line truncated
: host {
-- nf - text : var ( -- primary - text - color , # e1e1e1 ) ;
-- nf - muted : var ( -- secondary - text - color , # 9 b9b9b ) ;
@@ -35,7 +35,7 @@ A plugin runs with the same rights as NextFloor in your browser. The file has be
font - family : var ( -- nf - font ) ;
color : var ( -- nf - text ) ;
}
` ,T r=J `
` ,D r=Q `
: host ( [ readable ] ) {
-- secondary - text - color : var ( -- primary - text - color , # e1e1e1 ) ;
-- divider - color : color - mix ( in srgb , var ( -- primary - text - color , # e1e1e1 ) 40 % , transparent ) ;
@@ -46,7 +46,7 @@ A plugin runs with the same rights as NextFloor in your browser. The file has be
: host ( [ readable ] ) . nf - overlay {
zoom : 1.2 ;
}
` ,H e=J `
` ,P e=Q `
/* a group of switches: one rounded pill, the active one tinted with the accent */
. nf - seg {
display : inline - flex ;
@@ -209,20 +209,20 @@ A plugin runs with the same rights as NextFloor in your browser. The file has be
min - height : 40 px ;
}
}
` ;function F r(n){return n?.themes?.darkMode===!1?"light":"dark"}function v n(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 _ l,l o=class extends Q {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(_ l??=import(t).catch(i=>{throw _ l=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(!v n(this.hass,this.ids).length)return f;let e=this.label? ` Trend anzeigen : $ { this . label } ` :"Trend anzeigen";return p ` < button type = "button" title = $ { e } aria - label = $ { e } aria - haspopup = "dialog" ? disabled = $ { this . busy } @ pointerdown = $ { t => t . stopPropagation ( ) } @ click = $ { t => { this . open ( t ) } } >
` ;function H r(n){return n?.themes?.darkMode===!1?"light":"dark"}function x n(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 v l,h o=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(v l??=import(t).catch(i=>{throw v l=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(!x n(this.hass,this.ids).length)return f;let e=this.label? ` Trend anzeigen : $ { this . label } ` :"Trend anzeigen";return p ` < button type = "button" title = $ { e } aria - label = $ { e } aria - haspopup = "dialog" ? disabled = $ { this . busy } @ pointerdown = $ { t => t . stopPropagation ( ) } @ click = $ { t => { this . open ( t ) } } >
< svg width = "12" height = "12" viewBox = "0 0 20 20" fill = "none" stroke = "currentColor" stroke - width = "1.5" aria - hidden = "true" > < path d = "M3 2v15h15M5 13l4-5 4 2 4-6" / > < / s v g >
< / b u t t o n > $ { t h i s . e r r o r ? p ` < s p a n r o l e = " a l e r t " > $ { t h i s . e r r o r } < / s p a n > ` : f } ` } s t a t i c s t y l e s = J ` : h o s t { p o s i t i o n : r e l a t i v e ; d i s p l a y : i n l i n e - f l e x ; f l e x : 0 0 1 8 p x ; w i d t h : 1 8 p x ; h e i g h t : 1 8 p x ; v e r t i c a l - a l i g n : m i d d l e ; m a r g i n - l e f t : 3 p x ; f o n t - w e i g h t : n o r m a l ; l i n e - h e i g h t : 0 } b u t t o n { d i s p l a y : i n l i n e - f l e x ; a l i g n - i t e m s : c e n t e r ; j u s t i f y - c o n t e n t : c e n t e r ; b o x - s i z i n g : b o r d e r - b o x ; w i d t h : 1 8 p x ; h e i g h t : 1 8 p x ; p a d d i n g : 2 p x ; b o r d e r : 0 ; b o r d e r - r a d i u s : 3 p x ; b a c k g r o u n d : t r a n s p a r e n t ; c o l o r : v a r ( - - n f - a c c e n t , # 4 0 c 8 f f ) ; o p a c i t y : . 8 ; c u r s o r : p o i n t e r } s v g { d i s p l a y : b l o c k ; f l e x - s h r i n k : 0 } b u t t o n : h o v e r , b u t t o n : f o c u s - v i s i b l e { o p a c i t y : 1 ; b a c k g r o u n d : # 4 0 c 8 f f 1 8 } b u t t o n : f o c u s - v i s i b l e { o u t l i n e : 1 p x s o l i d c u r r e n t C o l o r ; o u t l i n e - o f f s e t : 1 p x } b u t t o n : d i s a b l e d { o p a c i t y : . 4 } s p a n { p o s i t i o n : a b s o l u t e ; r i g h t : 0 ; t o p : 2 2 p x ; z - i n d e x : 1 0 ; b o x - s i z i n g : b o r d e r - b o x ; w i d t h : 2 0 0 p x ; p a d d i n g : 8 p x ; b o r d e r : 1 p x s o l i d # f f 9 b 9 b 5 0 ; b o r d e r - r a d i u s : 6 p x ; b a c k g r o u n d : v a r ( - - n f - c h r o m e - s o l i d , # 1 c 1 c 1 c ) ; f o n t : 1 2 p x / 1 . 4 s y s t e m - u i ; c o l o r : # f f 9 b 9 b ; w h i t e - s p a c e : n o r m a l } ` } ; c u s t o m E l e m e n t s . g e t ( " n f - t r e n d - b u t t o n " ) | | c u s t o m E l e m e n t s . d e f i n e ( " n f - t r e n d - b u t t o n " , l o ) ; f u n c t i o n G ( n , e , t = " " ) { l e t r = v n ( n , e ) ; r e t u r n r . l e n g t h ? p ` < n f - t r e n d - b u t t o n . h a s s = $ { n } . i d s = $ { r } . l a b e l = $ { t } > < / n f - t r e n d - b u t t o n > ` : f } v a r c o = c l a s s e x t e n d s Q { s t a t i c p r o p e r t i e s = { h a s s : { a t t r i b u t e : ! 1 } , r o o m : { a t t r i b u t e : ! 1 } , _ p e n d i n g : { s t a t e : ! 0 } , _ e r r o r : { s t a t e : ! 0 } } ; c o n s t r u c t o r ( ) { s u p e r ( ) , t h i s . _ p e n d i n g = n e w S e t , t h i s . _ e r r o r = " " } a s y n c s e n d ( e , t , r , i ) { t h i s . _ p e n d i n g = n e w S e t ( [ . . . t h i s . _ p e n d i n g , e ] ) , t h i s . _ e r r o r = " " ; t r y { a w a i t t h i s . h a s s . c a l l S e r v i c e ( t , r , { e n t i t y _ i d : e , . . . i } ) } c a t c h ( o ) { t h i s . _ e r r o r = o i n s t a n c e o f E r r o r ? o . m e s s a g e : S t r i n g ( o ) } f i n a l l y { t h i s . _ p e n d i n g = n e w S e t ( [ . . . t h i s . _ p e n d i n g ] . f i l t e r ( o = > o ! = = e ) ) } } v a l u e ( e , t , r ) { l e t i = t h i s . h a s s . s t a t e s [ t ] , o = f e ( i ) , s = i ? . a t t r i b u t e s , a = r & & ! ! s ? . s y m c o n _ h a s _ a c t i o n & & o ! = = n u l l & & ! t h i s . _ p e n d i n g . h a s ( t ) ; r e t u r n p ` < d i v c l a s s = " v a l u e " > < s p a n > $ { e } < / s p a n > < b > $ { D e ( i ) } $ { G ( t h i s . h a s s , [ t ] , e ) } < / b >
$ { r && s ? . symcon _has _action && s . symcon _variable _type === 0 ? p ` <button class="nf-chip" aria-pressed= ${ le ( i ) === ! 0 } ?disabled= ${ ! a } @click= ${ ( ) => { this . send ( t , "symcon" , "set_value" , { value : ! le ( i ) } )}}> ${ le ( i ) ? "Ein" : "Aus" } </button> ` : r && s ? . symcon _has _action && [ 1 , 2 ] . includes ( Number ( s . symcon _variable _type ) ) ? p ` <input type="number" aria-label= ${ e } .value= ${ String ( ge ( i ) ? ? "" ) } min= ${ String ( s . symcon _min ? ? 0 ) } max= ${ String ( s . symcon _max ? ? 100 ) } step= ${ String ( s . symcon _step || ( s . symcon _variable _type === 1 ? 1 : . 1 ) ) } ?disabled= ${ ! a }
< / b u t t o n > $ { t h i s . e r r o r ? p ` < s p a n r o l e = " a l e r t " > $ { t h i s . e r r o r } < / s p a n > ` : f } ` } s t a t i c s t y l e s = Q ` : h o s t { p o s i t i o n : r e l a t i v e ; d i s p l a y : i n l i n e - f l e x ; f l e x : 0 0 1 8 p x ; w i d t h : 1 8 p x ; h e i g h t : 1 8 p x ; v e r t i c a l - a l i g n : m i d d l e ; m a r g i n - l e f t : 3 p x ; f o n t - w e i g h t : n o r m a l ; l i n e - h e i g h t : 0 } b u t t o n { d i s p l a y : i n l i n e - f l e x ; a l i g n - i t e m s : c e n t e r ; j u s t i f y - c o n t e n t : c e n t e r ; b o x - s i z i n g : b o r d e r - b o x ; w i d t h : 1 8 p x ; h e i g h t : 1 8 p x ; p a d d i n g : 2 p x ; b o r d e r : 0 ; b o r d e r - r a d i u s : 3 p x ; b a c k g r o u n d : t r a n s p a r e n t ; c o l o r : v a r ( - - n f - a c c e n t , # 4 0 c 8 f f ) ; o p a c i t y : . 8 ; c u r s o r : p o i n t e r } s v g { d i s p l a y : b l o c k ; f l e x - s h r i n k : 0 } b u t t o n : h o v e r , b u t t o n : f o c u s - v i s i b l e { o p a c i t y : 1 ; b a c k g r o u n d : # 4 0 c 8 f f 1 8 } b u t t o n : f o c u s - v i s i b l e { o u t l i n e : 1 p x s o l i d c u r r e n t C o l o r ; o u t l i n e - o f f s e t : 1 p x } b u t t o n : d i s a b l e d { o p a c i t y : . 4 } s p a n { p o s i t i o n : a b s o l u t e ; r i g h t : 0 ; t o p : 2 2 p x ; z - i n d e x : 1 0 ; b o x - s i z i n g : b o r d e r - b o x ; w i d t h : 2 0 0 p x ; p a d d i n g : 8 p x ; b o r d e r : 1 p x s o l i d # f f 9 b 9 b 5 0 ; b o r d e r - r a d i u s : 6 p x ; b a c k g r o u n d : v a r ( - - n f - c h r o m e - s o l i d , # 1 c 1 c 1 c ) ; f o n t : 1 2 p x / 1 . 4 s y s t e m - u i ; c o l o r : # f f 9 b 9 b ; w h i t e - s p a c e : n o r m a l } ` } ; c u s t o m E l e m e n t s . g e t ( " n f - t r e n d - b u t t o n " ) | | c u s t o m E l e m e n t s . d e f i n e ( " n f - t r e n d - b u t t o n " , h o ) ; f u n c t i o n U ( n , e , t = " " ) { l e t r = x n ( n , e ) ; r e t u r n r . l e n g t h ? p ` < n f - t r e n d - b u t t o n . h a s s = $ { n } . i d s = $ { r } . l a b e l = $ { t } > < / n f - t r e n d - b u t t o n > ` : f } v a r m o = c l a s s e x t e n d s X { s t a t i c p r o p e r t i e s = { h a s s : { a t t r i b u t e : ! 1 } , r o o m : { a t t r i b u t e : ! 1 } , _ p e n d i n g : { s t a t e : ! 0 } , _ e r r o r : { s t a t e : ! 0 } } ; c o n s t r u c t o r ( ) { s u p e r ( ) , t h i s . _ p e n d i n g = n e w S e t , t h i s . _ e r r o r = " " } a s y n c s e n d ( e , t , r , i ) { i f ( W ( t h i s . h a s s , e ) ) { t h i s . _ p e n d i n g = n e w S e t ( [ . . . t h i s . _ p e n d i n g , e ] ) , t h i s . _ e r r o r = " " ; t r y { a w a i t t h i s . h a s s . c a l l S e r v i c e ( t , r , { e n t i t y _ i d : e , . . . i } ) } c a t c h ( o ) { t h i s . _ e r r o r = o i n s t a n c e o f E r r o r ? o . m e s s a g e : S t r i n g ( o ) } f i n a l l y { t h i s . _ p e n d i n g = n e w S e t ( [ . . . t h i s . _ p e n d i n g ] . f i l t e r ( o = > o ! = = e ) ) } } } v a l u e ( e , t , r ) { l e t i = t h i s . h a s s . s t a t e s [ t ] , o = g e ( i ) , s = i ? . a t t r i b u t e s , a = r & & ! ! s ? . s y m c o n _ h a s _ a c t i o n & & o ! = = n u l l & & ! t h i s . _ p e n d i n g . h a s ( t ) ; r e t u r n p ` < d i v c l a s s = " v a l u e " > < s p a n > $ { e } < / s p a n > < b > $ { D e ( i ) } $ { U ( t h i s . h a s s , [ t ] , e ) } < / b >
$ { r && s ? . symcon _has _action && s . symcon _variable _type === 0 ? p ` <button class="nf-chip" aria-pressed= ${ ce ( i ) === ! 0 } ?disabled= ${ ! a } @click= ${ ( ) => { this . send ( t , "symcon" , "set_value" , { value : ! ce ( i ) } )}}> ${ ce ( i ) ? "Ein" : "Aus" } </button> ` : r && s ? . symcon _has _action && [ 1 , 2 ] . includes ( Number ( s . symcon _variable _type ) ) ? p ` <input type="number" aria-label= ${ e } .value= ${ String ( _e ( i ) ? ? "" ) } min= ${ String ( s . symcon _min ? ? 0 ) } max= ${ String ( s . symcon _max ? ? 100 ) } step= ${ String ( s . symcon _step || ( s . symcon _variable _type === 1 ? 1 : . 1 ) ) } ?disabled= ${ ! a }
@ change = $ { l => { let c = l . target ; c . value . trim ( ) && c . checkValidity ( ) && this . send ( t , "symcon" , "set_value" , { value : Number ( c . value ) } ) } } / > ` :f}
< / d i v > ` } s c h e d u l e ( e ) { l e t t = t h i s . h a s s . s t a t e s [ e ] ; i f ( ! t ? . a t t r i b u t e s . s y m c o n _ s c h e d u l e ) r e t u r n p ` < p c l a s s = " m i s s i n g " > S c h a l t u h r n i c h t v e r f ü g b a r < / p > ` ; l e t r = t . a t t r i b u t e s . a c t i o n s ? ? [ ] , i = t . a t t r i b u t e s . g r o u p s ? ? [ ] , o = N u m b e r ( t . a t t r i b u t e s . n e x t _ r u n ? ? 0 ) , s = r . f i n d ( c = > c . i d = = = t . a t t r i b u t e s . n e x t _ a c t i o n ) , a = [ " M o " , " D i " , " M i " , " D o " , " F r " , " S a " , " S o " ] , l = c = > ` $ { S t r i n g ( c . h o u r ) . p a d S t a r t ( 2 , " 0 " ) } : $ { S t r i n g ( c . m i n u t e ) . p a d S t a r t ( 2 , " 0 " ) } $ { c . s e c o n d ? ` : $ { S t r i n g ( c . s e c o n d ) . p a d S t a r t ( 2 , " 0 " ) } ` : " " } ` ; r e t u r n p ` < d e t a i l s c l a s s = " s c h e d u l e " > < s u m m a r y > $ { S t r i n g ( t . a t t r i b u t e s . f r i e n d l y _ n a m e ? ? " S c h a l t u h r " ) } < / s u m m a r y >
< label class = "nf-check" > < input type = "checkbox" . checked = $ { t . state === "on" } ? disabled = $ { this . _pending . has ( e ) } @ change = $ { c => { this . send ( e , "schedule" , "set_active" , { active : c . target . checked } ) } } / > Aktiv < / l a b e l >
< label class = "nf-check" > < input type = "checkbox" . checked = $ { t . state === "on" } ? disabled = $ { this . _pending . has ( e ) || ! W ( this . hass , e ) } @ change = $ { c => { this . send ( e , "schedule" , "set_active" , { active : c . target . checked } ) } } / > Aktiv < / l a b e l >
$ { o > 0 ? p ` <p class="next">Nächster Schaltpunkt: ${ new Date ( o * 1e3 ) . toLocaleString ( this . hass . language ) } ${ s ? ` \x B7 ${ s . name } ` : "" } </p> ` : f }
$ { i . length ? i . map ( c => p ` <div class="schedule-group"><b> ${ a . filter ( ( u , h ) => c . days & 1 << h ) . join ( " \xB7 " ) } </b><div class="points">
$ { [ ... 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 ` <span class="point"><time> ${ l ( u ) } </time><span class="dot" style= ${ ` background:# ${ Number ( h ? . color ? ? 8885929 ) . toString ( 16 ) . padStart ( 6 , "0" ) . slice ( - 6 ) } ` } ></span> ${ h ? . name || "Aktion" } </span> ` } ) }
< / d i v > < / d i v > ` ) : p ` < p c l a s s = " m i s s i n g " > K e i n e S c h a l t p u n k t e v o r h a n d e n . < / p > ` }
< / d e t a i l s > ` } r e n d e r ( ) { i f ( ! t h i s . h a s s | | ! t h i s . r o o m ) r e t u r n f ; l e t e = g l . f i l t e r ( i = > i . k e y ! = = " s t a t u s " & & t h i s . r o o m . h v a c ? . [ i . k e y ] & & t h i s . r o o m . h v a c [ i . k e y ] ! = = " n o n e " ) , t = t h i s . r o o m . h v a c ? . s c h e d u l e s ? ? [ ] , r = t h i s . r o o m . f l o o r _ h e a t i n g & & t h i s . r o o m . f l o o r _ h e a t i n g ! = = " n o n e " ? t h i s . r o o m . f l o o r _ h e a t i n g : n u l l ; r e t u r n p ` $ { r | | e . l e n g t h ? p ` < s e c t i o n > < h 3 > R a u m k l i m a < / h 3 > $ { r ? t h i s . v a l u e ( " F u \ x D F b o d e n h e i z u n g " , r , ! 0 ) : f } $ { e . m a p ( i = > t h i s . v a l u e ( i . l a b e l , t h i s . r o o m . h v a c [ i . k e y ] , ! ! i . c o n t r o l ) ) } < / s e c t i o n > ` : f }
< / d e t a i l s > ` } r e n d e r ( ) { i f ( ! t h i s . h a s s | | ! t h i s . r o o m ) r e t u r n f ; l e t e = y l . f i l t e r ( i = > i . k e y ! = = " s t a t u s " & & t h i s . r o o m . h v a c ? . [ i . k e y ] & & t h i s . r o o m . h v a c [ i . k e y ] ! = = " n o n e " ) , t = t h i s . r o o m . h v a c ? . s c h e d u l e s ? ? [ ] , r = t h i s . r o o m . f l o o r _ h e a t i n g & & t h i s . r o o m . f l o o r _ h e a t i n g ! = = " n o n e " ? t h i s . r o o m . f l o o r _ h e a t i n g : n u l l ; r e t u r n p ` $ { r | | e . l e n g t h ? p ` < s e c t i o n > < h 3 > R a u m k l i m a < / h 3 > $ { r ? t h i s . v a l u e ( " F u \ x D F b o d e n h e i z u n g " , r , ! 0 ) : f } $ { e . m a p ( i = > t h i s . v a l u e ( i . l a b e l , t h i s . r o o m . h v a c [ i . k e y ] , ! ! i . c o n t r o l ) ) } < / s e c t i o n > ` : f }
$ { t . length ? p ` <section><h3>Schaltuhren</h3> ${ t . map ( i => this . schedule ( i ) ) } </section> ` : f }
$ { this . _error ? p ` <p role="alert" class="error"> ${ this . _error } </p> ` : f } ` }static styles=[y e,H e,J `
$ { this . _error ? p ` <p role="alert" class="error"> ${ this . _error } </p> ` : f } ` }static styles=[v e,P e,Q `
: host { display : block ; }
section { margin : 18 px 0 ; }
h3 { font - size : 12 px ; text - transform : uppercase ; letter - spacing : . 05 em ; color : var ( -- nf - muted ) ; margin : 0 0 8 px ; }
@@ -240,14 +240,14 @@ A plugin runs with the same rights as NextFloor in your browser. The file has be
. point time { font - variant - numeric : tabular - nums ; }
. dot { width : 8 px ; height : 8 px ; border - radius : 50 % ; }
. error { color : var ( -- nf - danger , # ff6b7a ) ; font - size : 12 px ; }
` ]};customElements.get("nf-room-hvac")||customElements.define("nf-room-hvac",co);var dm=new Set(["on","home","open","true","active","playing","heat","heating"]);function Ue(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):dm.has(i)||Number.isFinite(Number(i))&&Number(i)>0;return t.invert?!s:s}function uo(n,e){let t=[];for(let r of e.floors)for(let i of r.furniture)Ue(n,i)||t.push(i.id);return t.sort()}function bl(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 ae(n,e){if(!Ci(e))return $ (n, ` furn _$ { e } ` );let t=X(e);return t?hm(t,e,n?.language??navigator.language): $ (n,"pack_missing_item")}function hm(n,e,t){return n.name[t.split("-")[0]]??Xa(t,e)??ia(n,t)}var ee=(n,e)=>[n[0]-e[0],n[1]-e[1]],Pe=(n,e)=>[n[0]+e[0],n[1]+e[1]],Se=(n,e)=>[n[0]*e,n[1]*e],ue=(n,e)=>n[0]*e[0]+n[1]*e[1],je=(n,e)=>n[0]*e[1]-n[1]*e[0],qe=n=>Math.hypot(n[0],n[1]), $ e=n=>{let e=qe(n)||1;return[n[0]/e,n[1]/e]},ho=n=>[-n[1],n[0]],mo=n=>[n[1],-n[0]];function yl(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 mm(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 pm(n,e,t){if(n.a===e.b)return!1;let r= $ e(ee(t[n.b],t[n.a])),i= $ e(ee(t[e.b],t[e.a]));return Math.abs(je(r,i))>1e-6||ue(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 vl(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]]:yl(r[a[0]]),c=r[a[1]].a===s?r[a[1]]:yl(r[a[1]]);if(!pm(l,c,e))continue;let u={...l,b:c.b,sources:mm(l.sources,c.sources)};o=[...r.filter((h,m)=>m!==a[0]&&m!==a[1]),u];break}if(!o)return r;r=o}}function wl(n,e){let t=new Map;n.forEach((i,o)=>{let s= $ e(ee(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:Se(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:Pe(s,Se(ho(l.d),l.left)),right:Pe(s,Se(mo(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=Pe(s,Se(ho(l.d),l.left)),m=Pe(s,Se(mo(u.d),u.right)),d=je(l.d,u.d);if(Math.abs(d)<1e-4)return;let g=Pe(h,Se(l.d,je(ee(m,h),u.d)/d));qe(ee(g,s))>a||(r.get(l.key).left=g,r.get(u.key).right=g)})}return r}function xl(n,e){let t=n.filter((r,i)=>qe(ee(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]=[ee(i,s),ee(a,i)];return Math.abs(je( $ e(l), $ e(c)))<1e-7&&ue(l,c)>0});if(r===-1)return t;t=t.filter((i,o)=>o!==r)}}function fm(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 gm(n,e){let t=[];for(let r of n){let i=r.points;if(i.length<3||Math.abs(gt(i))<1e-6)continue;let o=gt(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 _m(n,e,t){let r=[];for(let i of n){let[o,s]=[e[i.u],e[i.v]],a=ee(s,o),l=qe(a),c=Se(a,1/l),u=e.map((m,d)=>({id:d,rel:ee(m,o)})).filter(({id:m,rel:d})=>m!==i.u&&m!==i.v&&ue(d,c)>t&&ue(d,c)<l-t&&Math.abs(je(c,d))<=t).map(({id:m,rel:d})=>({t:ue(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<h.length;m++){let[d,g]=[h[m],h[m+1]];r.push({u:d.id,v:g.id,room:i.room,edge:i.edge,t0:i.forward?d.t:l-g.t,t1:i.forward?g.t:l-d.t,forward:i.forward})}}return r}var kl=n=>({room_id:n.room,edge:n.edge,t0:n.t0,t1:n.t1});function bm(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;
Line truncated
< h4 > $ { An [ e ] } $ { Ie [ e ] } < / h 4 >
` ]};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(_t(i))<1e-6)continue;let o=_t(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)<l-t&&Math.abs(qe(c,d))<=t).map(({id:m,rel:d})=>({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<h.length;m++){let[d,g]=[h[m],h[m+1]];r.push({u:d.id,v:g.id,room:i.room,edge:i.edge,t0:i.forward?d.t:l-g.t,t1:i.forward?g.t:l-d.t,forward:i.forward})}}return r}var Ml=n=>({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
Line truncated
< h4 > $ { Rn [ e ] } $ { Ce [ e ] } < / h 4 >
$ { this . readings . filter ( t => t . kind === e ) . map ( t => p ` <div class="reading" title= ${ ` ${ t . manual ? "Eigener Z\xE4hler" : "Bereichsz\xE4hler" } ${ t . incomplete ? " \xB7 Err: Mindestens ein Wert fehlt; angezeigt wird die Summe der verf\xFCgbaren Werte." : "" }
$ { t . sources . map ( r => this . hass . states [ r ] ? . attributes . symcon _path || this . hass . states [ r ] ? . attributes . friendly _name || r ) . join ( `
` )} ` } >
< span > $ { Vt ( t ) } $ { t . manual ? p ` <small>· Zähler</small> ` : "" } < / s p a n > < b > $ { N e ( t h i s . h a s s , t ) } $ { G ( t h i s . h a s s , t . s o u r c e s , ` $ { I e [ t . k i n d ] } \ x B 7 $ { V t ( t ) } ` ) } < / b >
< span > $ { Gt ( t ) } $ { t . manual ? p ` <small>· Zähler</small> ` : "" } < / s p a n > < b > $ { L e ( t h i s . h a s s , t ) } $ { U ( t h i s . h a s s , t . s o u r c e s , ` $ { C e [ t . k i n d ] } \ x B 7 $ { G t ( t ) } ` ) } < / b >
< / d i v > ` ) }
< / s e c t i o n > ` ) } ` } s t a t i c s t y l e s = J `
< / s e c t i o n > ` ) } ` } s t a t i c s t y l e s = Q `
: host { display : block ; color : var ( -- nf - text ) ; font : inherit ; }
section { padding : 10 px 0 ; border - bottom : 1 px solid var ( -- nf - line , # ffffff20 ) ; }
section : last - child { border : 0 ; }
@@ -256,12 +256,12 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. reading span { color : var ( -- nf - muted , # aaa ) ; }
b { white - space : nowrap ; font - variant - numeric : tabular - nums ; }
small { font - size : . 85 em ; }
` };customElements.get("nf-utility-report")||customElements.define("nf-utility-report",vo);var xo=Math.PI/180,Kl=3,Gl=.1,wo=1/6,Ul=(n,e)=>[Math.sin((e+n)*xo),-Math.cos((e+n)*xo)],Im=["N","NE","E","SE","S","SW","W","NW"];function Cm(n,e,t){return jl(n,e,t).map(r=>r.normal)}function jl(n,e,t){let r=[];for(let i of n.openings){if(i.room_id!==e.id||i.type==="garage")continue;let o=Ml(i,n.rooms,n.walls??[]),s=o?Rl(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 Nm(n,e){let t=((Math.atan2(n[0],-n[1])/xo-e)%360+360)%360;return Im[Math.round(t/45)%8]}var Bl=new WeakMap;function ql(n,e){let t=Bl.get(e);return t||(t=Lt(e.rooms,{exterior:n.settings.wall_exterior,interior:n.settings.wall_interior},e.walls??[]).walls,Bl.set(e,t)),t}var Vl=new WeakMap;function Kt(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=Vl.get(e);s||Vl.set(e,s=new Map);let a=s.get(o);if(a)return a;let l=Lm(n,e,t,r,i);return s.set(o,l),l}function Lm(n,e,t,r,i){let o=n.settings.north??0,s=Cm(e,t,ql(n,e)),a=[...new Set(s.map(c=>Nm(c,o)))];if(!s.length)return{hours:0,facing:a};let l=0;for(let c=wo/2;c<24;c+=wo){let u=ft(Rt(c,r.zone,i),r.latitude,r.longitude);if(u.elevation<Kl)continue;let h=Ul(u.azimuth,o);s.some(m=>m[0]*h[0]+m[1]*h[1]>Gl)&&l++}return{hours:Math.round(l*wo*10)/10,facing:a}}function Zl(n,e,t,r,i=new Date().getFullYear()){return Array.from({length:12},(o,s)=>Kt(n,e,t,r,new Date(Date.UTC(i,s,15,12))).hours)}function Yl(n,e,t,r,i=new Date){let o=ft(i,r.latitude,r.longitude);if(o.elevation<Kl)return[];let s=Ul(o.azimuth,n.settings.north??0);return jl(e,t,ql(n,e)).filter(a=>a.normal[0]*s[0]+a.normal[1]*s[1]>Gl).map(a=>a.opening)}var Jl=n=>6.112*Math.exp(17.62*n/(243.12+n));function Gt(n,e,t=4){if(n===null||e===null)return null;let r=Math.min(100,e*Jl(n)/Jl(n-t));return Math.round(Math.min(100,Math.max(0,(r-65)/20*100)))}function Br(n,e,t){return t!==null&&t>=70?"mould":n!==null&&n>=1e3?"co2":e!==null&&e>=65?"humidity":null}function vt(n=new Date,e=50){let t=n.getMonth(),r=t>=4&&t<=8;return e<0?!r:r}function Vr(n,e,t,r=!1){let i=[];if(n!==null){let[s,a]=r?[22,26]:[20,23],l=n<s?s-n:n>a?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 Om={temperature:{deviceClass:"temperature",unit:" \x B0C",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]]]}},Wm={deviceClass:"temperature",unit:" \x B0C",stops:[[19,[.2,.45,1]],[22.5,[.15,.85,.75]],[25.5,[.95,.8,.3]],[29,[1,.28,.18]]]};function Kr(n,e=!1){return n==="temperature"&&e?Wm:Om[n]}var Bm=(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 Ql(n,e,t=!1){let{stops:r}=Kr(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 Bm(s,l,(e-o)/(a-o))}function ko(n,e,t,r){let i=Wt(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 So(n,e,t,r)){let a=q(n.states[s]);a!==null&&(o=(o??0)+Math.max(0,a))}return o}function So(n,e,t,r){let i=Wt(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)?ve(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"?ve(n,h.entity):null;m&&c.add(m);for(let d of h.gang_entities??[]){let g=d&&d!=="none"?ve(n,d):null;g&&c.add(g)}}return[...c].filter(h=>!l.has(h))}function Xl(n,e,t){let r=new Map;for(let i of e.floors)for(
Line truncated
< path d = $ { Ar ( n ) } / >
< /svg>`,q r={previous:"M6 6h2v12H6zM20 6v12l-10-6z",play:"M8 5v14l11-7z",pause:"M7 5h4v14H7zM13 5h4v14h-4z",next:"M16 6h2v12h-2zM4 6v12l10-6z"},A o=n=>p`<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d=${n} / > < / s v g > ` , g p = 2 4 , _ p = 1 0 , R o = c l a s s e x t e n d s Q { s t a t i c p r o p e r t i e s = { h a s s : { a t t r i b u t e : ! 1 } , r o o m : { a t t r i b u t e : ! 1 } , f l o o r : { a t t r i b u t e : ! 1 } , c o n f i r m E n t i t i e s : { a t t r i b u t e : ! 1 } , p h r a s e s : { a t t r i b u t e : ! 1 } , o u t s i d e : { a t t r i b u t e : ! 1 } , _ s h o w A l l : { s t a t e : ! 0 } , _ s a i d : { s t a t e : ! 0 } , _ f o l d e d : { s t a t e : ! 0 } , _ c u r v e : { s t a t e : ! 0 } , _ m o o d N a m e : { s t a t e : ! 0 } , _ u n d o : { s t a t e : ! 0 } , _ e n e r g y : { s t a t e : ! 0 } , _ s u n Y e a r : { s t a t e : ! 0 } , r o o m s : { a t t r i b u t e : ! 1 } , b u i l d i n g : { a t t r i b u t e : ! 1 } } ; s a i d T i m e r ; m e m o = n u l l ; c u r v e F o r = " " ; u n d o T i m e r ; c o n s t r u c t o r ( ) { s u p e r ( ) , t h i s . r o o m = n u l l , t h i s . f l o o r = n u l l , t h i s . p h r a s e s = n u l l , t h i s . o u t s i d e = n u l l , t h i s . _ s a i d = n u l l , t h i s . _ s h o w A l l = ! 1 , t h i s . _ f o l d e d = ! 1 , t h i s . _ c u r v e = n u l l , t h i s . _ m o o d N a m e = n u l l , t h i s . _ u n d o = n u l l , t h i s . _ e n e r g y = n u l l , t h i s . _ s u n Y e a r = ! 1 , t h i s . r o o m s = n u l l , t h i s . b u i l d i n g = n u l l } f i r e M o o d s ( e , t ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( " m o o d - c h a n g e " , { d e t a i l : { r o o m I d : e . i d , m o o d s : t } , b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } r u n M o o d ( e ) { f o r ( l e t t o f U r ( e ) ) t h i s . c a l l ( " l i g h t " , t . s e r v i c e , t . d a t a ) } r e n d e r M o o d s ( e , t ) { l e t r = e . m o o d s ? ? [ ] , i = ! ! t h i s . r o o m s & & ! ! t h i s . h a s s . u s e r ? . i s _ a d m i n ; i f ( ! r . l e n g t h & & ! i ) r e t u r n f ; l e t o = ( t h i s . r o o m s ? ? [ ] ) . f i l t e r ( l = > l . i d ! = = e . i d & & l . a r e a _ i d ) , s = l = > U ( t h i s . h a s s , l ) . f i l t e r ( c = > c . s t a r t s W i t h ( " l i g h t . " ) ) , a = ( ) = > { l e t l = ( t h i s . _ m o o d N a m e ? ? " " ) . t r i m ( ) | | t h i s . t ( " m o o d _ n e w " ) ; t h i s . f i r e M o o d s ( e , [ . . . r , { i d : ` m o o d _ $ { D a t e . n o w ( ) . t o S t r i n g ( 3 6 ) } ` , n a m e : l , l i g h t s : t . m a p ( G r ) } ] ) , t h i s . _ m o o d N a m e = n u l l } ; r e t u r n p ` < d i v c l a s s = " n f - r p - m o o d s " >
` };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=gt(zt(c,r.zone,i),r.latitude,r.longitude);if(u.elevation<jl)continue;let h=Zl(u.azimuth,o);s.some(m=>m[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=gt(i,r.latitude,r.longitude);if(o.elevation<jl)return[];let s=Zl(o.azimuth,n.settings.north??0);return Yl(e,t,Jl(n,e)).filter(a=>a.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 wt(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=n<s?s-n:n>a?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:" \x B0C",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:" \x B0C",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(
Line truncated
< path d = $ { Rr ( n ) } / >
< /svg>`,Y r={previous:"M6 6h2v12H6zM20 6v12l-10-6z",play:"M8 5v14l11-7z",pause:"M7 5h4v14H7zM13 5h4v14h-4z",next:"M16 6h2v12h-2zM4 6v12l10-6z"},z o=n=>p`<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><path d=${n} / > < / s v g > ` , y p = 2 4 , v p = 1 0 , T o = c l a s s e x t e n d s X { s t a t i c p r o p e r t i e s = { h a s s : { a t t r i b u t e : ! 1 } , r o o m : { a t t r i b u t e : ! 1 } , f l o o r : { a t t r i b u t e : ! 1 } , c o n f i r m E n t i t i e s : { a t t r i b u t e : ! 1 } , p h r a s e s : { a t t r i b u t e : ! 1 } , o u t s i d e : { a t t r i b u t e : ! 1 } , _ s h o w A l l : { s t a t e : ! 0 } , _ s a i d : { s t a t e : ! 0 } , _ f o l d e d : { s t a t e : ! 0 } , _ c u r v e : { s t a t e : ! 0 } , _ m o o d N a m e : { s t a t e : ! 0 } , _ u n d o : { s t a t e : ! 0 } , _ e n e r g y : { s t a t e : ! 0 } , _ s u n Y e a r : { s t a t e : ! 0 } , r o o m s : { a t t r i b u t e : ! 1 } , b u i l d i n g : { a t t r i b u t e : ! 1 } } ; s a i d T i m e r ; m e m o = n u l l ; c u r v e F o r = " " ; u n d o T i m e r ; c o n s t r u c t o r ( ) { s u p e r ( ) , t h i s . r o o m = n u l l , t h i s . f l o o r = n u l l , t h i s . p h r a s e s = n u l l , t h i s . o u t s i d e = n u l l , t h i s . _ s a i d = n u l l , t h i s . _ s h o w A l l = ! 1 , t h i s . _ f o l d e d = ! 1 , t h i s . _ c u r v e = n u l l , t h i s . _ m o o d N a m e = n u l l , t h i s . _ u n d o = n u l l , t h i s . _ e n e r g y = n u l l , t h i s . _ s u n Y e a r = ! 1 , t h i s . r o o m s = n u l l , t h i s . b u i l d i n g = n u l l } f i r e M o o d s ( e , t ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( " m o o d - c h a n g e " , { d e t a i l : { r o o m I d : e . i d , m o o d s : t } , b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } r u n M o o d ( e ) { f o r ( l e t t o f q r ( e ) ) t h i s . c a l l ( " l i g h t " , t . s e r v i c e , t . d a t a ) } r e n d e r M o o d s ( e , t ) { l e t r = e . m o o d s ? ? [ ] , i = ! ! t h i s . r o o m s & & ! ! t h i s . h a s s . u s e r ? . i s _ a d m i n ; i f ( ! r . l e n g t h & & ! i ) r e t u r n f ; l e t o = ( t h i s . r o o m s ? ? [ ] ) . f i l t e r ( l = > l . i d ! = = e . i d & & l . a r e a _ i d ) , s = l = > j ( t h i s . h a s s , l ) . f i l t e r ( c = > c . s t a r t s W i t h ( " l i g h t . " ) ) , a = ( ) = > { l e t l = ( t h i s . _ m o o d N a m e ? ? " " ) . t r i m ( ) | | t h i s . t ( " m o o d _ n e w " ) ; t h i s . f i r e M o o d s ( e , [ . . . r , { i d : ` m o o d _ $ { D a t e . n o w ( ) . t o S t r i n g ( 3 6 ) } ` , n a m e : l , l i g h t s : t . m a p ( j r ) } ] ) , t h i s . _ m o o d N a m e = n u l l } ; r e t u r n p ` < d i v c l a s s = " n f - r p - m o o d s " >
$ { r . map ( l => p ` <span class="nf-rp-mood">
< button class = "nf-btn" title = $ { this . t ( "mood_set" ) } @ click = $ { ( ) => this . runMood ( l . lights ) } > ✨ $ { l . name } < / b u t t o n >
$ { o . length ? p ` <select class="nf-rp-mood-to" aria-label= ${ this . t ( "mood_carry" ) } title= ${ this . t ( "mood_carry" ) } @change= ${ c => { let u = c . target , h = o . find ( m => m . id === u . value ) ; u . value = "" , h && this . runMood ( hc ( l , s ( h ) ) ) } }>
$ { o . length ? p ` <select class="nf-rp-mood-to" aria-label= ${ this . t ( "mood_carry" ) } title= ${ this . t ( "mood_carry" ) } @change= ${ c => { let u = c . target , h = o . find ( m => m . id === u . value ) ; u . value = "" , h && this . runMood ( fc ( l , s ( h ) ) ) } }>
< option value = "" > → < / o p t i o n >
$ { o . map ( c => p ` <option value= ${ c . id } > ${ c . name } </option> ` ) }
< / s e l e c t > ` : f }
@@ -271,98 +271,98 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
> < input type = "text" maxlength = "40" placeholder = $ { this . t ( "mood_new" ) } . value = $ { this . _moodName } @ input = $ { l => this . _moodName = l . target . value } @ keydown = $ { l => l . key === "Enter" && a ( ) } / >
< button class = "nf-btn" @ click = $ { a } > $ { this . t ( "mood_save" ) } < / b u t t o n > < / s p a n
> ` :f}
< / d i v > ` } a s y n c l o a d C u r v e ( e ) { l e t t = b e ( t h i s . h a s s , t h i s . f l o o r , e , " t e m p e r a t u r e " ) , r = t . l e n g t h ? t : U ( t h i s . h a s s , e ) . f i l t e r ( s = > s . s t a r t s W i t h ( " c l i m a t e . " ) ) ; i f ( ! r . l e n g t h ) r e t u r n ; l e t i = D a t e . n o w ( ) , o = i - 2 4 * 3 6 e 5 ; t r y { l e t s = a w a i t z n ( t h i s . h a s s , r , o , i , ! ! t . l e n g t h ) ; i f ( t h i s . r o o m ? . i d ! = = e . i d ) r e t u r n ; l e t a = [ ] ; f o r ( l e t l = 1 ; l < = 9 6 ; l + + ) { l e t c = U t ( t h i s . h a s s , s , o + ( i - o ) * l / 9 6 ) , u = r . m a p ( h = > h . s t a r t s W i t h ( " c l i m a t e . " ) ? N u m b e r ( c . s t a t e s [ h ] ? . a t t r i b u t e s . c u r r e n t _ t e m p e r a t u r e ) : N u m b e r ( c . s t a t e s [ h ] ? . s t a t e ) ) . f i l t e r ( N u m b e r . i s F i n i t e ) ; a . p u s h ( u . l e n g t h ? u . r e d u c e ( ( h , m ) = > h + m , 0 ) / u . l e n g t h : n u l l ) } t h i s . _ c u r v e = a . s o m e ( l = > l ! = = n u l l ) ? a : n u l l } c a t c h { t h i s . _ c u r v e = n u l l } } a s y n c l o a d E n e r g y ( e ) { i f ( ! t h i s . f l o o r | | ! t h i s . b u i l d i n g ) r e t u r n ; i f ( V ( t h i s . h a s s ) ) { t h i s . _ e n e r g y = n u l l ; r e t u r n } l e t t = S o ( t h i s . h a s s , t h i s . b u i l d i n g , t h i s . f l o o r , e ) ; t r y { l e t r = a w a i t r c ( t h i s . h a s s , t ) ; t h i s . r o o m ? . i d = = = e . i d & & ( t h i s . _ e n e r g y = r ) } c a t c h { t h i s . _ e n e r g y = n u l l } } r e n d e r E m p t y L i g h t s ( e , t ) { i f ( ! t . l e n g t h | | ! t h i s . r o o m ) r e t u r n f ; l e t r = U ( t h i s . h a s s , e ) . m a p ( s = > t h i s . h a s s . s t a t e s [ s ] ) . f i l t e r ( s = > ! ! s & & s . e n t i t y _ i d . s t a r t s W i t h ( " b i n a r y _ s e n s o r . " ) & & [ " m o t i o n " , " o c c u p a n c y " , " p r e s e n c e " ] . i n c l u d e s ( S t r i n g ( s . a t t r i b u t e s . d e v i c e _ c l a s s ) ) ) ; i f ( ! r . l e n g t h | | r . s o m e ( s = > s . s t a t e ! = = " o f f " ) ) r e t u r n f ; l e t i = M a t h . m a x ( . . . r . m a p ( s = > D a t e . p a r s e ( S t r i n g ( s . l a s t _ c h a n g e d ? ? " " ) ) | | 0 ) ) , o = M a t h . f l o o r ( ( D a t e . n o w ( ) - i ) / 6 e 4 ) ; r e t u r n ! i | | o < _ p ? f : p ` < d i v c l a s s = " n f - r p - s h a d e " >
< / d i v > ` } a s y n c l o a d C u r v e ( e ) { l e t t = y e ( t h i s . h a s s , t h i s . f l o o r , e , " t e m p e r a t u r e " ) , r = t . l e n g t h ? t : j ( t h i s . h a s s , e ) . f i l t e r ( s = > s . s t a r t s W i t h ( " c l i m a t e . " ) ) ; i f ( ! r . l e n g t h ) r e t u r n ; l e t i = D a t e . n o w ( ) , o = i - 2 4 * 3 6 e 5 ; t r y { l e t s = a w a i t F n ( t h i s . h a s s , r , o , i , ! ! t . l e n g t h ) ; i f ( t h i s . r o o m ? . i d ! = = e . i d ) r e t u r n ; l e t a = [ ] ; f o r ( l e t l = 1 ; l < = 9 6 ; l + + ) { l e t c = q t ( t h i s . h a s s , s , o + ( i - o ) * l / 9 6 ) , u = r . m a p ( h = > h . s t a r t s W i t h ( " c l i m a t e . " ) ? N u m b e r ( c . s t a t e s [ h ] ? . a t t r i b u t e s . c u r r e n t _ t e m p e r a t u r e ) : N u m b e r ( c . s t a t e s [ h ] ? . s t a t e ) ) . f i l t e r ( N u m b e r . i s F i n i t e ) ; a . p u s h ( u . l e n g t h ? u . r e d u c e ( ( h , m ) = > h + m , 0 ) / u . l e n g t h : n u l l ) } t h i s . _ c u r v e = a . s o m e ( l = > l ! = = n u l l ) ? a : n u l l } c a t c h { t h i s . _ c u r v e = n u l l } } a s y n c l o a d E n e r g y ( e ) { i f ( ! t h i s . f l o o r | | ! t h i s . b u i l d i n g ) r e t u r n ; i f ( B ( t h i s . h a s s ) ) { t h i s . _ e n e r g y = n u l l ; r e t u r n } l e t t = A o ( t h i s . h a s s , t h i s . b u i l d i n g , t h i s . f l o o r , e ) ; t r y { l e t r = a w a i t s c ( t h i s . h a s s , t ) ; t h i s . r o o m ? . i d = = = e . i d & & ( t h i s . _ e n e r g y = r ) } c a t c h { t h i s . _ e n e r g y = n u l l } } r e n d e r E m p t y L i g h t s ( e , t ) { i f ( ! t . l e n g t h | | ! t h i s . r o o m ) r e t u r n f ; l e t r = j ( t h i s . h a s s , e ) . m a p ( s = > t h i s . h a s s . s t a t e s [ s ] ) . f i l t e r ( s = > ! ! s & & s . e n t i t y _ i d . s t a r t s W i t h ( " b i n a r y _ s e n s o r . " ) & & [ " m o t i o n " , " o c c u p a n c y " , " p r e s e n c e " ] . i n c l u d e s ( S t r i n g ( s . a t t r i b u t e s . d e v i c e _ c l a s s ) ) ) ; i f ( ! r . l e n g t h | | r . s o m e ( s = > s . s t a t e ! = = " o f f " ) ) r e t u r n f ; l e t i = M a t h . m a x ( . . . r . m a p ( s = > D a t e . p a r s e ( S t r i n g ( s . l a s t _ c h a n g e d ? ? " " ) ) | | 0 ) ) , o = M a t h . f l o o r ( ( D a t e . n o w ( ) - i ) / 6 e 4 ) ; r e t u r n ! i | | o < v p ? f : p ` < d i v c l a s s = " n f - r p - s h a d e " >
< span > 💡 $ { this . t ( "empty_lights_hint" , { n : t . length , min : o } ) } < / s p a n >
< button class = "nf-btn nf-rp-small" @ click = $ { ( ) => this . call ( "light" , "turn_off" , { entity _id : t . map ( s => s . entity _id ) } ) } > $ { this . t ( "empty_lights_off" ) } < / b u t t o n >
< / d i v > ` } r e n d e r O p e n W h i l e H e a t i n g ( e ) { l e t t = t h i s . r o o m ; i f ( ! t | | ! t h i s . f l o o r ) r e t u r n f ; l e t r = e . f i l t e r ( a = > a . a t t r i b u t e s . h v a c _ a c t i o n = = = " h e a t i n g " | | a . s t a t e = = = " h e a t " & & a . a t t r i b u t e s . h v a c _ a c t i o n = = = v o i d 0 ) ; i f ( ! r . l e n g t h ) r e t u r n f ; l e t i = a = > ! ! a & & a ! = = " n o n e " & & t h i s . h a s s . s t a t e s [ a ] ? . s t a t e = = = " o n " , o = t h i s . f l o o r . o p e n i n g s . f i l t e r ( a = > a . r o o m _ i d = = = t . i d & & [ a . c o n t a c t , a . c o n t a c t 2 , a . t i l t , a . t i l t 2 ] . s o m e ( i ) ) ; i f ( ! o . l e n g t h ) r e t u r n f ; l e t s = ( ) = > { f o r ( l e t a o f r ) ( a . a t t r i b u t e s . h v a c _ m o d e s ? ? [ ] ) . i n c l u d e s ( " o f f " ) ? t h i s . c a l l ( " c l i m a t e " , " s e t _ h v a c _ m o d e " , { e n t i t y _ i d : a . e n t i t y _ i d , h v a c _ m o d e : " o f f " } ) : t y p e o f a . a t t r i b u t e s . m i n _ t e m p = = " n u m b e r " & & t h i s . c a l l ( " c l i m a t e " , " s e t _ t e m p e r a t u r e " , { e n t i t y _ i d : a . e n t i t y _ i d , t e m p e r a t u r e : a . a t t r i b u t e s . m i n _ t e m p } ) } ; r e t u r n p ` < d i v c l a s s = " n f - r p - s h a d e n f - r p - o p e n - h e a t " >
< button class = "nf-btn nf-rp-small" ? disabled = $ { ! t . some ( s => W ( this . hass , s . entity _id ) ) } @ click = $ { ( ) => this . call ( "light" , "turn_off" , { entity _id : t . filter ( s => W ( this . hass , s . entity _id ) ) . map ( s => s . entity _id ) } ) } > $ { this . t ( "empty_lights_off" ) } < / b u t t o n >
< / d i v > ` } r e n d e r O p e n W h i l e H e a t i n g ( e ) { l e t t = t h i s . r o o m ; i f ( ! t | | ! t h i s . f l o o r ) r e t u r n f ; l e t r = e . f i l t e r ( a = > a . a t t r i b u t e s . h v a c _ a c t i o n = = = " h e a t i n g " | | a . s t a t e = = = " h e a t " & & a . a t t r i b u t e s . h v a c _ a c t i o n = = = v o i d 0 ) ; i f ( ! r . l e n g t h ) r e t u r n f ; l e t i = a = > ! ! a & & a ! = = " n o n e " & & t h i s . h a s s . s t a t e s [ a ] ? . s t a t e = = = " o n " , o = t h i s . f l o o r . o p e n i n g s . f i l t e r ( a = > a . r o o m _ i d = = = t . i d & & [ a . c o n t a c t , a . c o n t a c t 2 , a . t i l t , a . t i l t 2 ] . s o m e ( i ) ) ; i f ( ! o . l e n g t h ) r e t u r n f ; l e t s = ( ) = > { f o r ( l e t a o f r ) { i f ( ! W ( t h i s . h a s s , a . e n t i t y _ i d ) ) c o n t i n u e ; ( a . a t t r i b u t e s . h v a c _ m o d e s ? ? [ ] ) . i n c l u d e s ( " o f f " ) ? t h i s . c a l l ( " c l i m a t e " , " s e t _ h v a c _ m o d e " , { e n t i t y _ i d : a . e n t i t y _ i d , h v a c _ m o d e : " o f f " } ) : t y p e o f a . a t t r i b u t e s . m i n _ t e m p = = " n u m b e r " & & t h i s . c a l l ( " c l i m a t e " , " s e t _ t e m p e r a t u r e " , { e n t i t y _ i d : a . e n t i t y _ i d , t e m p e r a t u r e : a . a t t r i b u t e s . m i n _ t e m p } ) } } ; r e t u r n p ` < d i v c l a s s = " n f - r p - s h a d e n f - r p - o p e n - h e a t " >
< span > 🪟 $ { this . t ( "open_heating_hint" , { n : o . length } ) } < / s p a n >
< button class = "nf-btn nf-rp-small" @ click = $ { s } > $ { this . t ( "open_heating_off" ) } < / b u t t o n >
< / d i v > ` } r e n d e r S h a d e ( ) { l e t e = t h i s . r o o m , { l a t i t u d e : t , l o n g i t u d e : r } = t h i s . h a s s . c o n f i g ? ? { } ; i f ( ! e | | ! t h i s . f l o o r | | ! t h i s . b u i l d i n g | | t = = = v o i d 0 | | r = = = v o i d 0 ) r e t u r n f ; l e t i = Z ( t h i s . h a s s , t h i s . f l o o r , e , " t e m p e r a t u r e " ) ; i f ( i = = = n u l l | | i < g p ) r e t u r n f ; l e t o = a = > { l e t l = a & & a ! = = " n o n e " ? t h i s . h a s s . s t a t e s [ a ] : v o i d 0 ; i f ( ! l | | C ( l ) ) r e t u r n ! 1 ; l e t c = l . a t t r i b u t e s . c u r r e n t _ p o s i t i o n ; r e t u r n t y p e o f c = = " n u m b e r " ? c > 3 0 : l . s t a t e = = = " o p e n " } , s = [ . . . n e w S e t ( Y l ( t h i s . b u i l d i n g , t h i s . f l o o r , e , { l a t i t u d e : t , l o n g i t u d e : r } ) . f l a t M a p ( a = > [ a . c o v e r , a . c o v e r 2 ] . f i l t e r ( o ) ) ) ] ; r e t u r n s . l e n g t h ? p ` < d i v c l a s s = " n f - r p - s h a d e " >
< span > ☀ $ { this . t ( "shade_hint" , { n : s . length , temp : ` ${ L ( this . hass , ce ( this . hass , i ) , 1 ) } ${ re ( this . hass ) } ` } ) } < / s p a n >
< button class = "nf-btn nf-rp-small" ? disabled = $ { ! r . some ( a => W ( this . hass , a . entity _id ) ) } @ click = $ { s } > $ { this . t ( "open_heating_off" ) } < / b u t t o n >
< / d i v > ` } r e n d e r S h a d e ( ) { l e t e = t h i s . r o o m , { l a t i t u d e : t , l o n g i t u d e : r } = t h i s . h a s s . c o n f i g ? ? { } ; i f ( ! e | | ! t h i s . f l o o r | | ! t h i s . b u i l d i n g | | t = = = v o i d 0 | | r = = = v o i d 0 ) r e t u r n f ; l e t i = Y ( t h i s . h a s s , t h i s . f l o o r , e , " t e m p e r a t u r e " ) ; i f ( i = = = n u l l | | i < y p ) r e t u r n f ; l e t o = a = > { l e t l = a & & a ! = = " n o n e " ? t h i s . h a s s . s t a t e s [ a ] : v o i d 0 ; i f ( ! l | | C ( l ) ) r e t u r n ! 1 ; l e t c = l . a t t r i b u t e s . c u r r e n t _ p o s i t i o n ; r e t u r n t y p e o f c = = " n u m b e r " ? c > 3 0 : l . s t a t e = = = " o p e n " } , s = [ . . . n e w S e t ( X l ( t h i s . b u i l d i n g , t h i s . f l o o r , e , { l a t i t u d e : t , l o n g i t u d e : r } ) . f l a t M a p ( a = > [ a . c o v e r , a . c o v e r 2 ] . f i l t e r ( o ) ) ) ] . f i l t e r ( a = > W ( t h i s . h a s s , a ) ) ; r e t u r n s . l e n g t h ? p ` < d i v c l a s s = " n f - r p - s h a d e " >
< span > ☀ $ { this . t ( "shade_hint" , { n : s . length , temp : ` ${ L ( this . hass , ue ( this . hass , i ) , 1 ) } ${ ie ( this . hass ) } ` } ) } < / s p a n >
< button class = "nf-btn nf-rp-small" @ click = $ { ( ) => this . call ( "cover" , "close_cover" , { entity _id : s } ) } > $ { this . t ( "shade_close" ) } < / b u t t o n >
< / d i v > ` : f } r e n d e r S u n Y e a r ( ) { l e t e = t h i s . r o o m , { l a t i t u d e : t , l o n g i t u d e : r } = t h i s . h a s s . c o n f i g ? ? { } ; i f ( ! e | | ! t h i s . f l o o r | | ! t h i s . b u i l d i n g | | t = = = v o i d 0 | | r = = = v o i d 0 ) r e t u r n f ; l e t i = { l a t i t u d e : t , l o n g i t u d e : r } ; i f ( ! K t ( t h i s . b u i l d i n g , t h i s . f l o o r , e , { . . . i , z o n e : t h i s . h a s s . c o n f i g ? . t i m e _ z o n e } ) . f a c i n g . l e n g t h ) r e t u r n f ; l e t s = p ` < b u t t o n c l a s s = " n f - r p - s u n - y e a r " a r i a - e x p a n d e d = $ { t h i s . _ s u n Y e a r } t i t l e = $ { t h i s . t ( " r o o m _ s u n _ y e a r _ h i n t " ) } @ c l i c k = $ { ( ) = > t h i s . _ s u n Y e a r = ! t h i s . _ s u n Y e a r } >
< / d i v > ` : f } r e n d e r S u n Y e a r ( ) { l e t e = t h i s . r o o m , { l a t i t u d e : t , l o n g i t u d e : r } = t h i s . h a s s . c o n f i g ? ? { } ; i f ( ! e | | ! t h i s . f l o o r | | ! t h i s . b u i l d i n g | | t = = = v o i d 0 | | r = = = v o i d 0 ) r e t u r n f ; l e t i = { l a t i t u d e : t , l o n g i t u d e : r } ; i f ( ! U t ( t h i s . b u i l d i n g , t h i s . f l o o r , e , { . . . i , z o n e : t h i s . h a s s . c o n f i g ? . t i m e _ z o n e } ) . f a c i n g . l e n g t h ) r e t u r n f ; l e t s = p ` < b u t t o n c l a s s = " n f - r p - s u n - y e a r " a r i a - e x p a n d e d = $ { t h i s . _ s u n Y e a r } t i t l e = $ { t h i s . t ( " r o o m _ s u n _ y e a r _ h i n t " ) } @ c l i c k = $ { ( ) = > t h i s . _ s u n Y e a r = ! t h i s . _ s u n Y e a r } >
☀ $ { this . t ( "room_sun_year" ) }
< / b u t t o n > ` ; i f ( ! t h i s . _ s u n Y e a r ) r e t u r n s ; l e t a = Z l ( t h i s . b u i l d i n g , t h i s . f l o o r , e , i ) , l = M a t h . m a x ( 1 , . . . a ) , c = A r r a y . f r o m ( { l e n g t h : 1 2 } , ( u , h ) = > n e w D a t e ( 2 0 2 6 , h , 1 5 ) . t o L o c a l e D a t e S t r i n g ( t h i s . h a s s . l a n g u a g e , { m o n t h : " n a r r o w " } ) ) ; r e t u r n p ` $ { s }
< / b u t t o n > ` ; i f ( ! t h i s . _ s u n Y e a r ) r e t u r n s ; l e t a = Q l ( t h i s . b u i l d i n g , t h i s . f l o o r , e , i ) , l = M a t h . m a x ( 1 , . . . a ) , c = A r r a y . f r o m ( { l e n g t h : 1 2 } , ( u , h ) = > n e w D a t e ( 2 0 2 6 , h , 1 5 ) . t o L o c a l e D a t e S t r i n g ( t h i s . h a s s . l a n g u a g e , { m o n t h : " n a r r o w " } ) ) ; r e t u r n p ` $ { s }
< div class = "nf-rp-sun-bars" role = "img" aria - label = $ { a . map ( ( u , h ) => ` ${ c [ h ] } ${ L ( this . hass , u , 1 ) } h ` ) . join ( ", " ) } >
$ { a . map ( ( u , h ) => p ` <span title= ${ ` ${ L ( this . hass , u , 1 ) } h ` } ><i style= ${ ` height: ${ Math . round ( u / l * 100 ) } % ` } ></i><b> ${ c [ h ] } </b></span> ` ) }
< / d i v > ` } r e n d e r E n e r g y ( ) { l e t e = t h i s . _ e n e r g y ; i f ( ! e | | e . m o n t h < = 0 ) r e t u r n f ; l e t t = t h i s . b u i l d i n g ? . e n e r g y . t a r i f f , r = t ? t h i s . h a s s . s t a t e s [ t ] : v o i d 0 , i = r ? { v a l u e : N u m b e r ( r . s t a t e ) , u n i t : S t r i n g ( r . a t t r i b u t e s . u n i t _ o f _ m e a s u r e m e n t ? ? " " ) } : n u l l , o = i c ( e . m o n t h , i ) , s = a = > ` $ { L ( t h i s . h a s s , a , a < 1 0 ? 2 : 1 ) } k W h ` ; r e t u r n p ` < p c l a s s = " n f - r p - f a c t s n f - r p - e n e r g y " t i t l e = $ { t h i s . t ( " r o o m _ e n e r g y _ h i n t " ) } >
< / d i v > ` } r e n d e r E n e r g y ( ) { l e t e = t h i s . _ e n e r g y ; i f ( ! e | | e . m o n t h < = 0 ) r e t u r n f ; l e t t = t h i s . b u i l d i n g ? . e n e r g y . t a r i f f , r = t ? t h i s . h a s s . s t a t e s [ t ] : v o i d 0 , i = r ? { v a l u e : N u m b e r ( r . s t a t e ) , u n i t : S t r i n g ( r . a t t r i b u t e s . u n i t _ o f _ m e a s u r e m e n t ? ? " " ) } : n u l l , o = a c ( e . m o n t h , i ) , s = a = > ` $ { L ( t h i s . h a s s , a , a < 1 0 ? 2 : 1 ) } k W h ` ; r e t u r n p ` < p c l a s s = " n f - r p - f a c t s n f - r p - e n e r g y " t i t l e = $ { t h i s . t ( " r o o m _ e n e r g y _ h i n t " ) } >
⚡ $ { this . t ( "room_energy" , { today : s ( e . today ) , month : s ( e . month ) } ) } $ { o ? ` \x B7 ${ L ( this . hass , o . value , 2 ) } ${ o . currency } ` : "" }
< / p > ` } r e n d e r C u r v e ( ) { l e t e = t h i s . _ c u r v e ; i f ( ! e ) r e t u r n f ; l e t t = e . f i l t e r ( c = > c ! = = n u l l ) , r = M a t h . m i n ( . . . t ) , i = M a t h . m a x ( . . . t ) , o = M a t h . m a x ( 1 , i - r ) , s = e . m a p ( c = > c = = = n u l l ? n u l l : c - r + o * . 1 ) , a = T n ( s , 2 2 0 , 3 6 , o * 1 . 2 ) , l = c = > ` $ { L ( t h i s . h a s s , c e ( t h i s . h a s s , c ) , 1 ) } \ x B 0 ` ; r e t u r n p ` < d i v c l a s s = " n f - r p - c u r v e " t i t l e = $ { t h i s . t ( " r o o m _ c u r v e _ h i n t " ) } >
< svg viewBox = "0 0 220 36" preserveAspectRatio = "none" aria - hidden = "true" > $ { ne ` <path d= ${ a } ></path> ` } < / s v g >
< / p > ` } r e n d e r C u r v e ( ) { l e t e = t h i s . _ c u r v e ; i f ( ! e ) r e t u r n f ; l e t t = e . f i l t e r ( c = > c ! = = n u l l ) , r = M a t h . m i n ( . . . t ) , i = M a t h . m a x ( . . . t ) , o = M a t h . m a x ( 1 , i - r ) , s = e . m a p ( c = > c = = = n u l l ? n u l l : c - r + o * . 1 ) , a = D n ( s , 2 2 0 , 3 6 , o * 1 . 2 ) , l = c = > ` $ { L ( t h i s . h a s s , u e ( t h i s . h a s s , c ) , 1 ) } \ x B 0 ` ; r e t u r n p ` < d i v c l a s s = " n f - r p - c u r v e " t i t l e = $ { t h i s . t ( " r o o m _ c u r v e _ h i n t " ) } >
< svg viewBox = "0 0 220 36" preserveAspectRatio = "none" aria - hidden = "true" > $ { re ` <path d= ${ a } ></path> ` } < / s v g >
< span > 24 h · $ { l ( r ) } – $ { l ( i ) } < / s p a n >
< / d i v > ` } w i l l U p d a t e ( e ) { l e t t = e . g e t ( " r o o m " ) ; e . h a s ( " r o o m " ) & & t ? . i d ! = = t h i s . r o o m ? . i d & & ( t h i s . _ f o l d e d = ! 1 , t h i s . _ u n d o = n u l l ) , t h i s . r o o m & & t h i s . h a s s & & t h i s . c u r v e F o r ! = = t h i s . r o o m . i d & & ( t h i s . c u r v e F o r = t h i s . r o o m . i d , t h i s . _ c u r v e = n u l l , t h i s . _ e n e r g y = n u l l , t h i s . l o a d C u r v e ( t h i s . r o o m ) , t h i s . l o a d E n e r g y ( t h i s . r o o m ) ) } u p d a t e d ( e ) { e . h a s ( " _ f o l d e d " ) & & t h i s . t o g g l e A t t r i b u t e ( " f o l d e d " , t h i s . _ f o l d e d ) } t ( e , t ) { r e t u r n $ ( t h i s . h a s s , e , t ) } c a l l ( e , t , r ) { t h i s . h a s s . c a l l S e r v i c e ( e , t , r ) } r e n d e r C l e a n ( e ) { l e t t = e . c l e a n _ e n t i t y , r = t ? t h i s . h a s s . s t a t e s [ t ] : v o i d 0 ; i f ( ! t | | ! r ) r e t u r n f ; l e t i = t . s l i c e ( 0 , t . i n d e x O f ( " . " ) ) , o = ( ) = > i = = = " s c r i p t " ? t h i s . c a l l ( " s c r i p t " , " t u r n _ o n " , { e n t i t y _ i d : t } ) : t h i s . c a l l ( i , " p r e s s " , { e n t i t y _ i d : t } ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - a l l o f f " > < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " ? d i s a b l e d = $ { C ( r ) } t i t l e = $ { t h i s . t ( " r o o m _ c l e a n _ r u n _ h i n t " ) } @ c l i c k = $ { o } > 🧹 $ { t h i s . t ( " r o o m _ c l e a n _ r u n " ) } < / b u t t o n > < / d i v > ` } a l l O f f ( e ) { l e t t = E n ( e ) ; f o r ( l e t r o f t . o f f ) t h i s . c a l l ( r . d o m a i n , r . s e r v i c e , r . d a t a ) ; t h i s . _ u n d o = t . u n d o , c l e a r T i m e o u t ( t h i s . u n d o T i m e r ) , t h i s . u n d o T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ u n d o = n u l l , 1 e 4 ) } u n d o A l l O f f ( ) { f o r ( l e t e o f t h i s . _ u n d o ? ? [ ] ) t h i s . c a l l ( e . d o m a i n , e . s e r v i c e , e . d a t a ) ; t h i s . _ u n d o = n u l l , c l e a r T i m e o u t ( t h i s . u n d o T i m e r ) } r e n d e r A l l O f f ( e ) { i f ( t h i s . _ u n d o ) r e t u r n p ` < d i v c l a s s = " n f - r p - a l l o f f " > < s p a n > $ { t h i s . t ( " a l l _ o f f _ d o n e " ) } < / s p a n > < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " @ c l i c k = $ { ( ) = > t h i s . u n d o A l l O f f ( ) } > ↶ $ { t h i s . t ( " a l l _ o f f _ u n d o " ) } < / b u t t o n > < / d i v > ` ; l e t { c o u n t : t } = E n ( e ) ; r e t u r n t < 2 ? f : p ` < d i v c l a s s = " n f - r p - a l l o f f " > < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " t i t l e = $ { t h i s . t ( " a l l _ o f f _ h i n t " ) } @ c l i c k = $ { ( ) = > t h i s . a l l O f f ( e ) } > ⏻ $ { t h i s . t ( " a l l _ o f f _ n " , { n : t } ) } < / b u t t o n > < / d i v > ` } g e t a r e a N a m e ( ) { r e t u r n t h i s . r o o m ? . a r e a _ i d ? t h i s . h a s s . a r e a s ? . [ t h i s . r o o m . a r e a _ i d ] ? . n a m e : v o i d 0 } p l a c e d A s ( e ) { f o r ( l e t t o f t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] ) f o r ( l e t r o f t . p l a c e m e n t s ) i f ( r . e n t i t y _ i d = = = e ) r e t u r n r } n a m e ( e ) { r e t u r n t h i s . p l a c e d A s ( e ) ? . n a m e ? . t r i m ( ) | | O ( t h i s . h a s s , e , t h i s . a r e a N a m e ) } n a m e B u t t o n ( e ) { r e t u r n p ` < b u t t o n c l a s s = " n f - r p - n a m e " t i t l e = $ { t h i s . t ( " d e t a i l s " ) } @ c l i c k = $ { ( ) = > k e ( t h i s , e ) } > $ { t h i s . n a m e ( e ) } < / b u t t o n > ` } a s k F o r ( e ) { r e t u r n ! t h i s . c o n f i r m E n t i t i e s ? . h a s ( e ) | | c o n f i r m ( t h i s . t ( " c o n f i r m _ s w i t c h " , { n a m e : t h i s . n a m e ( e ) } ) ) } t o g g l e ( e , t , r ) { l e t i = ( ) = > { t h i s . c o n f i r m E n t i t i e s ? . h a s ( e . e n t i t y _ i d ) & & ! c o n f i r m ( t h i s . t ( " c o n f i r m _ s w i t c h " , { n a m e : t h i s . n a m e ( e . e n t i t y _ i d ) } ) ) | | r ( ) } ; r e t u r n p ` < b u t t o n
< / d i v > ` } w i l l U p d a t e ( e ) { l e t t = e . g e t ( " r o o m " ) ; e . h a s ( " r o o m " ) & & t ? . i d ! = = t h i s . r o o m ? . i d & & ( t h i s . _ f o l d e d = ! 1 , t h i s . _ u n d o = n u l l ) , t h i s . r o o m & & t h i s . h a s s & & t h i s . c u r v e F o r ! = = t h i s . r o o m . i d & & ( t h i s . c u r v e F o r = t h i s . r o o m . i d , t h i s . _ c u r v e = n u l l , t h i s . _ e n e r g y = n u l l , t h i s . l o a d C u r v e ( t h i s . r o o m ) , t h i s . l o a d E n e r g y ( t h i s . r o o m ) ) } u p d a t e d ( e ) { e . h a s ( " _ f o l d e d " ) & & t h i s . t o g g l e A t t r i b u t e ( " f o l d e d " , t h i s . _ f o l d e d ) } t ( e , t ) { r e t u r n M ( t h i s . h a s s , e , t ) } c a l l ( e , t , r ) { ( A r r a y . i s A r r a y ( r . e n t i t y _ i d ) ? r . e n t i t y _ i d : [ r . e n t i t y _ i d ] ) . s o m e ( o = > t y p e o f o ! = " s t r i n g " | | ! W ( t h i s . h a s s , o ) ) | | t h i s . h a s s . c a l l S e r v i c e ( e , t , r ) } r e n d e r C l e a n ( e ) { l e t t = e . c l e a n _ e n t i t y , r = t ? t h i s . h a s s . s t a t e s [ t ] : v o i d 0 ; i f ( ! t | | ! r | | ! W ( t h i s . h a s s , t ) ) r e t u r n f ; l e t i = t . s l i c e ( 0 , t . i n d e x O f ( " . " ) ) , o = ( ) = > i = = = " s c r i p t " ? t h i s . c a l l ( " s c r i p t " , " t u r n _ o n " , { e n t i t y _ i d : t } ) : t h i s . c a l l ( i , " p r e s s " , { e n t i t y _ i d : t } ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - a l l o f f " > < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " ? d i s a b l e d = $ { C ( r ) } t i t l e = $ { t h i s . t ( " r o o m _ c l e a n _ r u n _ h i n t " ) } @ c l i c k = $ { o } > 🧹 $ { t h i s . t ( " r o o m _ c l e a n _ r u n " ) } < / b u t t o n > < / d i v > ` } a l l O f f ( e ) { l e t t = T n ( e . f i l t e r ( r = > W ( t h i s . h a s s , r . e n t i t y _ i d ) ) ) ; f o r ( l e t r o f t . o f f ) t h i s . c a l l ( r . d o m a i n , r . s e r v i c e , r . d a t a ) ; t h i s . _ u n d o = t . u n d o , c l e a r T i m e o u t ( t h i s . u n d o T i m e r ) , t h i s . u n d o T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ u n d o = n u l l , 1 e 4 ) } u n d o A l l O f f ( ) { f o r ( l e t e o f t h i s . _ u n d o ? ? [ ] ) t h i s . c a l l ( e . d o m a i n , e . s e r v i c e , e . d a t a ) ; t h i s . _ u n d o = n u l l , c l e a r T i m e o u t ( t h i s . u n d o T i m e r ) } r e n d e r A l l O f f ( e ) { i f ( t h i s . _ u n d o ) r e t u r n p ` < d i v c l a s s = " n f - r p - a l l o f f " > < s p a n > $ { t h i s . t ( " a l l _ o f f _ d o n e " ) } < / s p a n > < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " @ c l i c k = $ { ( ) = > t h i s . u n d o A l l O f f ( ) } > ↶ $ { t h i s . t ( " a l l _ o f f _ u n d o " ) } < / b u t t o n > < / d i v > ` ; l e t { c o u n t : t } = T n ( e . f i l t e r ( r = > W ( t h i s . h a s s , r . e n t i t y _ i d ) ) ) ; r e t u r n t < 2 ? f : p ` < d i v c l a s s = " n f - r p - a l l o f f " > < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " t i t l e = $ { t h i s . t ( " a l l _ o f f _ h i n t " ) } @ c l i c k = $ { ( ) = > t h i s . a l l O f f ( e ) } > ⏻ $ { t h i s . t ( " a l l _ o f f _ n " , { n : t } ) } < / b u t t o n > < / d i v > ` } g e t a r e a N a m e ( ) { r e t u r n t h i s . r o o m ? . a r e a _ i d ? t h i s . h a s s . a r e a s ? . [ t h i s . r o o m . a r e a _ i d ] ? . n a m e : v o i d 0 } p l a c e d A s ( e ) { f o r ( l e t t o f t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] ) f o r ( l e t r o f t . p l a c e m e n t s ) i f ( r . e n t i t y _ i d = = = e ) r e t u r n r } n a m e ( e ) { r e t u r n t h i s . p l a c e d A s ( e ) ? . n a m e ? . t r i m ( ) | | O ( t h i s . h a s s , e , t h i s . a r e a N a m e ) } n a m e B u t t o n ( e ) { r e t u r n p ` < b u t t o n c l a s s = " n f - r p - n a m e " t i t l e = $ { t h i s . t ( " d e t a i l s " ) } @ c l i c k = $ { ( ) = > S e ( t h i s , e ) } > $ { t h i s . n a m e ( e ) } < / b u t t o n > ` } a s k F o r ( e ) { r e t u r n ! t h i s . c o n f i r m E n t i t i e s ? . h a s ( e ) | | c o n f i r m ( t h i s . t ( " c o n f i r m _ s w i t c h " , { n a m e : t h i s . n a m e ( e ) } ) ) } t o g g l e ( e , t , r ) { l e t i = ( ) = > { t h i s . c o n f i r m E n t i t i e s ? . h a s ( e . e n t i t y _ i d ) & & ! c o n f i r m ( t h i s . t ( " c o n f i r m _ s w i t c h " , { n a m e : t h i s . n a m e ( e . e n t i t y _ i d ) } ) ) | | r ( ) } ; r e t u r n p ` < b u t t o n
class = "nf-switch"
role = "switch"
aria - checked = $ { t ? "true" : "false" }
aria - label = $ { this . name ( e . entity _id ) }
? disabled = $ { C ( e ) }
? disabled = $ { C ( e ) || ! W ( this . hass , e . entity _id ) }
@ click = $ { i }
> < / b u t t o n > ` } o u t s i d e R o o m = n u l l ; r e n d e r ( ) { l e t e = ! t h i s . r o o m & & t h i s . o u t s i d e ? t h i s . o u t s i d e : n u l l ; e & & ! t h i s . o u t s i d e R o o m & & ( t h i s . o u t s i d e R o o m = { i d : " n f - o u t s i d e " , n a m e : t h i s . t ( " o u t s i d e _ a r e a " ) , a r e a _ i d : n u l l , p o i n t s : [ ] , f l o o r _ m a t e r i a l : " g r a s s " } ) ; l e t t = t h i s . r o o m ? ? ( e ? t h i s . o u t s i d e R o o m : n u l l ) ; i f ( ! t | | ! t h i s . h a s s ) r e t u r n f ; l e t r = e ? ? U ( t h i s . h a s s , t ) , i = t h i s . m e m o , { s h o w n : o , m o r e : s } = e ? { s h o w n : e , m o r e : [ ] } : i & & i . e n t i t i e s = = = t h i s . h a s s . e n t i t i e s & & i . f l o o r = = = t h i s . f l o o r & & i . r o o m = = = t ? i : t h i s . m e m o = { e n t i t i e s : t h i s . h a s s . e n t i t i e s , f l o o r : t h i s . f l o o r , r o o m : t , . . . t h i s . f l o o r ? L a ( t h i s . h a s s , t h i s . f l o o r , t ) : { s h o w n : r , m o r e : [ ] } } , a = j i ( t h i s . h a s s , s ) . m a p ( E = > E . p r i m a r y ) , l = a . l e n g t h , c = [ t . f l o o r _ h e a t i n g , . . . O b j e c t . v a l u e s ( t . h v a c ? ? { } ) . f l a t ( ) ] . f i l t e r ( E = > ! ! E & & E ! = = " n o n e " ) , u = n e w S e t ( c . m a p ( E = > t h i s . h a s s . s t a t e s [ E ] ? . a t t r i b u t e s . s y m c o n _ i d ) . f i l t e r ( B o o l e a n ) ) , h = ( t h i s . _ s h o w A l l ? [ . . . o , . . . a ] : o ) . f i l t e r ( E = > ! V ( t h i s . h a s s ) | | ! u . h a s ( t h i s . h a s s . s t a t e s [ E ] ? . a t t r i b u t e s . s y m c o n _ i d ) ) , m = E = > h . f i l t e r ( D = > E . i n c l u d e s ( P ( D ) ) ) . m a p ( D = > t h i s . h a s s . s t a t e s [ D ] ) , d = m ( [ " l i g h t " ] ) , g = m ( [ " c o v e r " ] ) , _ = m ( [ " c l i m a t e " ] ) , b = m ( [ " m e d i a " ] ) , y = m ( [ " s w i t c h " , " f a n " , " l o c k " ] ) , S = m ( [ " s e n s o r " , " b i n a r y " ] ) , k = m ( [ " s c e n e " , " s c r i p t " ] ) , M = t h i s . f a c t s ( _ ) , z = d . f i l t e r ( E = > E . s t a t e = = = " o n " ) ; r e t u r n p ` < s e c t i o n c l a s s = " n f - r p " a r i a - l a b e l = $ { t . n a m e } >
> < / b u t t o n > ` } o u t s i d e R o o m = n u l l ; r e n d e r ( ) { l e t e = ! t h i s . r o o m & & t h i s . o u t s i d e ? t h i s . o u t s i d e : n u l l ; e & & ! t h i s . o u t s i d e R o o m & & ( t h i s . o u t s i d e R o o m = { i d : " n f - o u t s i d e " , n a m e : t h i s . t ( " o u t s i d e _ a r e a " ) , a r e a _ i d : n u l l , p o i n t s : [ ] , f l o o r _ m a t e r i a l : " g r a s s " } ) ; l e t t = t h i s . r o o m ? ? ( e ? t h i s . o u t s i d e R o o m : n u l l ) ; i f ( ! t | | ! t h i s . h a s s ) r e t u r n f ; l e t r = e ? ? j ( t h i s . h a s s , t ) , i = t h i s . m e m o , { s h o w n : o , m o r e : s } = e ? { s h o w n : e , m o r e : [ ] } : i & & i . e n t i t i e s = = = t h i s . h a s s . e n t i t i e s & & i . f l o o r = = = t h i s . f l o o r & & i . r o o m = = = t ? i : t h i s . m e m o = { e n t i t i e s : t h i s . h a s s . e n t i t i e s , f l o o r : t h i s . f l o o r , r o o m : t , . . . t h i s . f l o o r ? V a ( t h i s . h a s s , t h i s . f l o o r , t ) : { s h o w n : r , m o r e : [ ] } } , a = Y i ( t h i s . h a s s , s ) . m a p ( x = > x . p r i m a r y ) , l = a . l e n g t h , c = [ t . f l o o r _ h e a t i n g , . . . O b j e c t . v a l u e s ( t . h v a c ? ? { } ) . f l a t ( ) ] . f i l t e r ( x = > ! ! x & & x ! = = " n o n e " ) , u = n e w S e t ( c . m a p ( x = > t h i s . h a s s . s t a t e s [ x ] ? . a t t r i b u t e s . s y m c o n _ i d ) . f i l t e r ( B o o l e a n ) ) , h = ( t h i s . _ s h o w A l l ? [ . . . o , . . . a ] : o ) . f i l t e r ( x = > ! B ( t h i s . h a s s ) | | ! u . h a s ( t h i s . h a s s . s t a t e s [ x ] ? . a t t r i b u t e s . s y m c o n _ i d ) ) , m = x = > h . f i l t e r ( D = > x . i n c l u d e s ( P ( D ) ) ) . m a p ( D = > t h i s . h a s s . s t a t e s [ D ] ) , d = m ( [ " l i g h t " ] ) , g = m ( [ " c o v e r " ] ) , _ = m ( [ " c l i m a t e " ] ) , b = m ( [ " m e d i a " ] ) , y = m ( [ " s w i t c h " , " f a n " , " l o c k " ] ) , $ = m ( [ " s e n s o r " , " b i n a r y " ] ) , S = m ( [ " s c e n e " , " s c r i p t " ] ) , A = t . s y m c o n _ r e a d _ r o o m = = = ! 1 ? [ ] : t h i s . f a c t s ( _ ) , z = d . f i l t e r ( x = > x . s t a t e = = = " o n " ) ; r e t u r n p ` < s e c t i o n c l a s s = " n f - r p " a r i a - l a b e l = $ { t . n a m e } >
< header class = "nf-rp-head" >
< div >
< h2 > $ { t . name } < / h 2 >
$ { M . length ? p ` <p class="nf-rp-facts"> ${ M . map ( ( E , D ) => p ` ${ D ? " \xB7 " : f } ${ E } ` ) } </p> ` : f } $ { this . renderEnergy ( ) } $ { this . renderSunYear ( ) } $ { this . renderShade ( ) }
$ { A . length ? p ` <p class="nf-rp-facts"> ${ A . map ( ( x , D ) => p ` ${ D ? " \xB7 " : f } ${ x } ` ) } </p> ` : f } $ { this . renderEnergy ( ) } $ { this . renderSunYear ( ) } $ { this . renderShade ( ) }
$ { this . renderOpenWhileHeating ( _ ) } $ { this . renderEmptyLights ( t , z ) }
$ { this . renderCurve ( ) }
< / d i v >
< button class = "nf-rp-close" aria - label = $ { this . t ( this . _folded ? "panel_unfold" : "panel_fold" ) } title = $ { this . t ( this . _folded ? "panel_unfold" : "panel_fold" ) } aria - expanded = $ { this . _folded ? "false" : "true" } @ click = $ { ( ) => this . _folded = ! this . _folded } >
< svg viewBox = "0 0 24 24" width = "18" height = "18" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" stroke - linejoin = "round" > $ { this . _folded ? ne ` <path d="M6 14l6-6 6 6" /> ` : ne ` <path d="M6 12h12" /> ` } < / s v g >
< svg viewBox = "0 0 24 24" width = "18" height = "18" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" stroke - linejoin = "round" > $ { this . _folded ? re ` <path d="M6 14l6-6 6 6" /> ` : re ` <path d="M6 12h12" /> ` } < / s v g >
< / b u t t o n >
< button class = "nf-rp-close" aria - label = $ { this . t ( "close" ) } @ click = $ { ( ) => this . fire ( "close" ) } >
< svg viewBox = "0 0 24 24" width = "18" height = "18" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" > < path d = "M6 6l12 12M18 6L6 18" / > < / s v g >
< / b u t t o n >
< / h e a d e r >
< div class = "nf-rp-body" ? hidden = $ { this . _folded } >
< nf - utility - report . hass = $ { this . hass } . readings = $ { Wt ( this . hass , t , this . building ? . floors . flatMap ( E => E . rooms ) ) } > < / n f - u t i l i t y - r e p o r t >
< nf - utility - report . hass = $ { this . hass } . readings = $ { Vt ( this . hass , t , this . building ? . floors . flatMap ( x => x . rooms ) ) } > < / n f - u t i l i t y - r e p o r t >
$ { this . renderAllOff ( [ ... d , ... b , ... y ] ) }
$ { this . renderClean ( t ) }
$ { ! t . area _id && ! e && ! ( V ( this . hass ) && c . length ) ? p ` <p class="nf-rp-note"> ${ this . t ( "panel_no_area" ) } </p> ` : ! h . length && ! ( V ( this . hass ) && c . length ) ? p ` <p class="nf-rp-note"> ${ this . t ( "panel_empty" ) } </p> ` : f }
$ { k . length ? this . section ( "panel_scenes" , [ p ` <div class="nf-rp-scenes">
$ { k . map ( E => p ` <button
$ { t . symcon _read _room === ! 1 ? p ` <p class="nf-rp-note"> ${ this . t ( h . length ? "access_room_devices" : "access_room_geometry" ) } </p> ` : ! t . area _id && ! e && ! ( B ( this . hass ) && c . length ) ? p ` <p class="nf-rp-note"> ${ this . t ( "panel_no_area" ) } </p> ` : ! h . length && ! ( B ( this . hass ) && c . length ) ? p ` <p class="nf-rp-note"> ${ this . t ( "panel_empty" ) } </p> ` : f }
$ { S . length ? this . section ( "panel_scenes" , [ p ` <div class="nf-rp-scenes">
$ { S . map ( x => p ` <button
class = "nf-btn"
? disabled = $ { C ( E ) }
@ click = $ { ( ) => this . call ( P ( E . entity _id ) === "scene" ? "scene" : "script" , "turn_on" , { entity _id : E . entity _id } ) }
? disabled = $ { C ( x ) }
@ click = $ { ( ) => this . call ( P ( x . entity _id ) === "scene" ? "scene" : "script" , "turn_on" , { entity _id : x . entity _id } ) }
>
$ { this . name ( E . entity _id ) }
$ { this . name ( x . entity _id ) }
< / b u t t o n > ` ) }
< / d i v > ` ] ) : f }
$ { d . length ? this . section ( "panel_lights" , [ ... d . map ( E => this . lightRow ( E ) ) , ... t ? [ this . renderMoods ( t , d ) ] : [ ] ] , p ` ${ z . length < d . length ? p ` <button class="nf-btn nf-rp-small" @click=${ ( ) => this . call ( "light" , "turn_on" , { entity _id : d . filter ( E => ! C ( E ) ) . map ( E => E . entity _id ) } )}>
$ { 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 ` <button class="nf-btn nf-rp-small" ?disabled= ${ ! d . some ( x => W ( this . hass , x . entity _id ) ) } @click= ${ ( ) => this . call ( "light" , "turn_on" , { entity _id : d . filter ( x => ! C ( x ) && W ( this . hass , x . entity _id ) ) . map ( x => x . entity _id ) } )}>
$ { this . t ( "panel_all_on" ) }
< / b u t t o n > ` : f } $ { z . l e n g t h ? p ` < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " @ c l i c k = $ { ( ) = > t h i s . c a l l ( " l i g h t " , " t u r n _ o f f " , { e n t i t y _ i d : z . m a p ( E = > E . e n t i t y _ i d ) } ) } >
< / b u t t o n > ` : f } $ { z . s o m e ( x = > W ( t h i s . h a s s , x . e n t i t y _ i d ) ) ? p ` < b u t t o n c l a s s = " n f - b t n n f - r p - s m a l l " ? d i s a b l e d = $ { ! z . s o m e ( x = > W ( t h i s . h a s s , x . e n t i t y _ i d ) ) } @ c l i c k = $ { ( ) = > t h i s . c a l l ( " l i g h t " , " t u r n _ o f f " , { e n t i t y _ i d : z . f i l t e r ( x = > W ( t h i s . h a s s , x . e n t i t y _ i d ) ) . m a p ( x = > x . e n t i t y _ i d ) } ) } >
$ { this . t ( "panel_all_off" ) }
< / b u t t o n > ` : f } ` ) : f }
$ { g . length ? this . section ( "panel_covers" , g . map ( E => this . coverRow ( E ) ) , g . length > 1 && mr ( g , this . confirmEntities ) . length ? p ` <button class="nf-btn nf-rp-small" @click= ${ ( ) => this . call ( "cover" , "open_cover" , { entity _id : mr ( g , this . confirmEntities ) } )}>
$ { 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 ` <button class="nf-btn nf-rp-small" @click= ${ ( ) => this . call ( "cover" , "open_cover" , { entity _id : fr ( g . filter ( x => W ( this . hass , x . entity _id ) ) , this . confirmEntities ) } )}>
$ { this . t ( "panel_all_open" ) } < / b u t t o n
> < button class = "nf-btn nf-rp-small" @ click = $ { ( ) => this . call ( "cover" , "close_cover" , { entity _id : mr ( g , this . confirmEntities ) } ) } >
> < button class = "nf-btn nf-rp-small" @ click = $ { ( ) => this . call ( "cover" , "close_cover" , { entity _id : fr ( g . filter ( x => W ( this . hass , x . entity _id ) ) , this . confirmEntities ) } ) } >
$ { this . t ( "panel_all_close" ) }
< / b u t t o n > ` : f ) : f }
$ { V ( this . hass ) ? p ` <nf-room-hvac .hass= ${ this . hass } .room= ${ t } ></nf-room-hvac> ` : f }
$ { _ . length ? this . section ( "panel_climate" , _ . map ( E => this . climateRow ( E ) ) ) : f }
$ { b . length ? this . section ( "panel_media" , b . map ( E => this . mediaRow ( E ) ) ) : f }
$ { y . length ? this . section ( "panel_switches" , y . map ( E => this . switchRow ( E ) ) ) : f }
$ { S . length ? this . section ( "panel_sensors" , S . map ( E => this . sensorRow ( E ) ) ) : f }
$ { B ( this . hass ) ? p ` <nf-room-hvac .hass= ${ this . hass } .room= ${ t } ></nf-room-hvac> ` : 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 ) }
$ { ! V ( this . hass ) && pl ( this . hass ) && ml ( this . hass , this . floor , t ) ? this . announceSection ( t ) : f }
$ { ! B ( this . hass ) && bl ( this . hass ) && _l ( this . hass , this . floor , t ) ? this . announceSection ( t ) : f }
$ { this . pluginSections ( t , h ) }
$ { l ? p ` <button class="nf-btn nf-rp-small nf-rp-more" @click= ${ ( ) => this . _showAll = ! this . _showAll } >
$ { this . _showAll ? this . t ( "panel_less" ) : this . t ( "panel_more" , { n : l } ) }
< / b u t t o n > ` : f }
< / d i v >
< / s e c t i o n > ` } e x t r a V a l u e s ( e ) { i f ( ! t h i s . f l o o r ) r e t u r n f ; l e t t = [ . . . t h i s . f l o o r . p l a c e m e n t s . f i l t e r ( r = > ! r . o u t s i d e & & H ( [ r . x , r . z ] , e . p o i n t s ) ) . m a p ( r = > ( { n a m e : r . n a m e | | O ( t h i s . h a s s , r . e n t i t y _ i d ) , r o w s : R r ( t h i s . h a s s , r . v a l u e s ) } ) ) , . . . t h i s . f l o o r . f u r n i t u r e . f i l t e r ( r = > H ( [ r . x , r . z ] , e . p o i n t s ) ) . m a p ( r = > ( { n a m e : r . n a m e | | ( r . e n t i t y & & r . e n t i t y ! = = " n o n e " ? O ( t h i s . h a s s , r . e n t i t y ) : a e ( t h i s . h a s s , r . t y p e ) ) , r o w s : [ . . . j r ( t h i s . h a s s , r ) , . . . R r ( t h i s . h a s s , r . v a l u e s ) ] } ) ) ] . f i l t e r ( r = > r . r o w s . l e n g t h ) ; r e t u r n t . l e n g t h ? t h i s . s e c t i o n ( " d e v i c e _ v a l u e s " , t . m a p ( r = > p ` < d i v c l a s s = " n f - e x t r a - v a l u e s " > < b > $ { r . n a m e } < / b > $ { r . r o w s . m a p ( i = > p ` < d i v c l a s s = " n f - r p - r o w " > < s p a n c l a s s = " n f - r p - i c o n " > $ { i . i c o n } < / s p a n > < s p a n c l a s s = " n f - r p - n a m e " > $ { i . l a b e l } < / s p a n > < b c l a s s = " n f - r p - s t a t e " > $ { i . t e x t } $ { G ( t h i s . h a s s , [ i . e n t i t y ] , i . l a b e l ) } < / b > < / d i v > ` ) } < / d i v > ` ) ) : f } f a c t s ( e ) { l e t t = [ ] , r = t h i s . r o o m ; i f ( ! r ) r e t u r n t ; l e t i = ( T , R ) = > { l e t A = Z ( t h i s . h a s s , t h i s . f l o o r , r , T ) ; i f ( A = = = n u l l ) r e t u r n n u l l ; i f ( T = = = " t e m p e r a t u r e " ) r e t u r n ` $ { L ( t h i s . h a s s , c e ( t h i s . h a s s , A ) , 1 ) } $ { r e ( t h i s . h a s s ) } ` ; l e t I = b e ( t h i s . h a s s , t h i s . f l o o r , r , T ) [ 0 ] , N = t h i s . h a s s . s t a t e s [ I ] ? . a t t r i b u t e s . u n i t _ o f _ m e a s u r e m e n t ? ? R ; r e t u r n ` $ { L ( t h i s . h a s s , A , 1 ) } $ { N } ` } , o = e . f i n d ( T = > t y p e o f T . a t t r i b u t e s . c u r r e n t _ t e m p e r a t u r e = = " n u m b e r " ) , s = i ( " t e m p e r a t u r e " , " \ x B 0 C " ) ; s ? t . p u s h ( p ` $ { s } $ { G ( t h i s . h a s s , b e ( t h i s . h a s s , t h i s . f l o o r , r , " t e m p e r a t u r e " ) , " T e m p e r a t u r " ) } ` ) : o & & r . c l i m a t e ? . t e m p e r a t u r e ! = = " n o n e " & & t . p u s h ( p ` $ { L ( t h i s . h a s s , o . a t t r i b u t e s . c u r r e n t _ t e m p e r a t u r e , 1 ) } $ { r e ( t h i s . h a s s ) } $ { G ( t h i s . h a s s , [ o . e n t i t y _ i d ] , " T e m p e r a t u r " ) } ` ) ; l e t a = i ( " h u m i d i t y " , " % " ) ; a & & t . p u s h ( p ` $ { a } $ { G ( t h i s . h a s s , b e ( t h i s . h a s s , t h i s . f l o o r , r , " h u m i d i t y " ) , " L u f t f e u c h t e " ) } ` ) ; l e t l = Z ( t h i s . h a s s , t h i s . f l o o r ? ? n u l l , r , " i l l u m i n a n c e " ) ; l ! = = n u l l & & t . p u s h ( p ` ☀ $ { L ( t h i s . h a s s , l , 0 ) } l x $ { G ( t h i s . h a s s , b e ( t h i s . h a s s , t h i s . f l o o r , r , " i l l u m i n a n c e " ) , " H e l l i g k e i t " ) } ` ) ; l e t c = W t ( t h i s . h a s s , r , t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( T = > T . r o o m s ) ) . f i n d ( T = > T . k i n d = = = " e l e c t r i c i t y " & & T . m e t r i c = = = " p o w e r " & & T . u n i t = = = " W " ) , u = ! c & & t h i s . f l o o r & & t h i s . b u i l d i n g ? k o ( t h i s . h a s s , t h i s . b u i l d i n g , t h i s . f l o o r , r ) : n u l l ; c ? t . p u s h ( p ` ⚡ $ { N e ( t h i s . h a s s , c ) } $ { G ( t h i s . h a s s , c . s o u r c e s , " L e i s t u n g " ) } ` ) : u ! = = n u l l & & t . p u s h ( ` \ u 2 6 A 1 $ { w t ( t h i s . h a s s , u ) } ` ) ; l e t h = t h i s . f l o o r ? t h i s . f l o o r . o p e n i n g s . f i l t e r ( T = > T . r o o m _ i d = = = r . i d ) . f l a t M a p ( T = > [ T . c o n t a c t , T . c o n t a c t 2 , T . t i l t , T . t i l t 2 ] ) . m a p ( T = > T & & T ! = = " n o n e " ? t h i s . h a s s . s t a t e s [ T ] : v o i d 0 ) . f i l t e r ( T = > T ? . s t a t e = = = " o n " ) . m a p ( T = > D a t e . p a r s e ( S t r i n g ( T . l a s t _ c h a n g e d ? ? " " ) ) ) . f i l t e r ( N u m b e r . i s F i n i t e ) : [ ] ; h . l e n g t h & & t . p u s h ( ` \ u { 1 F A 9 F } $ { t h i s . t ( " o p e n _ s i n c e " , { t i m e : $ o ( D a t e . n o w ( ) - M a t h . m i n ( . . . h ) ) } ) } ` ) ; l e t m = U ( t h i s . h a s s , r ) . m a p ( T = > t h i s . h a s s . s t a t e s [ T ] ) . f i l t e r ( T = > ! ! T & & T . e n t i t y _ i d . s t a r t s W i t h ( " b i n a r y _ s e n s o r . " ) & & [ " m o t i o n " , " o c c u p a n c y " , " p r e s e n c e " ] . i n c l u d e s ( S t r i n g ( T . a t t r i b u t e s . d e v i c e _ c l a s s ) ) ) ; i f ( m . l e n g t h ) i f ( m . s o m e ( T = > T . s t a t e = = = " o n " ) ) t . p u s h ( ` \ u { 1 F 6 B 6 } $ { t h i s . t ( " p r e s e n c e _ n o w " ) } ` ) ; e l s e { l e t T = M a t h . m a x ( . . . m . m a p ( R = > D a t e . p a r s e ( S t r i n g ( R . l a s t _ c h a n g e d ? ? " " ) ) | | 0 ) ) ; T > 0 & & t . p u s h ( ` \ u { 1 F 6 B 6 } $ { t h i s . t ( " p r e s e n c e _ l a s t " , { t i m e : $ o ( D a t e . n o w ( ) - T ) } ) } ` ) } l e t d = t h i s . b u i l d i n g ? a c ( t h i s . h a s s , t h i s . b u i l d i n g ) . f i l t e r ( T = > T . r o o m I d = = = r . i d & & T . l e v e l < s c ) : [ ] ; d . l e n g t h & & t . p u s h ( ` \ u { 1 F A A B } $ { t h i s . t ( " b a t t e r y _ l o w _ n " , { n : d . l e n g t h , n a m e s : d . m a p ( T = > ` $ { t h i s . n a m e ( T . e n t i t y ) } $ { M a t h . r o u n d ( T . l e v e l ) } % ` ) . j o i n ( " , " ) } ) } ` ) ; l e t g = ( t h i s . b u i l d i n g ? . s e t t i n g s . c i r c u i t s ? ? [ ] ) . f i l t e r ( T = > T . r o o m s . i n c l u d e s ( r . i d ) ) . m a p ( T = > T . n a m e ) , _ = t h i s . b u i l d i n g ? . s e t t i n g s . r o o m _ f a c t s _ o f f ? ? [ ] ; g . l e n g t h & & ! _ . i n c l u d e s ( " c i r c u i t s " ) & & t . p u s h ( ` \ u { 1 F 5 0 C } $ { g . j o i n ( " , " ) } ` ) ; l e t { l a t i t u d e : b , l o n g i t u d e : y , t i m e _ z o n e : S } = t h i s . h a s s . c o n f i g ? ? { } ; i f ( t h i s . f l o o r & & b ! = = v o i d 0 & & y ! = = v o i d 0 & & t h i s . b u i l d i n g & & ! _ . i n c l u d e s ( " s u n " ) ) { l e t T = K t ( t h i s . b u i l d i n g , t h i s . f l o o r , r , { l a t i t u d e : b , l o n g i t u d e : y , z o n e : S } ) ; T . f a c i n g . l e n g t h & & t . p u s h ( ` \ u 2 6 0 0 $ { t h i s . t ( " r o o m _ s u n _ h o u r s " , { h : L ( t h i s . h a s s , T . h o u r s , 1 ) , f a c i n g : T . f a c i n g . j o i n ( " , " ) } ) } ` ) } l e t k = Z ( t h i s . h a s s , t h i s . f l o o r , r , " t e m p e r a t u r e " ) , M = Z ( t h i s . h a s s , t h i s . f l o o r , r , " h u m i d i t y " ) , z = B r ( Z ( t h i s . h a s s , t h i s . f l o o r , r , " c o 2 " ) , M , G t ( k , M ) ) ; z & & ! _ . i n c l u d e s ( " a i r " ) & & t . p u s h ( ` \ u { 1 F 4 A 8 } $ { t h i s . t ( ` a i r _ $ { z } ` ) } ` ) ; l e t E = V r ( k , M , Z ( t h i s . h a s s , t h i s . f l o o r , r , " c o 2 " ) , v t ( n e w D a t e , t h i s . h a s s . c o n f i g ? . l a t i t u d e ) ) , D = r . h v a c ? . s t a t u s ; r e t u r n D & & D ! = = " n o n e " ? t . p u s h ( p ` $ { D e ( t h i s . h a s s . s t a t e s [ D ] ) } $ { G ( t h i s . h a s s , [ D ] , " R a u m s t a t u s " ) } ` ) : E ! = = n u l l & & ( k ! = = n u l l | | M ! = = n u l l ) & & ! _ . i n c l u d e s ( " c o m f o r t " ) & & t . p u s h ( ` \ u { 1 F 6 0 A } $ { t h i s . t ( " c o m f o r t _ n " , { n : E } ) } ` ) , t } a n n o u n c e S e c t i o n ( e ) { l e t t = t h i s . p h r a s e s ? . l e n g t h ? t h i s . p h r a s e s : [ 1 , 2 , 3 , 4 , 5 ] . m a p ( o = > t h i s . t ( ` a n n o u n c e _ p h r a s e _ $ { o } ` ) ) , r = o = > { l e t s = o . t r i m ( ) ; s & & ( c l e a r T i m e o u t ( t h i s . s a i d T i m e r ) , t h i s . h a s s . c a l l S e r v i c e ( " n e x t f l o o r " , " a n n o u n c e " , { m e s s a g e : s , r o o m s : [ e . i d ] , o n _ s c r e e n s : ! 1 } ) . t h e n ( ( ) = > t h i s . _ s a i d = { t e x t : t h i s . t ( " a n n o u n c e _ s e n t " , { m e s s a g e : s } ) , f a i l e d : ! 1 } , a = > t h i s . _ s a i d = { t e x t : t h i s . t ( " a n n o u n c e _ f a i l e d " , { e r r o r : a ? . m e s s a g e ? ? S t r i n g ( a ) } ) , f a i l e d : ! 0 } ) , t h i s . s a i d T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ s a i d = n u l l , 6 e 3 ) ) } , i = o = > { o . p r e v e n t D e f a u l t ( ) ; l e t s = o . c u r r e n t T a r g e t . q u e r y S e l e c t o r ( " i n p u t " ) ; r ( s . v a l u e ) , s . v a l u e = " " } ; r e t u r n t h i s . s e c t i o n ( " p a n e l _ a n n o u n c e " , [ p ` < d i v c l a s s = " n f - r p - s c e n e s " > $ { t . m a p ( o = > p ` < b u t t o n c l a s s = " n f - b t n " @ c l i c k = $ { ( ) = > r ( o ) } > $ { o } < / b u t t o n > ` ) } < / d i v >
< / s e c t i o n > ` } e x t r a V a l u e s ( e ) { i f ( ! t h i s . f l o o r ) r e t u r n f ; l e t t = [ . . . t h i s . f l o o r . p l a c e m e n t s . f i l t e r ( r = > ! r . o u t s i d e & & H ( [ r . x , r . z ] , e . p o i n t s ) ) . m a p ( r = > ( { n a m e : r . n a m e | | O ( t h i s . h a s s , r . e n t i t y _ i d ) , r o w s : z r ( t h i s . h a s s , r . v a l u e s ) } ) ) , . . . t h i s . f l o o r . f u r n i t u r e . f i l t e r ( r = > H ( [ r . x , r . z ] , e . p o i n t s ) ) . m a p ( r = > ( { n a m e : r . n a m e | | ( r . e n t i t y & & r . e n t i t y ! = = " n o n e " ? O ( t h i s . h a s s , r . e n t i t y ) : l e ( t h i s . h a s s , r . t y p e ) ) , r o w s : [ . . . Z r ( t h i s . h a s s , r ) , . . . z r ( t h i s . h a s s , r . v a l u e s ) ] } ) ) ] . f i l t e r ( r = > r . r o w s . l e n g t h ) ; r e t u r n t . l e n g t h ? t h i s . s e c t i o n ( " d e v i c e _ v a l u e s " , t . m a p ( r = > p ` < d i v c l a s s = " n f - e x t r a - v a l u e s " > < b > $ { r . n a m e } < / b > $ { r . r o w s . m a p ( i = > p ` < d i v c l a s s = " n f - r p - r o w " > < s p a n c l a s s = " n f - r p - i c o n " > $ { i . i c o n } < / s p a n > < s p a n c l a s s = " n f - r p - n a m e " > $ { i . l a b e l } < / s p a n > < b c l a s s = " n f - r p - s t a t e " > $ { i . t e x t } $ { U ( t h i s . h a s s , [ i . e n t i t y ] , i . l a b e l ) } < / b > < / d i v > ` ) } < / d i v > ` ) ) : f } f a c t s ( e ) { l e t t = [ ] , r = t h i s . r o o m ; i f ( ! r ) r e t u r n t ; l e t i = ( T , R ) = > { l e t E = Y ( t h i s . h a s s , t h i s . f l o o r , r , T ) ; i f ( E = = = n u l l ) r e t u r n n u l l ; i f ( T = = = " t e m p e r a t u r e " ) r e t u r n ` $ { L ( t h i s . h a s s , u e ( t h i s . h a s s , E ) , 1 ) } $ { i e ( t h i s . h a s s ) } ` ; l e t I = y e ( t h i s . h a s s , t h i s . f l o o r , r , T ) [ 0 ] , N = t h i s . h a s s . s t a t e s [ I ] ? . a t t r i b u t e s . u n i t _ o f _ m e a s u r e m e n t ? ? R ; r e t u r n ` $ { L ( t h i s . h a s s , E , 1 ) } $ { N } ` } , o = e . f i n d ( T = > t y p e o f T . a t t r i b u t e s . c u r r e n t _ t e m p e r a t u r e = = " n u m b e r " ) , s = i ( " t e m p e r a t u r e " , " \ x B 0 C " ) ; s ? t . p u s h ( p ` $ { s } $ { U ( t h i s . h a s s , y e ( t h i s . h a s s , t h i s . f l o o r , r , " t e m p e r a t u r e " ) , " T e m p e r a t u r " ) } ` ) : o & & r . c l i m a t e ? . t e m p e r a t u r e ! = = " n o n e " & & t . p u s h ( p ` $ { L ( t h i s . h a s s , o . a t t r i b u t e s . c u r r e n t _ t e m p e r a t u r e , 1 ) } $ { i e ( t h i s . h a s s ) } $ { U ( t h i s . h a s s , [ o . e n t i t y _ i d ] , " T e m p e r a t u r " ) } ` ) ; l e t a = i ( " h u m i d i t y " , " % " ) ; a & & t . p u s h ( p ` $ { a } $ { U ( t h i s . h a s s , y e ( t h i s . h a s s , t h i s . f l o o r , r , " h u m i d i t y " ) , " L u f t f e u c h t e " ) } ` ) ; l e t l = Y ( t h i s . h a s s , t h i s . f l o o r ? ? n u l l , r , " i l l u m i n a n c e " ) ; l ! = = n u l l & & t . p u s h ( p ` ☀ $ { L ( t h i s . h a s s , l , 0 ) } l x $ { U ( t h i s . h a s s , y e ( t h i s . h a s s , t h i s . f l o o r , r , " i l l u m i n a n c e " ) , " H e l l i g k e i t " ) } ` ) ; l e t c = V t ( t h i s . h a s s , r , t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( T = > T . r o o m s ) ) . f i n d ( T = > T . k i n d = = = " e l e c t r i c i t y " & & T . m e t r i c = = = " p o w e r " & & T . u n i t = = = " W " ) , u = ! c & & t h i s . f l o o r & & t h i s . b u i l d i n g ? M o ( t h i s . h a s s , t h i s . b u i l d i n g , t h i s . f l o o r , r ) : n u l l ; c ? t . p u s h ( p ` ⚡ $ { L e ( t h i s . h a s s , c ) } $ { U ( t h i s . h a s s , c . s o u r c e s , " L e i s t u n g " ) } ` ) : u ! = = n u l l & & t . p u s h ( ` \ u 2 6 A 1 $ { x t ( t h i s . h a s s , u ) } ` ) ; l e t h = t h i s . f l o o r ? t h i s . f l o o r . o p e n i n g s . f i l t e r ( T = > T . r o o m _ i d = = = r . i d ) . f l a t M a p ( T = > [ T . c o n t a c t , T . c o n t a c t 2 , T . t i l t , T . t i l t 2 ] ) . m a p ( T = > T & & T ! = = " n o n e " ? t h i s . h a s s . s t a t e s [ T ] : v o i d 0 ) . f i l t e r ( T = > T ? . s t a t e = = = " o n " ) . m a p ( T = > D a t e . p a r s e ( S t r i n g ( T . l a s t _ c h a n g e d ? ? " " ) ) ) . f i l t e r ( N u m b e r . i s F i n i t e ) : [ ] ; h . l e n g t h & & t . p u s h ( ` \ u { 1 F A 9 F } $ { t h i s . t ( " o p e n _ s i n c e " , { t i m e : E o ( D a t e . n o w ( ) - M a t h . m i n ( . . . h ) ) } ) } ` ) ; l e t m = j ( t h i s . h a s s , r ) . m a p ( T = > t h i s . h a s s . s t a t e s [ T ] ) . f i l t e r ( T = > ! ! T & & T . e n t i t y _ i d . s t a r t s W i t h ( " b i n a r y _ s e n s o r . " ) & & [ " m o t i o n " , " o c c u p a n c y " , " p r e s e n c e " ] . i n c l u d e s ( S t r i n g ( T . a t t r i b u t e s . d e v i c e _ c l a s s ) ) ) ; i f ( m . l e n g t h ) i f ( m . s o m e ( T = > T . s t a t e = = = " o n " ) ) t . p u s h ( ` \ u { 1 F 6 B 6 } $ { t h i s . t ( " p r e s e n c e _ n o w " ) } ` ) ; e l s e { l e t T = M a t h . m a x ( . . . m . m a p ( R = > D a t e . p a r s e ( S t r i n g ( R . l a s t _ c h a n g e d ? ? " " ) ) | | 0 ) ) ; T > 0 & & t . p u s h ( ` \ u { 1 F 6 B 6 } $ { t h i s . t ( " p r e s e n c e _ l a s t " , { t i m e : E o ( D a t e . n o w ( ) - T ) } ) } ` ) } l e t d = t h i s . b u i l d i n g ? u c ( t h i s . h a s s , t h i s . b u i l d i n g ) . f i l t e r ( T = > T . r o o m I d = = = r . i d & & T . l e v e l < c c ) : [ ] ; d . l e n g t h & & t . p u s h ( ` \ u { 1 F A A B } $ { t h i s . t ( " b a t t e r y _ l o w _ n " , { n : d . l e n g t h , n a m e s : d . m a p ( T = > ` $ { t h i s . n a m e ( T . e n t i t y ) } $ { M a t h . r o u n d ( T . l e v e l ) } % ` ) . j o i n ( " , " ) } ) } ` ) ; l e t g = ( t h i s . b u i l d i n g ? . s e t t i n g s . c i r c u i t s ? ? [ ] ) . f i l t e r ( T = > T . r o o m s . i n c l u d e s ( r . i d ) ) . m a p ( T = > T . n a m e ) , _ = t h i s . b u i l d i n g ? . s e t t i n g s . r o o m _ f a c t s _ o f f ? ? [ ] ; g . l e n g t h & & ! _ . i n c l u d e s ( " c i r c u i t s " ) & & t . p u s h ( ` \ u { 1 F 5 0 C } $ { g . j o i n ( " , " ) } ` ) ; l e t { l a t i t u d e : b , l o n g i t u d e : y , t i m e _ z o n e : $ } = t h i s . h a s s . c o n f i g ? ? { } ; i f ( t h i s . f l o o r & & b ! = = v o i d 0 & & y ! = = v o i d 0 & & t h i s . b u i l d i n g & & ! _ . i n c l u d e s ( " s u n " ) ) { l e t T = U t ( t h i s . b u i l d i n g , t h i s . f l o o r , r , { l a t i t u d e : b , l o n g i t u d e : y , z o n e : $ } ) ; T . f a c i n g . l e n g t h & & t . p u s h ( ` \ u 2 6 0 0 $ { t h i s . t ( " r o o m _ s u n _ h o u r s " , { h : L ( t h i s . h a s s , T . h o u r s , 1 ) , f a c i n g : T . f a c i n g . j o i n ( " , " ) } ) } ` ) } l e t S = Y ( t h i s . h a s s , t h i s . f l o o r , r , " t e m p e r a t u r e " ) , A = Y ( t h i s . h a s s , t h i s . f l o o r , r , " h u m i d i t y " ) , z = K r ( Y ( t h i s . h a s s , t h i s . f l o o r , r , " c o 2 " ) , A , j t ( S , A ) ) ; z & & ! _ . i n c l u d e s ( " a i r " ) & & t . p u s h ( ` \ u { 1 F 4 A 8 } $ { t h i s . t ( ` a i r _ $ { z } ` ) } ` ) ; l e t x = G r ( S , A , Y ( t h i s . h a s s , t h i s . f l o o r , r , " c o 2 " ) , w t ( n e w D a t e , t h i s . h a s s . c o n f i g ? . l a t i t u d e ) ) , D = r . h v a c ? . s t a t u s ; r e t u r n D & & D ! = = " n o n e " ? t . p u s h ( p ` $ { D e ( t h i s . h a s s . s t a t e s [ D ] ) } $ { U ( t h i s . h a s s , [ D ] , " R a u m s t a t u s " ) } ` ) : x ! = = n u l l & & ( S ! = = n u l l | | A ! = = n u l l ) & & ! _ . i n c l u d e s ( " c o m f o r t " ) & & t . p u s h ( ` \ u { 1 F 6 0 A } $ { t h i s . t ( " c o m f o r t _ n " , { n : x } ) } ` ) , t } a n n o u n c e S e c t i o n ( e ) { l e t t = t h i s . p h r a s e s ? . l e n g t h ? t h i s . p h r a s e s : [ 1 , 2 , 3 , 4 , 5 ] . m a p ( o = > t h i s . t ( ` a n n o u n c e _ p h r a s e _ $ { o } ` ) ) , r = o = > { l e t s = o . t r i m ( ) ; s & & ( c l e a r T i m e o u t ( t h i s . s a i d T i m e r ) , t h i s . h a s s . c a l l S e r v i c e ( " n e x t f l o o r " , " a n n o u n c e " , { m e s s a g e : s , r o o m s : [ e . i d ] , o n _ s c r e e n s : ! 1 } ) . t h e n ( ( ) = > t h i s . _ s a i d = { t e x t : t h i s . t ( " a n n o u n c e _ s e n t " , { m e s s a g e : s } ) , f a i l e d : ! 1 } , a = > t h i s . _ s a i d = { t e x t : t h i s . t ( " a n n o u n c e _ f a i l e d " , { e r r o r : a ? . m e s s a g e ? ? S t r i n g ( a ) } ) , f a i l e d : ! 0 } ) , t h i s . s a i d T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ s a i d = n u l l , 6 e 3 ) ) } , i = o = > { o . p r e v e n t D e f a u l t ( ) ; l e t s = o . c u r r e n t T a r g e t . q u e r y S e l e c t o r ( " i n p u t " ) ; r ( s . v a l u e ) , s . v a l u e = " " } ; r e t u r n t h i s . s e c t i o n ( " p a n e l _ a n n o u n c e " , [ p ` < d i v c l a s s = " n f - r p - s c e n e s " > $ { t . m a p ( o = > p ` < b u t t o n c l a s s = " n f - b t n " @ c l i c k = $ { ( ) = > r ( o ) } > $ { o } < / b u t t o n > ` ) } < / d i v >
< form class = "nf-rp-say" @ submit = $ { i } >
< input type = "text" maxlength = "500" placeholder = $ { this . t ( "announce_placeholder" ) } aria - label = $ { this . t ( "announce_placeholder" ) } / >
< button class = "nf-btn nf-primary" type = "submit" > $ { this . t ( "announce_send" ) } < / b u t t o n >
< / f o r m >
$ { this . _said ? p ` <p class="nf-rp-note ${ this . _said . failed ? "nf-rp-fail" : "" } " role="status"> ${ this . _said . text } </p> ` : f } ` ])}pluginSections(e,t){return Y s({hass:this.hass,room:{id:e.id,name:e.name,area_id:e.area_id??null},entities:t}).map(i=>p ` < div class = "nf-rp-sec nf-rp-plugin" data - plugin = $ { i . key } >
$ { this . _said ? p ` <p class="nf-rp-note ${ this . _said . failed ? "nf-rp-fail" : "" } " role="status"> ${ this . _said . text } </p> ` : f } ` ])}pluginSections(e,t){return X s({hass:this.hass,room:{id:e.id,name:e.name,area_id:e.area_id??null},entities:t}).map(i=>p ` < div class = "nf-rp-sec nf-rp-plugin" data - plugin = $ { i . key } >
< div class = "nf-rp-sec-head" > < h3 > $ { i . title } < / h 3 > < / d i v >
$ { typeof i . content == "string" ? p ` <p class="nf-rp-note"> ${ i . content } </p> ` : i . content }
< / d i v > ` ) } s e c t i o n ( e , t , r = f ) { r e t u r n p ` < d i v c l a s s = " n f - r p - s e c " >
< div class = "nf-rp-sec-head" > < h3 > $ { this . t ( e ) } < / h 3 > $ { r } < / d i v >
$ { t }
< / d i v > ` } l i g h t R o w ( e ) { l e t t = e . a t t r i b u t e s , r = e . s t a t e = = = " o n " , i = t . s u p p o r t e d _ c o l o r _ m o d e s ? ? [ ] , o = i . s o m e ( d = > d ! = = " o n o f f " ) , s = i . i n c l u d e s ( " c o l o r _ t e m p " ) , a = i . s o m e ( d = > [ " h s " , " r g b " , " r g b w " , " r g b w w " , " x y " ] . i n c l u d e s ( d ) ) , l = t y p e o f t . b r i g h t n e s s = = " n u m b e r " ? M a t h . r o u n d ( t . b r i g h t n e s s / 2 5 5 * 1 0 0 ) : 1 0 0 , c = t . m i n _ c o l o r _ t e m p _ k e l v i n ? ? 2 2 0 0 , u = t . m a x _ c o l o r _ t e m p _ k e l v i n ? ? 6 5 0 0 , h = e . e n t i t y _ i d , m = ! ! t h i s . p l a c e d A s ( h ) ? . s i m p l e ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon ${r?" nf - rp - on ":" "}" > $ { qt ( "light" ) } < / s p a n >
< span class = "nf-rp-icon ${r?" nf - rp - on ":" "}" > $ { Yt ( "light" ) } < / s p a n >
$ { this . nameButton ( h ) }
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { G ( this . hass , [ e . entity _id ] ) } < / s p a n >
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { U ( this . hass , [ e . entity _id ] ) } < / s p a n >
$ { this . toggle ( e , r , ( ) => this . call ( "light" , "toggle" , { entity _id : h } ) ) }
$ { o && ! m ? p ` <label class="nf-rp-slider"
> < span > $ { this . t ( "brightness" ) } < / s p a n >
@@ -384,23 +384,23 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
@ change = $ { d => this . call ( "light" , "turn_on" , { entity _id : h , color _temp _kelvin : Number ( d . target . value ) } ) }
/ > < / l a b e l > ` : f }
$ { r && a && ! m ? p ` <div class="nf-rp-swatches" role="group" aria-label= ${ this . t ( "color" ) } >
$ { fp . map ( d => p ` <button
$ { bp . map ( d => p ` <button
class = "nf-rp-swatch"
style = "--c: rgb(${d.join(" , ")})"
aria - label = "rgb(${d.join(" , ")})"
@ click = $ { ( ) => this . call ( "light" , "turn_on" , { entity _id : h , rgb _color : d } ) }
> < / b u t t o n > ` ) }
< / d i v > ` : f }
< / d i v > ` } c o v e r R o w ( e ) { l e t t = k r ( t h i s . h a s s , t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] , e . e n t i t y _ i d ) ; e = S r ( t h i s . h a s s , e , t ) ; l e t r = e . a t t r i b u t e s , i = r . s u p p o r t e d _ f e a t u r e s ? ? 0 , o = e . e n t i t y _ i d , s = C ( e ) & & ! p n ( e ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon" > $ { qt ( "cover" ) } < / s p a n >
< / d i v > ` } c o v e r R o w ( e ) { l e t t = $ r ( t h i s . h a s s , t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] , e . e n t i t y _ i d ) ; e = M r ( t h i s . h a s s , e , t ) ; l e t r = e . a t t r i b u t e s , i = r . s u p p o r t e d _ f e a t u r e s ? ? 0 , o = e . e n t i t y _ i d , s = C ( e ) & & ! g n ( e ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon" > $ { Yt ( "cover" ) } < / s p a n >
$ { this . nameButton ( o ) }
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { G ( this . hass , [ e . entity _id ] ) } < / s p a n >
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { U ( this . hass , [ e . entity _id ] ) } < / s p a n >
< div class = "nf-rp-buttons" >
< button class = "nf-btn nf-rp-small" ? disabled = $ { s } @ click = $ { ( ) => this . askFor ( o ) && this . call ( "cover" , "open_cover" , { entity _id : o } ) } > $ { this . t ( "cover_open" ) } < / b u t t o n >
$ { i & pp ? p ` <button class="nf-btn nf-rp-small" ?disabled= ${ s } @click= ${ ( ) => this . call ( "cover" , "stop_cover" , { entity _id : o } )}> ${ this . t ( "cover_stop" ) } </button> ` : f }
$ { i & _p ? p ` <button class="nf-btn nf-rp-small" ?disabled= ${ s } @click= ${ ( ) => this . call ( "cover" , "stop_cover" , { entity _id : o } )}> ${ this . t ( "cover_stop" ) } </button> ` : f }
< button class = "nf-btn nf-rp-small" ? disabled = $ { s } @ click = $ { ( ) => this . askFor ( o ) && this . call ( "cover" , "close_cover" , { entity _id : o } ) } > $ { this . t ( "cover_close" ) } < / b u t t o n >
< / d i v >
$ { i & mp && typeof r . current _position == "number" ? p ` <label class="nf-rp-slider"
$ { i & gp && typeof r . current _position == "number" ? p ` <label class="nf-rp-slider"
> < span > $ { this . t ( "position" ) } < / s p a n >
< input
type = "range"
@@ -424,12 +424,12 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
$ { i & 32 ? p ` <button class="nf-btn nf-rp-small" ?disabled= ${ s } @click= ${ ( ) => this . call ( "cover" , "close_cover_tilt" , { entity _id : o } )}> ${ this . t ( "cover_tilt_close" ) } </button> ` : f }
< / d i v > ` : f }
< / d i v > ` } c l i m a t e R o w ( e ) { l e t t = e . a t t r i b u t e s , r = e . e n t i t y _ i d , i = t y p e o f t . t e m p e r a t u r e = = " n u m b e r " ? t . t e m p e r a t u r e : n u l l , o = t . t a r g e t _ t e m p _ s t e p ? ? . 5 , s = t . m i n _ t e m p ? ? 5 , a = t . m a x _ t e m p ? ? 3 0 , l = t . h v a c _ m o d e s ? ? [ ] , c = u = > t h i s . c a l l ( " c l i m a t e " , " s e t _ t e m p e r a t u r e " , { e n t i t y _ i d : r , t e m p e r a t u r e : M a t h . m i n ( a , M a t h . m a x ( s , M a t h . r o u n d ( u / o ) * o ) ) } ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon ${t.hvac_action===" heating "?" nf - rp - on ":" "}" > $ { qt ( "climate" ) } < / s p a n >
< span class = "nf-rp-icon ${t.hvac_action===" heating "?" nf - rp - on ":" "}" > $ { Yt ( "climate" ) } < / s p a n >
$ { this . nameButton ( r ) }
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { G ( this . hass , [ e . entity _id ] ) } < / s p a n >
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { U ( this . hass , [ e . entity _id ] ) } < / s p a n >
$ { i !== null ? p ` <div class="nf-rp-stepper nf-rp-wide">
< button class = "nf-btn" aria - label = $ { this . t ( "temp_down" ) } @ click = $ { ( ) => c ( i - o ) } > − < / b u t t o n >
< span > < small > $ { this . t ( "target_temp" ) } < / s m a l l > $ { L ( t h i s . h a s s , i , 1 ) } $ { r e ( t h i s . h a s s ) } < / s p a n >
< span > < small > $ { this . t ( "target_temp" ) } < / s m a l l > $ { L ( t h i s . h a s s , i , 1 ) } $ { i e ( t h i s . h a s s ) } < / s p a n >
< button class = "nf-btn" aria - label = $ { this . t ( "temp_up" ) } @ click = $ { ( ) => c ( i + o ) } > + < / b u t t o n >
< / d i v > ` : f }
$ { l . length > 1 ? p ` <div class="nf-rp-chips">
@@ -441,20 +441,20 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
$ { this . stateLabel ( u ) }
< / b u t t o n > ` ) }
< / d i v > ` : f }
< / d i v > ` } s t a t e O f ( e , t = s e ( t h i s . h a s s , e ) ) { i f ( t h i s . r o o m ? . n o _ s t a t e ? . i n c l u d e s ( e . e n t i t y _ i d ) ) r e t u r n " " ; l e t r = P ( e . e n t i t y _ i d ) ; r e t u r n e . s t a t e = = = " u n k n o w n " & & r ! = = " s e n s o r " & & r ! = = " b i n a r y " ? " " : t } s t a t e L a b e l ( e ) { l e t t = ` s t a t e _ $ { e } ` , r = t h i s . t ( t ) ; r e t u r n r = = = t ? e : r } m e d i a R o w ( e ) { l e t t = e . a t t r i b u t e s , r = e . e n t i t y _ i d , i = C ( e ) | | e . s t a t e = = = " o f f " , o = [ t . m e d i a _ t i t l e , t . m e d i a _ a r t i s t ] . f i l t e r ( s = > t y p e o f s = = " s t r i n g " & & s ) . j o i n ( " \ x B 7 " ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon ${e.state===" playing "?" nf - rp - on ":" "}" > $ { qt ( "media" ) } < / s p a n >
< / d i v > ` } s t a t e O f ( e , t = a e ( t h i s . h a s s , e ) ) { i f ( t h i s . r o o m ? . n o _ s t a t e ? . i n c l u d e s ( e . e n t i t y _ i d ) ) r e t u r n " " ; l e t r = P ( e . e n t i t y _ i d ) ; r e t u r n e . s t a t e = = = " u n k n o w n " & & r ! = = " s e n s o r " & & r ! = = " b i n a r y " ? " " : t } s t a t e L a b e l ( e ) { l e t t = ` s t a t e _ $ { e } ` , r = t h i s . t ( t ) ; r e t u r n r = = = t ? e : r } m e d i a R o w ( e ) { l e t t = e . a t t r i b u t e s , r = e . e n t i t y _ i d , i = C ( e ) | | e . s t a t e = = = " o f f " , o = [ t . m e d i a _ t i t l e , t . m e d i a _ a r t i s t ] . f i l t e r ( s = > t y p e o f s = = " s t r i n g " & & s ) . j o i n ( " \ x B 7 " ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon ${e.state===" playing "?" nf - rp - on ":" "}" > $ { Yt ( "media" ) } < / s p a n >
$ { this . nameButton ( r ) }
< span class = "nf-rp-state" > $ { this . stateOf ( e , this . stateLabel ( e . state ) ) } $ { G ( this . hass , [ e . entity _id ] ) } < / s p a n >
< span class = "nf-rp-state" > $ { this . stateOf ( e , this . stateLabel ( e . state ) ) } $ { U ( this . hass , [ e . entity _id ] ) } < / s p a n >
$ { o ? p ` <p class="nf-rp-media nf-rp-wide"> ${ o } </p> ` : f }
< div class = "nf-rp-buttons nf-rp-wide" >
< button class = "nf-btn nf-rp-small" aria - label = $ { this . t ( "previous" ) } ? disabled = $ { i } @ click = $ { ( ) => this . call ( "media_player" , "media_previous_track" , { entity _id : r } ) } >
$ { Ao ( qr . previous ) }
$ { zo ( Yr . previous ) }
< / b u t t o n >
< button class = "nf-btn nf-rp-small" aria - label = $ { this . t ( "play_pause" ) } ? disabled = $ { C ( e ) } @ click = $ { ( ) => this . call ( "media_player" , "media_play_pause" , { entity _id : r } ) } >
$ { Ao ( e . state === "playing" ? qr . pause : qr . play ) }
$ { zo ( e . state === "playing" ? Yr . pause : Yr . play ) }
< / b u t t o n >
< button class = "nf-btn nf-rp-small" aria - label = $ { this . t ( "next" ) } ? disabled = $ { i } @ click = $ { ( ) => this . call ( "media_player" , "media_next_track" , { entity _id : r } ) } >
$ { Ao ( qr . next ) }
$ { zo ( Yr . next ) }
< / b u t t o n >
< / d i v >
$ { typeof t . volume _level == "number" ? p ` <label class="nf-rp-slider"
@@ -466,16 +466,16 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. value = $ { String ( Math . round ( t . volume _level * 100 ) ) }
@ change = $ { s => this . call ( "media_player" , "volume_set" , { entity _id : r , volume _level : Number ( s . target . value ) / 100 } ) }
/ > < / l a b e l > ` : f }
< / d i v > ` } s w i t c h R o w ( e ) { l e t t = e . e n t i t y _ i d , r = P ( t ) , i = t . s l i c e ( 0 , t . i n d e x O f ( " . " ) ) , o = r = = = " l o c k " ? e . s t a t e = = = " u n l o c k e d " | | e . s t a t e = = = " o p e n " : t e ( e ) , s = ( ) = > r = = = " l o c k " ? t h i s . c a l l ( " l o c k " , o ? " l o c k " : " u n l o c k " , { e n t i t y _ i d : t } ) : t h i s . c a l l ( i , " t o g g l e " , { e n t i t y _ i d : t } ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon ${o?" nf - rp - on ":" "}" > $ { qt ( r ) } < / s p a n >
< / d i v > ` } s w i t c h R o w ( e ) { l e t t = e . e n t i t y _ i d , r = P ( t ) , i = t . s l i c e ( 0 , t . i n d e x O f ( " . " ) ) , o = r = = = " l o c k " ? e . s t a t e = = = " u n l o c k e d " | | e . s t a t e = = = " o p e n " : n e ( e ) , s = ( ) = > r = = = " l o c k " ? t h i s . c a l l ( " l o c k " , o ? " l o c k " : " u n l o c k " , { e n t i t y _ i d : t } ) : t h i s . c a l l ( i , " t o g g l e " , { e n t i t y _ i d : t } ) ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon ${o?" nf - rp - on ":" "}" > $ { Yt ( r ) } < / s p a n >
$ { this . nameButton ( t ) }
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { G ( this . hass , [ e . entity _id ] ) } < / s p a n >
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { U ( this . hass , [ e . entity _id ] ) } < / s p a n >
$ { this . toggle ( e , o , s ) }
< / d i v > ` } s e n s o r R o w ( e ) { l e t t = P ( e . e n t i t y _ i d ) , r = t = = = " b i n a r y " & & e . s t a t e = = = " o n " ; r e t u r n p ` < d i v c l a s s = " n f - r p - r o w " >
< span class = "nf-rp-icon ${r?" nf - rp - on ":" "}" > $ { qt ( t ) } < / s p a n >
< span class = "nf-rp-icon ${r?" nf - rp - on ":" "}" > $ { Yt ( t ) } < / s p a n >
$ { this . nameButton ( e . entity _id ) }
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { G ( this . hass , [ e . entity _id ] ) } < / s p a n >
< / d i v > ` } f i r e ( e ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( e , { b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } s t a t i c s t y l e s = [ y e , H e , J `
< span class = "nf-rp-state" > $ { this . stateOf ( e ) } $ { U ( this . hass , [ e . entity _id ] ) } < / s p a n >
< / d i v > ` } f i r e ( e ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( e , { b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } s t a t i c s t y l e s = [ v e , P e , Q `
: host {
display : block ;
}
@@ -856,32 +856,32 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
outline : 2 px solid var ( -- nf - accent ) ;
outline - offset : 2 px ;
}
` ]};customElements.get("nf-room-panel")||customElements.define("nf-room-panel",Ro);function xc(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 bp=[[/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]]],kc=[34,211,238];function Eo(n){return n?bp.find(([e])=>e.test(n))?.[1]??kc:kc}function zo(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 To=n=>n.state==="playing"||n.state==="on"&&zo(n);function Sc(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:To(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:Eo(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 $ c(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 yp=3;function Mc(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||!te(n.states[s])||r.push({id:o.id,at:{floorId:i.id,x:o.x,y:oe(i,o)+o.h,z:o.z},reach:Math.min(15,Math.max(.5,o.spray??yp))})}return r}var Zr=n=>n&&n!=="none"?n:null,Ac=n=>Math.min(1,Math.max(0,n));function Rc(n,e){let t=new Map;for(let r of e.settings.roof?.windows??[]){let i=Ve(n,{cover:Zr(r.cover),contact:Zr(r.contact),tilt:Zr(r.tilt)},"window"),o=Zr(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"?Ac(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 vp(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)<Math.max(2,e.w)).sort((i,o)=>t(i)-t(o))[0]?.entity_id??null}var st=(n,e)=>typeof n[e]=="string"?n[e]:"";function Ec(n,e,t){let r=[];for(let i of e.floors)for(let o of i.furniture){if(!vr(o.type))continue;let s=t?.get(o.id)?.entity??null,a=s?.startsWith("media_player.")?s:vp(i,o),l=a?n.states[a]:void 0;if(!l||!zo(l))continue;let c=l.attributes,u=st(c,"app_name")||st(c,"source")||null;r.push({id:o.id,furnitureId:o.id,floorId:i.id,color:Eo(u),title:st(c,"media_title")||st(c,"media_channel")||u||"",subtitle:st(c,"media_artist")||st(c,"media_series_title")||st(c,"media_album_name"),app:u,picture:st(c,"entity_picture")||null,playing:To(l),ambilight:o.ambilight??1})}return r}function zc(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 Tc(n,e){return(n===null?0:Ac((n+4)/16))*(1-.45*e)}function at(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 Yr=new Set(["contact_lost","unlocked_night","own"]);function wp(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]==="<"?o<s:o>s)}return r.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean).includes(String(t.state).toLowerCase())}var xp=600*1e3,kp=new Set(["rainy","pouring","lightning-rainy","hail","snowy-rainy"]),Sp=new Map([["smoke","smoke"],["gas","gas"],["carbon_monoxide","co"],["moisture","water"]]),Fc=(n,e)=>{if(e.startsWith("binary_sensor."))return Sp.get(String(n.states[e]?.attributes.device_class))};function $ p(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 Dc(n,e,t,r){let i=[];for(let a o
Line truncated
$ { ne ` <circle cx="27" cy="27" r= ${ 22 } class="live-ring-bg"></circle>
` ]};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)<Math.max(2,e.w)).sort((i,o)=>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]==="<"?o<s:o>s)}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 o
Line truncated
$ { re ` <circle cx="27" cy="27" r= ${ 22 } class="live-ring-bg"></circle>
< circle cx = "27" cy = "27" r = $ { 22 } stroke = $ { e } stroke - dasharray = $ { ` ${ ( r * Math . max ( 0 , Math . min ( 1 , n ) ) ) . toFixed ( 1 ) } ${ r . toFixed ( 1 ) } ` } transform = "rotate(-90 27 27)" class = "live-ring-fg" > < / c i r c l e > ` }
< / s v g > ` } f u n c t i o n P f ( n , e , t , r ) { l e t i = e . s u m m a r y , o = c = > $ ( n , c ) , s = e . a u t a r k y , a = r ? p ` < b u t t o n c l a s s = " l i v e - f o l d " t i t l e = $ { o ( r . f o l d e d ? " l i v e _ u n f o l d " : " l i v e _ f o l d " ) } a r i a - l a b e l = $ { o ( r . f o l d e d ? " l i v e _ u n f o l d " : " l i v e _ f o l d " ) } a r i a - e x p a n d e d = $ { ! r . f o l d e d } @ c l i c k = $ { r . t o g g l e } > $ { r . f o l d e d ? " + " : " \ u 2 2 1 2 " } < / b u t t o n > ` : f ; i f ( r ? . f o l d e d ) { l e t c = i . s o l a r ! = = n u l l ? ` \ u 2 6 0 0 $ { z e ( n , i . s o l a r ) } ` : i . c o n s u m p t i o n ! = = n u l l ? ` \ u 2 3 0 2 $ { z e ( n , i . c o n s u m p t i o n ) } ` : n u l l ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - h o u s e l i v e - f o l d e d " d a t a - i = $ { t } >
$ { s !== null ? p ` <div class="live-own"> ${ Wn ( s , s > . 95 ? "#4ade80" : s > . 6 ? "#facc15" : "#f87171" ) } <div class="live-own-text"><b> ${ Math . round ( s * 100 ) } %</b></div></div> ` : f }
< / s v g > ` } f u n c t i o n N f ( n , e , t , r ) { l e t i = e . s u m m a r y , o = c = > M ( n , c ) , s = e . a u t a r k y , a = r ? p ` < b u t t o n c l a s s = " l i v e - f o l d " t i t l e = $ { o ( r . f o l d e d ? " l i v e _ u n f o l d " : " l i v e _ f o l d " ) } a r i a - l a b e l = $ { o ( r . f o l d e d ? " l i v e _ u n f o l d " : " l i v e _ f o l d " ) } a r i a - e x p a n d e d = $ { ! r . f o l d e d } @ c l i c k = $ { r . t o g g l e } > $ { r . f o l d e d ? " + " : " \ u 2 2 1 2 " } < / b u t t o n > ` : f ; i f ( r ? . f o l d e d ) { l e t c = i . s o l a r ! = = n u l l ? ` \ u 2 6 0 0 $ { T e ( n , i . s o l a r ) } ` : i . c o n s u m p t i o n ! = = n u l l ? ` \ u 2 3 0 2 $ { T e ( n , i . c o n s u m p t i o n ) } ` : n u l l ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - h o u s e l i v e - f o l d e d " d a t a - i = $ { t } >
$ { s !== null ? p ` <div class="live-own"> ${ Vn ( s , s > . 95 ? "#4ade80" : s > . 6 ? "#facc15" : "#f87171" ) } <div class="live-own-text"><b> ${ Math . round ( s * 100 ) } %</b></div></div> ` : f }
$ { c ? p ` <b> ${ c } </b> ` : s === null ? p ` <b>⌂</b> ` : f }
$ { a }
< / d i v > ` } l e t l = [ ] ; i f ( i . s o l a r ! = = n u l l & & l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - s o l a r " > < s p a n > ☀ $ { o ( " e n e r g y _ s o l a r " ) } < / s p a n > < b > $ { z e ( n , i . s o l a r ) } < / b > < / d i v > ` ) , i . c o n s u m p t i o n ! = = n u l l & & l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - h o u s e " > < s p a n > ⌂ $ { o ( " e n e r g y _ c o n s u m p t i o n " ) } < / s p a n > < b > $ { z e ( n , i . c o n s u m p t i o n ) } < / b > < / d i v > ` ) , i . r e s t ! = = v o i d 0 & & i . r e s t ! = = n u l l & & l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - h o u s e " > < s p a n > ⌂ $ { o ( " e n e r g y _ r e s t " ) } < / s p a n > < b > $ { z e ( n , i . r e s t ) } < / b > < / d i v > ` ) , i . b a t t e r y ! = = n u l l | | i . s o c ! = = n u l l ) { l e t c = i . b a t t e r y = = = n u l l | | M a t h . a b s ( i . b a t t e r y ) < 1 5 ? " " : i . b a t t e r y > 0 ? " \ u 2 1 9 3 " : " \ u 2 1 9 1 " ; l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - b a t t e r y " > < s p a n > ▮ $ { o ( " e n e r g y _ b a t t e r y " ) } $ { c } < / s p a n > < b > $ { i . s o c ! = = n u l l ? ` $ { M a t h . r o u n d ( i . s o c ) } % ` : " " } $ { i . b a t t e r y ! = = n u l l & & M a t h . a b s ( i . b a t t e r y ) > = 1 5 ? ` \ x B 7 $ { z e ( n , i . b a t t e r y ) } ` : " " } < / b > < / d i v > ` ) } i f ( i . g r i d ! = = n u l l ) { l e t c = i . g r i d < - 1 5 ; l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w $ { c ? " l i v e - e x p o r t " : " l i v e - i m p o r t " } " > < s p a n > ⇄ $ { o ( c ? " e n e r g y _ g r i d _ e x p o r t " : " e n e r g y _ g r i d _ i m p o r t " ) } < / s p a n > < b > $ { z e ( n , i . g r i d ) } < / b > < / d i v > ` ) } f o r ( l e t c o f e . m e t e r s ? ? [ ] ) l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - m e t e r " > < s p a n > $ { c . i c o n } $ { c . l a b e l } < / s p a n > < b > $ { c . v a l u e } < / b > < / d i v > ` ) ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - h o u s e " d a t a - i = $ { t } >
< / d i v > ` } l e t l = [ ] ; i f ( i . s o l a r ! = = n u l l & & l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - s o l a r " > < s p a n > ☀ $ { o ( " e n e r g y _ s o l a r " ) } < / s p a n > < b > $ { T e ( n , i . s o l a r ) } < / b > < / d i v > ` ) , i . c o n s u m p t i o n ! = = n u l l & & l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - h o u s e " > < s p a n > ⌂ $ { o ( " e n e r g y _ c o n s u m p t i o n " ) } < / s p a n > < b > $ { T e ( n , i . c o n s u m p t i o n ) } < / b > < / d i v > ` ) , i . r e s t ! = = v o i d 0 & & i . r e s t ! = = n u l l & & l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - h o u s e " > < s p a n > ⌂ $ { o ( " e n e r g y _ r e s t " ) } < / s p a n > < b > $ { T e ( n , i . r e s t ) } < / b > < / d i v > ` ) , i . b a t t e r y ! = = n u l l | | i . s o c ! = = n u l l ) { l e t c = i . b a t t e r y = = = n u l l | | M a t h . a b s ( i . b a t t e r y ) < 1 5 ? " " : i . b a t t e r y > 0 ? " \ u 2 1 9 3 " : " \ u 2 1 9 1 " ; l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - b a t t e r y " > < s p a n > ▮ $ { o ( " e n e r g y _ b a t t e r y " ) } $ { c } < / s p a n > < b > $ { i . s o c ! = = n u l l ? ` $ { M a t h . r o u n d ( i . s o c ) } % ` : " " } $ { i . b a t t e r y ! = = n u l l & & M a t h . a b s ( i . b a t t e r y ) > = 1 5 ? ` \ x B 7 $ { T e ( n , i . b a t t e r y ) } ` : " " } < / b > < / d i v > ` ) } i f ( i . g r i d ! = = n u l l ) { l e t c = i . g r i d < - 1 5 ; l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w $ { c ? " l i v e - e x p o r t " : " l i v e - i m p o r t " } " > < s p a n > ⇄ $ { o ( c ? " e n e r g y _ g r i d _ e x p o r t " : " e n e r g y _ g r i d _ i m p o r t " ) } < / s p a n > < b > $ { T e ( n , i . g r i d ) } < / b > < / d i v > ` ) } f o r ( l e t c o f e . m e t e r s ? ? [ ] ) l . p u s h ( p ` < d i v c l a s s = " l i v e - r o w l i v e - m e t e r " > < s p a n > $ { c . i c o n } $ { c . l a b e l } < / s p a n > < b > $ { c . v a l u e } < / b > < / d i v > ` ) ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - h o u s e " d a t a - i = $ { t } >
$ { a }
$ { s !== null ? p ` <div class="live-own"> ${ Wn ( s , s > . 95 ? "#4ade80" : s > . 6 ? "#facc15" : "#f87171" ) } <div class="live-own-text"><b> ${ Math . round ( s * 100 ) } %</b><span> ${ o ( "live_autarky" ) } </span></div></div> ` : f }
$ { s !== null ? p ` <div class="live-own"> ${ Vn ( s , s > . 95 ? "#4ade80" : s > . 6 ? "#facc15" : "#f87171" ) } <div class="live-own-text"><b> ${ Math . round ( s * 100 ) } %</b><span> ${ o ( "live_autarky" ) } </span></div></div> ` : f }
< div class = "live-rows" > $ { l } < / d i v >
$ { Cf ( n , e . curves ) } $ { If ( n , e . week ) }
< / d i v > ` } f u n c t i o n I f ( n , e ) { i f ( ! e ) r e t u r n f ; l e t t = [ . . . e . s o l a r , . . . e . u s e ] . f i l t e r ( c = > c ! = = n u l l & & c > 0 ) ; i f ( ! t . l e n g t h ) r e t u r n f ; l e t r = M a t h . m a x ( . . . t ) * 1 . 1 | | 1 , [ i , o ] = [ 1 5 0 , 3 0 ] , s = i / 7 , a = ( c , u , h ) = > c = = = n u l l | | c < = 0 ? f : n e ` < r e c t x = $ { u . t o F i x e d ( 1 ) } y = $ { ( o - c / r * o ) . t o F i x e d ( 1 ) } w i d t h = $ { ( s * . 3 6 ) . t o F i x e d ( 1 ) } h e i g h t = $ { ( c / r * o ) . t o F i x e d ( 1 ) } c l a s s = $ { h } > < / r e c t > ` , l = c = > c . r e d u c e ( ( u , h ) = > u + ( h ? ? 0 ) , 0 ) ; r e t u r n p ` < d i v c l a s s = " l i v e - d a y l i v e - w e e k " t i t l e = $ { $ ( n , " l i v e _ w e e k _ h i n t " , { s o l a r : L ( n , l ( e . s o l a r ) , 0 ) , u s e : L ( n , l ( e . u s e ) , 0 ) } ) } >
$ { Of ( n , e . curves ) } $ { Lf ( n , e . week ) }
< / d i v > ` } f u n c t i o n L f ( n , e ) { i f ( ! e ) r e t u r n f ; l e t t = [ . . . e . s o l a r , . . . e . u s e ] . f i l t e r ( c = > c ! = = n u l l & & c > 0 ) ; i f ( ! t . l e n g t h ) r e t u r n f ; l e t r = M a t h . m a x ( . . . t ) * 1 . 1 | | 1 , [ i , o ] = [ 1 5 0 , 3 0 ] , s = i / 7 , a = ( c , u , h ) = > c = = = n u l l | | c < = 0 ? f : r e ` < r e c t x = $ { u . t o F i x e d ( 1 ) } y = $ { ( o - c / r * o ) . t o F i x e d ( 1 ) } w i d t h = $ { ( s * . 3 6 ) . t o F i x e d ( 1 ) } h e i g h t = $ { ( c / r * o ) . t o F i x e d ( 1 ) } c l a s s = $ { h } > < / r e c t > ` , l = c = > c . r e d u c e ( ( u , h ) = > u + ( h ? ? 0 ) , 0 ) ; r e t u r n p ` < d i v c l a s s = " l i v e - d a y l i v e - w e e k " t i t l e = $ { M ( n , " l i v e _ w e e k _ h i n t " , { s o l a r : L ( n , l ( e . s o l a r ) , 0 ) , u s e : L ( n , l ( e . u s e ) , 0 ) } ) } >
< svg viewBox = $ { ` 0 0 ${ i } ${ o } ` } preserveAspectRatio = "none" aria - hidden = "true" >
$ { e . days . map ( ( c , u ) => ne ` ${ a ( e . solar [ u ] , u * s + s * . 1 , "live-week-solar" ) } ${ a ( e . use [ u ] , u * s + s * . 5 , "live-week-use" ) } ` ) }
$ { e . days . map ( ( c , u ) => re ` ${ a ( e . solar [ u ] , u * s + s * . 1 , "live-week-solar" ) } ${ a ( e . use [ u ] , u * s + s * . 5 , "live-week-use" ) } ` ) }
< / s v g >
< span > 7 $ { $ ( n , "live_days" ) } < / s p a n >
< / d i v > ` } f u n c t i o n C f ( n , e ) { i f ( ! e ) r e t u r n f ; l e t t = [ . . . e . s o l a r , . . . e . u s e ] . f i l t e r ( l = > l ! = = n u l l ) ; i f ( t . l e n g t h < 4 ) r e t u r n f ; l e t r = M a t h . m a x ( . . . t ) * 1 . 0 8 | | 1 , [ i , o ] = [ 1 5 0 , 3 4 ] , s = T n ( e . s o l a r , i , o , r ) , a = T n ( e . u s e , i , o , r ) ; r e t u r n p ` < d i v c l a s s = " l i v e - d a y " t i t l e = $ { $ ( n , " l i v e _ d a y _ h i n t " ) } >
< span > 7 $ { M ( n , "live_days" ) } < / s p a n >
< / d i v > ` } f u n c t i o n O f ( n , e ) { i f ( ! e ) r e t u r n f ; l e t t = [ . . . e . s o l a r , . . . e . u s e ] . f i l t e r ( l = > l ! = = n u l l ) ; i f ( t . l e n g t h < 4 ) r e t u r n f ; l e t r = M a t h . m a x ( . . . t ) * 1 . 0 8 | | 1 , [ i , o ] = [ 1 5 0 , 3 4 ] , s = D n ( e . s o l a r , i , o , r ) , a = D n ( e . u s e , i , o , r ) ; r e t u r n p ` < d i v c l a s s = " l i v e - d a y " t i t l e = $ { M ( n , " l i v e _ d a y _ h i n t " ) } >
< svg viewBox = $ { ` 0 0 ${ i } ${ o } ` } preserveAspectRatio = "none" aria - hidden = "true" >
$ { s ? ne ` <path d= ${ ` ${ s } L ${ i } , ${ o } L0, ${ o } Z ` } class="live-day-solar"></path> ` : f }
$ { a ? ne ` <path d= ${ a } class="live-day-use"></path> ` : f }
$ { s ? re ` <path d= ${ ` ${ s } L ${ i } , ${ o } L0, ${ o } Z ` } class="live-day-solar"></path> ` : f }
$ { a ? re ` <path d= ${ a } class="live-day-use"></path> ` : f }
< / s v g >
< span > 24 h < / s p a n >
< / d i v > ` } f u n c t i o n N f ( n , e , t , r ) { l e t i = e . c a r , o = ( u , h ) = > $ ( n , u , h ) , s = A u ( i . s o c ) , a = i . h o m e ? i . c h a r g i n g ? ` \ u 2 6 A 1 $ { o ( " l i v e _ c a r _ c h a r g i n g " ) } $ { i . c h a r g i n g W ? ` \ x B 7 $ { z e ( n , i . c h a r g i n g W ) } ` : " " } ` : i . p l u g g e d ? ` \ u { 1 F 5 0 C } $ { o ( " l i v e _ c a r _ p l u g g e d " ) } ` : " " : ` $ { o ( " l i v e _ c a r _ a w a y " ) } $ { i . w h e r e ? ` \ x B 7 $ { i . w h e r e } ` : " " } $ { i . d i s t a n c e ! = = n u l l ? ` \ x B 7 $ { L ( n , i . d i s t a n c e , i . d i s t a n c e < 1 0 ? 1 : 0 ) } k m ` : " " } ` , l = i . e n t i t i e s , c = ( u , h , m , d ) = > p ` < b u t t o n c l a s s = " l i v e - b t n $ { u ? " l i v e - o n " : " " } " t i t l e = $ { h } a r i a - l a b e l = $ { h } a r i a - p r e s s e d = $ { u ? ? ! 1 } @ c l i c k = $ { g = > ( g . s t o p P r o p a g a t i o n ( ) , d ( ) ) } > $ { m } < / b u t t o n > ` ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - c a r $ { i . c h a r g i n g ? " l i v e - c h a r g i n g " : " " } $ { i . h o m e ? " " : " l i v e - a w a y " } " d a t a - i = $ { t } s t y l e = $ { ` - - l i v e - s o c : $ { s } ` } >
< / d i v > ` } f u n c t i o n W f ( n , e , t , r ) { l e t i = e . c a r , o = ( u , h ) = > M ( n , u , h ) , s = z u ( i . s o c ) , a = i . h o m e ? i . c h a r g i n g ? ` \ u 2 6 A 1 $ { o ( " l i v e _ c a r _ c h a r g i n g " ) } $ { i . c h a r g i n g W ? ` \ x B 7 $ { T e ( n , i . c h a r g i n g W ) } ` : " " } ` : i . p l u g g e d ? ` \ u { 1 F 5 0 C } $ { o ( " l i v e _ c a r _ p l u g g e d " ) } ` : " " : ` $ { o ( " l i v e _ c a r _ a w a y " ) } $ { i . w h e r e ? ` \ x B 7 $ { i . w h e r e } ` : " " } $ { i . d i s t a n c e ! = = n u l l ? ` \ x B 7 $ { L ( n , i . d i s t a n c e , i . d i s t a n c e < 1 0 ? 1 : 0 ) } k m ` : " " } ` , l = i . e n t i t i e s , c = ( u , h , m , d ) = > p ` < b u t t o n c l a s s = " l i v e - b t n $ { u ? " l i v e - o n " : " " } " t i t l e = $ { h } a r i a - l a b e l = $ { h } a r i a - p r e s s e d = $ { u ? ? ! 1 } @ c l i c k = $ { g = > ( g . s t o p P r o p a g a t i o n ( ) , d ( ) ) } > $ { m } < / b u t t o n > ` ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - c a r $ { i . c h a r g i n g ? " l i v e - c h a r g i n g " : " " } $ { i . h o m e ? " " : " l i v e - a w a y " } " d a t a - i = $ { t } s t y l e = $ { ` - - l i v e - s o c : $ { s } ` } >
< div class = "live-own" >
$ { Wn ( ( i . soc ? ? 0 ) / 100 , s ) }
$ { Vn ( ( i . soc ? ? 0 ) / 100 , s ) }
< div class = "live-own-text" > < b > $ { i . soc !== null ? ` ${ Math . round ( i . soc ) } % ` : "\u2013" } < / b > < s p a n > $ { i . r a n g e ! = = n u l l ? ` $ { M a t h . r o u n d ( i . r a n g e ) } $ { i . r a n g e U n i t } ` : " " } < / s p a n > < / d i v >
< / d i v >
< div class = "live-rows" >
@@ -896,7 +896,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
$ { l . charge && i . home ? c ( i . charging , o ( "live_car_charge" ) , "\u26A1" , ( ) => r ( l . charge . split ( "." ) [ 0 ] , "toggle" , l . charge ) ) : f }
< / d i v >
< / d i v >
< / d i v > ` } f u n c t i o n L f ( n , e , t , r ) { l e t i = e . m e d i a , o = l = > $ ( n , l ) , s = ` r g b ( $ { i . c o l o r . j o i n ( " , " ) } ) ` , a = ( l , c , u ) = > p ` < b u t t o n c l a s s = " l i v e - b t n " t i t l e = $ { l } a r i a - l a b e l = $ { l } @ c l i c k = $ { h = > ( h . s t o p P r o p a g a t i o n ( ) , r ( " m e d i a _ p l a y e r " , u , i . e n t i t y ) ) } > $ { c } < / b u t t o n > ` ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - m e d i a " d a t a - i = $ { t } s t y l e = $ { ` - - l i v e - s o c : $ { s } ` } @ c l i c k = $ { l = > l . c u r r e n t T a r g e t . c l a s s L i s t . t o g g l e ( " l i v e - o p e n " ) } >
< / d i v > ` } f u n c t i o n B f ( n , e , t , r ) { l e t i = e . m e d i a , o = l = > M ( n , l ) , s = ` r g b ( $ { i . c o l o r . j o i n ( " , " ) } ) ` , a = ( l , c , u ) = > p ` < b u t t o n c l a s s = " l i v e - b t n " t i t l e = $ { l } a r i a - l a b e l = $ { l } @ c l i c k = $ { h = > ( h . s t o p P r o p a g a t i o n ( ) , r ( " m e d i a _ p l a y e r " , u , i . e n t i t y ) ) } > $ { c } < / b u t t o n > ` ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - m e d i a " d a t a - i = $ { t } s t y l e = $ { ` - - l i v e - s o c : $ { s } ` } @ c l i c k = $ { l = > l . c u r r e n t T a r g e t . c l a s s L i s t . t o g g l e ( " l i v e - o p e n " ) } >
$ { i . picture ? p ` <img class="live-cover" src= ${ i . picture } alt="" loading="lazy" /> ` : p ` <div class="live-cover live-cover-none">♪</div> ` }
< div class = "live-rows" >
< div class = "live-title" title = $ { i . title } > $ { i . title || i . name } < / d i v >
@@ -915,9 +915,9 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
/ > ` : f }
< / d i v >
< / d i v >
< / d i v > ` } f u n c t i o n R u ( n ) { l e t e = [ . . . n . q u e r y S e l e c t o r A l l ( " . l i v e - c a r d " ) ] . f i l t e r ( s = > s . s t y l e . v i s i b i l i t y ! = = " h i d d e n " & & s . o f f s e t W i d t h > 0 ) , t = [ ] , r = e [ 0 ] ? . p a r e n t E l e m e n t ? . c l i e n t W i d t h ? ? 0 , i = e [ 0 ] ? . p a r e n t E l e m e n t ? . c l i e n t H e i g h t ? ? 0 , o = e . m a p ( s = > { l e t [ a , l ] = [ N u m b e r ( s . d a t a s e t . x ) , s . o f f s e t W i d t h ] , c = r ? r > l + 1 6 ? M a t h . m i n ( M a t h . m a x ( a , l / 2 + 8 ) , r - l / 2 - 8 ) : r / 2 : a ; r e t u r n s . s t y l e . s e t P r o p e r t y ( " - - l i v e - d x " , ` $ { M a t h . r o u n d ( a - c ) } p x ` ) , { e l : s , x : c , y : N u m b e r ( s . d a t a s e t . y ) , w : l , h : s . o f f s e t H e i g h t } } ) . s o r t ( ( s , a ) = > N u m b e r ( a . e l . d a t a s e t . p r i o r i t y | | 0 ) - N u m b e r ( s . e l . d a t a s e t . p r i o r i t y | | 0 ) | | a . y - s . y ) ; f o r ( l e t s o f o ) { l e t a = s . y ; i f ( ( s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - h y d r o n i c " ) | | s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - c h a r g i n g " ) ) & & r > s . w + 1 6 & & i > s . h + 1 6 ) { l e t h = [ s . x , s . w / 2 + 8 , r - s . w / 2 - 8 , . . . t . f l a t M a p ( g = > [ g . x 0 - s . w / 2 - 8 , g . x 1 + s . w / 2 + 8 ] ) ] . f i l t e r ( g = > g > = s . w / 2 + 8 & & g < = r - s . w / 2 - 8 ) . s o r t ( ( g , _ ) = > M a t h . a b s ( g - s . x ) - M a t h . a b s ( _ - s . x ) ) , m = [ M a t h . m a x ( s . h + 8 , M a t h . m i n ( i - 8 , a ) ) , . . . t . f l a t M a p ( g = > [ g . y 0 - 8 , g . y 1 + s . h + 8 ] ) ] . f i l t e r ( g = > g > = s . h + 8 & & g < = i - 8 ) , d ; f o r ( l e t g o f m ) { f o r ( l e t _ o f h ) i f ( ! t . s o m e ( b = > _ - s . w / 2 < b . x 1 + 6 & & _ + s . w / 2 > b . x 0 - 6 & & g - s . h < b . y 1 + 6 & & g > b . y 0 - 6 ) ) { d = { x : _ , y : g } ; b r e a k } i f ( d ) b r e a k } d & & ( s . x = d . x , a = d . y ) } f o r ( l e t h = 0 ; h < 1 2 ; h + + ) { l e t m = { x 0 : s . x - s . w / 2 , x 1 : s . x + s . w / 2 , y 0 : a - s . h , y 1 : a } , d = t . f i n d ( g = > m . x 0 < g . x 1 + 6 & & m . x 1 > g . x 0 - 6 & & m . y 0 < g . y 1 + 6 & & m . y 1 > g . y 0 - 6 ) ; i f ( ! d ) b r e a k ; a = d . y 0 - 8 } l e t l = s . y - a , c = ! s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - h o u s e " ) & & ! s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - r o o m c l i m a t e " ) & & s . e l . d a t a s e t . f o c u s e d ! = = " 1 " , u = s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - h y d r o n i c " ) | | s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - c h a r g i n g " ) ; i f ( c & & i > 0 & & ( a - s . h < 8 | | a > i - 8 | | ! u & & M a t h . a b s ( l ) > M a t h . m a x ( 1 0 0 , M a t h . m i n ( 1 8 0 , i * . 2 5 ) ) ) ) { s . e l . s t y l e . v i s i b i l i t y = " h i d d e n " ; c o n t i n u e } t . p u s h ( { x 0 : s . x - s . w / 2 , x 1 : s . x + s . w / 2 , y 0 : a - s . h , y 1 : a } ) , s . e l . s t y l e . s e t P r o p e r t y ( " - - l i v e - d x " , ` $ { M a t h . r o u n d ( N u m b e r ( s . e l . d a t a s e t . x ) - s . x ) } p x ` ) , s . e l . s t y l e . t r a n s f o r m = ` t r a n s l a t e ( $ { M a t h . r o u n d ( s . x ) } p x , $ { M a t h . r o u n d ( a ) } p x ) t r a n s l a t e ( - 5 0 % , - 1 0 0 % ) ` , s . e l . s t y l e . s e t P r o p e r t y ( " - - l i v e - t h r e a d " , ` $ { M a t h . r o u n d ( 1 8 + l ) } p x ` ) } } f u n c t i o n O f ( n , e , t ) { l e t r = e . p r i n t e r , i = ( c , u ) = > $ ( n , c , u ) , o = r . p r o g r e s s ? ? 0 , s = c = > n e w I n t l . D a t e T i m e F o r m a t ( n ? . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , { h o u r : " 2 - d i g i t " , m i n u t e : " 2 - d i g i t " } ) . f o r m a t ( n e w D a t e ( c ) ) , a = r . r e m a i n i n g ! = = n u l l ? r . r e m a i n i n g > = 6 0 ? ` $ { M a t h . f l o o r ( r . r e m a i n i n g / 6 0 ) } h $ { M a t h . r o u n d ( r . r e m a i n i n g % 6 0 ) } m i n ` : ` $ { M a t h . r o u n d ( r . r e m a i n i n g ) } m i n ` : n u l l , l = [ r . n o z z l e ! = = n u l l ? ` $ { i ( " p r i n t e r _ n o z z l e " ) } $ { M a t h . r o u n d ( r . n o z z l e ) } \ x B 0 ` : n u l l , r . b e d ! = = n u l l ? ` $ { i ( " p r i n t e r _ b e d " ) } $ { M a t h . r o u n d ( r . b e d ) } \ x B 0 ` : n u l l ] . f i l t e r ( B o o l e a n ) . j o i n ( " \ x B 7 " ) ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - p r i n t e r $ { r . p r i n t i n g ? " l i v e - c h a r g i n g " : " " } " d a t a - i = $ { t } >
< / d i v > ` } f u n c t i o n T u ( n ) { l e t e = [ . . . n . q u e r y S e l e c t o r A l l ( " . l i v e - c a r d " ) ] . f i l t e r ( s = > s . s t y l e . v i s i b i l i t y ! = = " h i d d e n " & & s . o f f s e t W i d t h > 0 ) , t = [ ] , r = e [ 0 ] ? . p a r e n t E l e m e n t ? . c l i e n t W i d t h ? ? 0 , i = e [ 0 ] ? . p a r e n t E l e m e n t ? . c l i e n t H e i g h t ? ? 0 , o = e . m a p ( s = > { l e t [ a , l ] = [ N u m b e r ( s . d a t a s e t . x ) , s . o f f s e t W i d t h ] , c = r ? r > l + 1 6 ? M a t h . m i n ( M a t h . m a x ( a , l / 2 + 8 ) , r - l / 2 - 8 ) : r / 2 : a ; r e t u r n s . s t y l e . s e t P r o p e r t y ( " - - l i v e - d x " , ` $ { M a t h . r o u n d ( a - c ) } p x ` ) , { e l : s , x : c , y : N u m b e r ( s . d a t a s e t . y ) , w : l , h : s . o f f s e t H e i g h t } } ) . s o r t ( ( s , a ) = > N u m b e r ( a . e l . d a t a s e t . p r i o r i t y | | 0 ) - N u m b e r ( s . e l . d a t a s e t . p r i o r i t y | | 0 ) | | a . y - s . y ) ; f o r ( l e t s o f o ) { l e t a = s . y ; i f ( ( s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - h y d r o n i c " ) | | s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - c h a r g i n g " ) ) & & r > s . w + 1 6 & & i > s . h + 1 6 ) { l e t h = [ s . x , s . w / 2 + 8 , r - s . w / 2 - 8 , . . . t . f l a t M a p ( g = > [ g . x 0 - s . w / 2 - 8 , g . x 1 + s . w / 2 + 8 ] ) ] . f i l t e r ( g = > g > = s . w / 2 + 8 & & g < = r - s . w / 2 - 8 ) . s o r t ( ( g , _ ) = > M a t h . a b s ( g - s . x ) - M a t h . a b s ( _ - s . x ) ) , m = [ M a t h . m a x ( s . h + 8 , M a t h . m i n ( i - 8 , a ) ) , . . . t . f l a t M a p ( g = > [ g . y 0 - 8 , g . y 1 + s . h + 8 ] ) ] . f i l t e r ( g = > g > = s . h + 8 & & g < = i - 8 ) , d ; f o r ( l e t g o f m ) { f o r ( l e t _ o f h ) i f ( ! t . s o m e ( b = > _ - s . w / 2 < b . x 1 + 6 & & _ + s . w / 2 > b . x 0 - 6 & & g - s . h < b . y 1 + 6 & & g > b . y 0 - 6 ) ) { d = { x : _ , y : g } ; b r e a k } i f ( d ) b r e a k } d & & ( s . x = d . x , a = d . y ) } f o r ( l e t h = 0 ; h < 1 2 ; h + + ) { l e t m = { x 0 : s . x - s . w / 2 , x 1 : s . x + s . w / 2 , y 0 : a - s . h , y 1 : a } , d = t . f i n d ( g = > m . x 0 < g . x 1 + 6 & & m . x 1 > g . x 0 - 6 & & m . y 0 < g . y 1 + 6 & & m . y 1 > g . y 0 - 6 ) ; i f ( ! d ) b r e a k ; a = d . y 0 - 8 } l e t l = s . y - a , c = ! s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - h o u s e " ) & & ! s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - r o o m c l i m a t e " ) & & s . e l . d a t a s e t . f o c u s e d ! = = " 1 " , u = s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - h y d r o n i c " ) | | s . e l . c l a s s L i s t . c o n t a i n s ( " l i v e - c a r d - c h a r g i n g " ) ; i f ( c & & i > 0 & & ( a - s . h < 8 | | a > i - 8 | | ! u & & M a t h . a b s ( l ) > M a t h . m a x ( 1 0 0 , M a t h . m i n ( 1 8 0 , i * . 2 5 ) ) ) ) { s . e l . s t y l e . v i s i b i l i t y = " h i d d e n " ; c o n t i n u e } t . p u s h ( { x 0 : s . x - s . w / 2 , x 1 : s . x + s . w / 2 , y 0 : a - s . h , y 1 : a } ) , s . e l . s t y l e . s e t P r o p e r t y ( " - - l i v e - d x " , ` $ { M a t h . r o u n d ( N u m b e r ( s . e l . d a t a s e t . x ) - s . x ) } p x ` ) , s . e l . s t y l e . t r a n s f o r m = ` t r a n s l a t e ( $ { M a t h . r o u n d ( s . x ) } p x , $ { M a t h . r o u n d ( a ) } p x ) t r a n s l a t e ( - 5 0 % , - 1 0 0 % ) ` , s . e l . s t y l e . s e t P r o p e r t y ( " - - l i v e - t h r e a d " , ` $ { M a t h . r o u n d ( 1 8 + l ) } p x ` ) } } f u n c t i o n V f ( n , e , t ) { l e t r = e . p r i n t e r , i = ( c , u ) = > M ( n , c , u ) , o = r . p r o g r e s s ? ? 0 , s = c = > n e w I n t l . D a t e T i m e F o r m a t ( n ? . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , { h o u r : " 2 - d i g i t " , m i n u t e : " 2 - d i g i t " } ) . f o r m a t ( n e w D a t e ( c ) ) , a = r . r e m a i n i n g ! = = n u l l ? r . r e m a i n i n g > = 6 0 ? ` $ { M a t h . f l o o r ( r . r e m a i n i n g / 6 0 ) } h $ { M a t h . r o u n d ( r . r e m a i n i n g % 6 0 ) } m i n ` : ` $ { M a t h . r o u n d ( r . r e m a i n i n g ) } m i n ` : n u l l , l = [ r . n o z z l e ! = = n u l l ? ` $ { i ( " p r i n t e r _ n o z z l e " ) } $ { M a t h . r o u n d ( r . n o z z l e ) } \ x B 0 ` : n u l l , r . b e d ! = = n u l l ? ` $ { i ( " p r i n t e r _ b e d " ) } $ { M a t h . r o u n d ( r . b e d ) } \ x B 0 ` : n u l l ] . f i l t e r ( B o o l e a n ) . j o i n ( " \ x B 7 " ) ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - p r i n t e r $ { r . p r i n t i n g ? " l i v e - c h a r g i n g " : " " } " d a t a - i = $ { t } >
< div class = "live-own" >
$ { r . picture ? p ` <img class="live-print-pic" src= ${ r . picture } alt="" /> ` : Wn ( o / 100 , r . printing ? "#38bdf8" : "#8aa0c8" ) }
$ { r . picture ? p ` <img class="live-print-pic" src= ${ r . picture } alt="" /> ` : Vn ( o / 100 , r . printing ? "#38bdf8" : "#8aa0c8" ) }
< div class = "live-own-text" > < b > $ { r . progress !== null ? ` ${ Math . round ( o ) } % ` : "\u2013" } < / b > < s p a n > $ { i ( ` p r i n t e r _ $ { r . p r i n t i n g ? " p r i n t i n g " : / f i n i s h | c o m p l e t e | f e r t i g / . t e s t ( r . s t a t u s ) ? " d o n e " : / p a u s e / . t e s t ( r . s t a t u s ) ? " p a u s e d " : / e r r o r | f a i l / . t e s t ( r . s t a t u s ) ? " e r r o r " : " i d l e " } ` ) } < / s p a n > < / d i v >
< / d i v >
< div class = "live-rows" >
@@ -928,30 +928,30 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
$ { l ? p ` <div class="live-status">🌡 ${ l } </div> ` : f }
$ { r . filaments . length ? p ` <div class="live-filaments"> ${ r . filaments . map ( c => p ` <i style= ${ ` background: ${ c } ` } ></i> ` ) } </div> ` : f }
< / d i v >
< / d i v > ` } f u n c t i o n W f ( n , e , t ) { l e t r = e . p u m p , i = a = > $ ( n , a ) , o = a = > a = = = n u l l ? " \ u 2 0 1 3 " : ` $ { L ( n , a , 1 ) } \ x B 0 ` , s = { h e a t i n g : " \ u { 1 F 5 2 5 } " , w a t e r : " \ u { 1 F 6 B F } " , c o o l i n g : " \ u 2 7 4 4 " , d e f r o s t : " \ u { 1 F 9 C A } " , i d l e : " \ u 2 3 F 8 " } [ r . m o d e ] ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - h e a t p u m p $ { r . m o d e = = = " i d l e " ? " " : " l i v e - c h a r g i n g " } " d a t a - i = $ { t } >
< / d i v > ` } f u n c t i o n K f ( n , e , t ) { l e t r = e . p u m p , i = a = > M ( n , a ) , o = a = > a = = = n u l l ? " \ u 2 0 1 3 " : ` $ { L ( n , a , 1 ) } \ x B 0 ` , s = { h e a t i n g : " \ u { 1 F 5 2 5 } " , w a t e r : " \ u { 1 F 6 B F } " , c o o l i n g : " \ u 2 7 4 4 " , d e f r o s t : " \ u { 1 F 9 C A } " , i d l e : " \ u 2 3 F 8 " } [ r . m o d e ] ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - h e a t p u m p $ { r . m o d e = = = " i d l e " ? " " : " l i v e - c h a r g i n g " } " d a t a - i = $ { t } >
< div class = "live-own" >
$ { Wn ( Math . min ( 1 , ( r . cop ? ? 0 ) / 6 ) , ( r . cop ? ? 0 ) >= 3.5 ? "#4ade80" : ( r . cop ? ? 0 ) >= 2.5 ? "#facc15" : "#fb923c" ) }
$ { Vn ( Math . min ( 1 , ( r . cop ? ? 0 ) / 6 ) , ( r . cop ? ? 0 ) >= 3.5 ? "#4ade80" : ( r . cop ? ? 0 ) >= 2.5 ? "#facc15" : "#fb923c" ) }
< div class = "live-own-text" > < b > $ { r . cop !== null ? L ( n , r . cop , 1 ) : s } < / b > < s p a n > $ { r . c o p ! = = n u l l ? " C O P " : " " } < / s p a n > < / d i v >
< / d i v >
< div class = "live-rows" >
< div class = "live-title" > $ { e . name } < / d i v >
< div class = "live-status" > $ { s } $ { i ( ` heatpump_ ${ r . mode } ` ) } < / d i v >
$ { r . flow !== null || r . return !== null ? p ` <div class="live-row live-heat"><span> ${ i ( "heatpump_flow_return" ) } </span><b> ${ o ( r . flow ) } → ${ o ( r . return ) } </b></div> ` : f }
$ { r . heat !== null ? p ` <div class="live-row live-heat"><span> ${ i ( "heatpump_heat" ) } </span><b> ${ ze ( n , r . heat ) } </b></div> ` : f }
$ { r . power !== null ? p ` <div class="live-row live-house"><span> ${ i ( "heatpump_power" ) } </span><b> ${ ze ( n , r . power ) } </b></div> ` : f }
$ { r . heat !== null ? p ` <div class="live-row live-heat"><span> ${ i ( "heatpump_heat" ) } </span><b> ${ Te ( n , r . heat ) } </b></div> ` : f }
$ { r . power !== null ? p ` <div class="live-row live-house"><span> ${ i ( "heatpump_power" ) } </span><b> ${ Te ( n , r . power ) } </b></div> ` : f }
$ { r . outside !== null ? p ` <div class="live-status">🌡 ${ i ( "heatpump_outside" ) } ${ o ( r . outside ) } </div> ` : f }
< / d i v >
< / d i v > ` } f u n c t i o n B f ( n , e , t ) { l e t r = ( o , s , a ) = > o = = = n u l l ? " \ u 2 0 1 3 " : ` $ { L ( n , o , s ) } $ { a } ` , i = O b j e c t . v a l u e s ( e . s o u r c e s ? ? { } ) . s o m e ( o = > v n ( n , o ) . l e n g t h > 0 ) ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - r o o m c l i m a t e $ { i ? " l i v e - c l i m a t e - t r e n d s " : " " } " d a t a - i = $ { t } d a t a - r o o m = $ { e . r o o m I d } r o l e = " g r o u p " a r i a - l a b e l = $ { ` $ { e . n a m e | | $ ( n , " r o o m " ) } \ x B 7 $ { $ ( n , " c l i m a t e " ) } ` } >
$ { e . showTemperature ? p ` <div class="live-row live-climate-temperature"><span title= ${ $ ( n , "climate_temperature" ) } aria-label= ${ $ ( n , "climate_temperature" ) } >🌡</span><b> ${ r ( e . temperature === null ? null : n ? ce ( n , e . temperature ) : e . temperature , 1 , n ? re ( n ) : "\xB0C" ) } </b> ${ G ( n , e . sources ? . temperature ? ? [ ] , $ ( n , "climate_temperature" ) ) } </div> ` : f }
$ { e . showHumidity ? p ` <div class="live-row live-climate-humidity"><span title= ${ $ ( n , "climate_humidity" ) } aria-label= ${ $ ( n , "climate_humidity" ) } >💧</span><b> ${ r ( e . humidity , 0 , "%" ) } </b> ${ G ( n , e . sources ? . humidity ? ? [ ] , $ ( n , "climate_humidity" ) ) } </div> ` : f }
$ { e . showCo2 ? p ` <div class="live-row live-climate-co2"><span title= ${ $ ( n , "climate_co2" ) } aria-label= ${ $ ( n , "climate_co2" ) } >☁</span><b> ${ r ( e . co2 , 0 , "ppm" ) } </b> ${ G ( n , e . sources ? . co2 ? ? [ ] , $ ( n , "climate_co2" ) ) } </div> ` : f }
$ { e . showIlluminance ? p ` <div class="live-row live-climate-illuminance"><span title= ${ $ ( n , "climate_illuminance" ) } aria-label= ${ $ ( n , "climate_illuminance" ) } >☀</span><b> ${ r ( e . illuminance , 0 , "lx" ) } </b> ${ G ( n , e . sources ? . illuminance ? ? [ ] , $ ( n , "climate_illuminance" ) ) } </div> ` : f }
< / d i v > ` } f u n c t i o n V f ( n , e , t ) { l e t r = e . p o w e r = = = n u l l ? " \ u 2 0 1 3 " : ` $ { e . p o w e r < 0 ? " \ u 2 2 1 2 " : " " } $ { z e ( n , e . p o w e r ) } ` ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - p o w e r $ { ( e . r e a d i n g s ? ? [ ] ) . l e n g t h ? " l i v e - c a r d - c h a r g i n g " : " " } " d a t a - i = $ { t } d a t a - f u r n i t u r e = $ { e . i d } r o l e = " g r o u p " a r i a - l a b e l = $ { e . n a m e } >
< div class = "live-power-name" > $ { e . name } < / d i v > $ { e . p o w e r E n t i t y ? p ` < d i v c l a s s = " l i v e - r o w " > < s p a n a r i a - h i d d e n = " t r u e " > ⚡ < / s p a n > < b > $ { r } < / b > $ { G ( n , [ e . p o w e r E n t i t y ] , e . n a m e ) } < / d i v > ` : f }
$ { ( e . readings ? ? [ ] ) . map ( i => p ` <div class="live-row live-charging-row" data-reading= ${ i . id } ><span class="live-charging-label" title= ${ i . label } ><span aria-hidden="true"> ${ i . icon } </span> ${ i . label } </span><b title= ${ i . text } > ${ i . text } </b> ${ G ( n , [ i . entity ] , i . label ) } </div> ` ) }
< / d i v > ` } f u n c t i o n E u ( n , e , t , r , i = ! 1 ) { r e t u r n e . l e n g t h ? p ` < d i v c l a s s = " l i v e - c a r d s " >
$ { e . map ( ( o , s ) => o . kind === "roomclimate" ? Bf ( n , o , s ) : o . kind === "power" ? Vf ( n , o , s ) : o . kind === "hydronic" ? p ` <div class="live-card live-card-hydronic" data-i= ${ s } data-furniture= ${ o . item . id } ><nf-hydronic-card .hass= ${ n } .item= ${ o . item } .readOnly= ${ o . readOnly } ></nf-hydronic-card></div> ` : i ? f : o . kind === "house" ? Pf ( n , o , s , r ) : o . kind === "car" ? Nf ( n , o , s , t ) : o . kind === "printer" ? Of ( n , o , s ) : o . kind === "heatpump" ? Wf ( n , o , s ) : Lf ( n , o , s , t ) ) }
< / d i v > ` : f } v a r z u = J `
< / d i v > ` } f u n c t i o n G f ( n , e , t ) { l e t r = ( o , s , a ) = > o = = = n u l l ? " \ u 2 0 1 3 " : ` $ { L ( n , o , s ) } $ { a } ` , i = O b j e c t . v a l u e s ( e . s o u r c e s ? ? { } ) . s o m e ( o = > x n ( n , o ) . l e n g t h > 0 ) ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - r o o m c l i m a t e $ { i ? " l i v e - c l i m a t e - t r e n d s " : " " } " d a t a - i = $ { t } d a t a - r o o m = $ { e . r o o m I d } r o l e = " g r o u p " a r i a - l a b e l = $ { ` $ { e . n a m e | | M ( n , " r o o m " ) } \ x B 7 $ { M ( n , " c l i m a t e " ) } ` } >
$ { e . showTemperature ? p ` <div class="live-row live-climate-temperature"><span title= ${ M ( n , "climate_temperature" ) } aria-label= ${ M ( n , "climate_temperature" ) } >🌡</span><b> ${ r ( e . temperature === null ? null : n ? ue ( n , e . temperature ) : e . temperature , 1 , n ? ie ( n ) : "\xB0C" ) } </b> ${ U ( n , e . sources ? . temperature ? ? [ ] , M ( n , "climate_temperature" ) ) } </div> ` : f }
$ { e . showHumidity ? p ` <div class="live-row live-climate-humidity"><span title= ${ M ( n , "climate_humidity" ) } aria-label= ${ M ( n , "climate_humidity" ) } >💧</span><b> ${ r ( e . humidity , 0 , "%" ) } </b> ${ U ( n , e . sources ? . humidity ? ? [ ] , M ( n , "climate_humidity" ) ) } </div> ` : f }
$ { e . showCo2 ? p ` <div class="live-row live-climate-co2"><span title= ${ M ( n , "climate_co2" ) } aria-label= ${ M ( n , "climate_co2" ) } >☁</span><b> ${ r ( e . co2 , 0 , "ppm" ) } </b> ${ U ( n , e . sources ? . co2 ? ? [ ] , M ( n , "climate_co2" ) ) } </div> ` : f }
$ { e . showIlluminance ? p ` <div class="live-row live-climate-illuminance"><span title= ${ M ( n , "climate_illuminance" ) } aria-label= ${ M ( n , "climate_illuminance" ) } >☀</span><b> ${ r ( e . illuminance , 0 , "lx" ) } </b> ${ U ( n , e . sources ? . illuminance ? ? [ ] , M ( n , "climate_illuminance" ) ) } </div> ` : f }
< / d i v > ` } f u n c t i o n U f ( n , e , t ) { l e t r = e . p o w e r = = = n u l l ? " \ u 2 0 1 3 " : ` $ { e . p o w e r < 0 ? " \ u 2 2 1 2 " : " " } $ { T e ( n , e . p o w e r ) } ` ; r e t u r n p ` < d i v c l a s s = " l i v e - c a r d l i v e - c a r d - p o w e r $ { ( e . r e a d i n g s ? ? [ ] ) . l e n g t h ? " l i v e - c a r d - c h a r g i n g " : " " } " d a t a - i = $ { t } d a t a - f u r n i t u r e = $ { e . i d } r o l e = " g r o u p " a r i a - l a b e l = $ { e . n a m e } >
< div class = "live-power-name" > $ { e . name } < / d i v > $ { e . p o w e r E n t i t y ? p ` < d i v c l a s s = " l i v e - r o w " > < s p a n a r i a - h i d d e n = " t r u e " > ⚡ < / s p a n > < b > $ { r } < / b > $ { U ( n , [ e . p o w e r E n t i t y ] , e . n a m e ) } < / d i v > ` : f }
$ { ( e . readings ? ? [ ] ) . map ( i => p ` <div class="live-row live-charging-row" data-reading= ${ i . id } ><span class="live-charging-label" title= ${ i . label } ><span aria-hidden="true"> ${ i . icon } </span> ${ i . label } </span><b title= ${ i . text } > ${ i . text } </b> ${ U ( n , [ i . entity ] , i . label ) } </div> ` ) }
< / d i v > ` } f u n c t i o n F u ( n , e , t , r , i = ! 1 ) { r e t u r n e . l e n g t h ? p ` < d i v c l a s s = " l i v e - c a r d s " >
$ { e . map ( ( o , s ) => o . kind === "roomclimate" ? Gf ( n , o , s ) : o . kind === "power" ? Uf ( n , o , s ) : o . kind === "hydronic" ? p ` <div class="live-card live-card-hydronic" data-i= ${ s } data-furniture= ${ o . item . id } ><nf-hydronic-card .hass= ${ n } .item= ${ o . item } .readOnly= ${ o . readOnly } ></nf-hydronic-card></div> ` : 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 ) ) }
< / d i v > ` : f } v a r D u = Q `
. live - card . live - card - power { display : grid ; gap : 4 px ; min - width : 90 px ; max - width : 220 px ; box - sizing : border - box ; }
. live - power - name { font - size : 11 px ; color : var ( -- nf - muted ) ; overflow : hidden ; text - overflow : ellipsis ; }
. live - card - power . live - row { align - items : center ; gap : 6 px ; }
@@ -1298,7 +1298,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
text - transform : uppercase ;
letter - spacing : 0.04 em ;
}
` ;function Qo (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 T u(n,e,t){let r=Qo (n).density;return r?Number.isFinite(e)&&e>=r*(t?.88:1.12):!0}function c i(n){return n.toLocaleLowerCase().normalize("NFD").replace(new RegExp(" \\ p{M}","gu"),"")}var Xo =n=>n.points.length>=3;function F u(n,e,t){return n.rooms.filter(Xo ).find(r=>H([e,t],r.points))}function K f(n,e,t,r){let i=[];for(let a of e.rooms.filter(Xo )){let[l,c]=T e(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=F u(e,l,c),m=[h?.name,r?e.name:void 0].filter(d=>!!d).join(" \x B7 ");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??H t(P(a.entity_id)??"sensor",x e(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=x e(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=F u(e,a.x,a.z),c=[l?.name,r?e.name:void 0].filter(u=>!!u).join(" \x B7 ");i.push({kind:"note",name: ` \u270E $ { a . text . length > 60 ? ` ${ a . text . slice ( 0 , 59 ) } \u 2026 ` : 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 D u(n,e){let t=K e(n,e.floors),r=e.floors.length>1,i=e.floors.flatMap(o=>K f(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)&&Xo (m)).map(m=>({f:h,r:m})));if(!s.length)continue;let[{f:a,r:l}]=s,[c,u]=T e(l.points);i.push({kind:"circuit",name: ` \ u { 1 F50C } $ { 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 G f(n,e){return(c i(n.name).startsWith(e)?0:2)+(n.kind==="room"?0:1)}function H u(n,e,t=8){let r=c i(e).split(/ \s +/).filter(Boolean);if(r.length===0)return[];let i=c i(e.trim());return n.filter(o=>{let s=c i([o.name,o.where,o.entity].filter(Boolean).join(" "));return r.every(a=>s.includes(a))}).map(o=>({item:o,cost:G f(o,i)})).sort((o,s)=>o.cost-s.cost||o.item.name.localeCompare(s.item.name)).slice(0,t).map(o=>o.item)}var U f=[[255,181,71],[255,236,210],[55,224,255],[91,124,255],[190,90,255],[255,95,210],[255,70,70],[120,255,150]],j f=[2200,2700,3200,4e3,5e3,6500],q f=["hs","rgb","rgbw","rgbww","xy"],Z f=4,P u=16,I u=32,Y f=128;function t s(n){let e=n.attributes.supported_color_modes??[],t=e.some(r=>q f.includes(r));return{dim:e.some(r=>r!=="onoff"),color:t,temp:e.includes("color_temp")}}function n s(n){return((n.attributes.supported_features??0)&Z f)!==0&&typeof n.attributes.current_position=="number"}var e s=class extends Q {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 $ (this.hass,e,t)}ask(){return!this.confirmSwitch||confirm(this.t("confirm_switch",{name:O(this.hass,this.entity)}))}call(e,t,r={}){this.hass.callService(e,t,{entity_id:this.entity,...r})}close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}details(){k e(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 ` < div class = "qm-at" style = "left:${50+Math.cos(o)*39}%;top:${50+Math.sin(o)*39}%" > $ { r } < / d i v > ` } ) } r e n d e r L i g h t ( e ) { l e t t = t s ( e ) , r = e . s t a t e = = = " o n " , i = r & & t y p e o f e . a t t r i b u t e s . b r i g h t n e s s = = " n u m b e r " ? M a t h . r o u n d ( e . a t t r i b u t e s . b r i g h t n e s s / 2 . 5 5 ) : r ? 1 0 0 : 0 , o = t . c o l o r ? U f . m a p ( s = > p ` < b u t t o n c l a s s = " q m - s w a t c h " s t y l e = " b a c k g r o u n d : r g b ( $ { s . j o i n ( " , " ) } ) " a r i a - l a b e l = $ { ` R G B $ { s . j o i n ( " , " ) } ` } @ c l i c k = $ { ( ) = > t h i s . c a l l ( " l i g h t " , " t u r n _ o n " , { r g b _ c o l o r : s } ) } > < / b u t t o n > ` ) : t . t e m p ? j f . m a p ( s = > p ` < b u t t o n c l a s s = " q m - s w a t c h " s t y l e = " b a c k g r o u n d : $ { J f ( s ) } " a r i a - l a b e l = $ { ` $ { s } K ` } @ c l i c k = $ { ( ) = > t h i s . c a l l ( " l i g h t " , " t u r n _ o n " , { c o l o r _ t e m p _ k e l v i n : s } ) } > < / b u t t o n > ` ) : [ ] ; r e t u r n p ` < d i v c l a s s = " q m - r i n g $ { o . l e n g t h ? " " : " q m - r i n g - s m a l l " } " >
` ;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 H u(n,e,t){let r=ts (n).density;return r?Number.isFinite(e)&&e>=r*(t?.88:1.12):!0}function d i(n){return n.toLocaleLowerCase().normalize("NFD").replace(new RegExp(" \\ p{M}","gu"),"")}var ns =n=>n.points.length>=3;function P u(n,e,t){return n.rooms.filter(ns ).find(r=>H([e,t],r.points))}function j f(n,e,t,r){let i=[];for(let a of e.rooms.filter(ns )){let[l,c]=F e(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=P u(e,l,c),m=[h?.name,r?e.name:void 0].filter(d=>!!d).join(" \x B7 ");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??I t(P(a.entity_id)??"sensor",k e(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=k e(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=P u(e,a.x,a.z),c=[l?.name,r?e.name:void 0].filter(u=>!!u).join(" \x B7 ");i.push({kind:"note",name: ` \u270E $ { a . text . length > 60 ? ` ${ a . text . slice ( 0 , 59 ) } \u 2026 ` : 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 I u(n,e){let t=G e(n,e.floors),r=e.floors.length>1,i=e.floors.flatMap(o=>j f(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]=F e(l.points);i.push({kind:"circuit",name: ` \ u { 1 F50C } $ { 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 q f(n,e){return(d i(n.name).startsWith(e)?0:2)+(n.kind==="room"?0:1)}function C u(n,e,t=8){let r=d i(e).split(/ \s +/).filter(Boolean);if(r.length===0)return[];let i=d i(e.trim());return n.filter(o=>{let s=d i([o.name,o.where,o.entity].filter(Boolean).join(" "));return r.every(a=>s.includes(a))}).map(o=>({item:o,cost:q f(o,i)})).sort((o,s)=>o.cost-s.cost||o.item.name.localeCompare(s.item.name)).slice(0,t).map(o=>o.item)}var Z f=[[255,181,71],[255,236,210],[55,224,255],[91,124,255],[190,90,255],[255,95,210],[255,70,70],[120,255,150]],Y f=[2200,2700,3200,4e3,5e3,6500],J f=["hs","rgb","rgbw","rgbww","xy"],Q f=4,N u=16,L u=32,X f=128;function i s(n){let e=n.attributes.supported_color_modes??[],t=e.some(r=>J f.includes(r));return{dim:e.some(r=>r!=="onoff"),color:t,temp:e.includes("color_temp")}}function o s(n){return((n.attributes.supported_features??0)&Q f)!==0&&typeof n.attributes.current_position=="number"}var r s=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(){S e(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 ` < div class = "qm-at" style = "left:${50+Math.cos(o)*39}%;top:${50+Math.sin(o)*39}%" > $ { r } < / d i v > ` } ) } r e n d e r L i g h t ( e ) { l e t t = i s ( e ) , r = e . s t a t e = = = " o n " , i = r & & t y p e o f e . a t t r i b u t e s . b r i g h t n e s s = = " n u m b e r " ? M a t h . r o u n d ( e . a t t r i b u t e s . b r i g h t n e s s / 2 . 5 5 ) : r ? 1 0 0 : 0 , o = t . c o l o r ? Z f . m a p ( s = > p ` < b u t t o n c l a s s = " q m - s w a t c h " s t y l e = " b a c k g r o u n d : r g b ( $ { s . j o i n ( " , " ) } ) " a r i a - l a b e l = $ { ` R G B $ { s . j o i n ( " , " ) } ` } @ c l i c k = $ { ( ) = > t h i s . c a l l ( " l i g h t " , " t u r n _ o n " , { r g b _ c o l o r : s } ) } > < / b u t t o n > ` ) : t . t e m p ? Y f . m a p ( s = > p ` < b u t t o n c l a s s = " q m - s w a t c h " s t y l e = " b a c k g r o u n d : $ { e g ( s ) } " a r i a - l a b e l = $ { ` $ { s } K ` } @ c l i c k = $ { ( ) = > t h i s . c a l l ( " l i g h t " , " t u r n _ o n " , { c o l o r _ t e m p _ k e l v i n : s } ) } > < / b u t t o n > ` ) : [ ] ; r e t u r n p ` < d i v c l a s s = " q m - r i n g $ { o . l e n g t h ? " " : " q m - r i n g - s m a l l " } " >
$ { this . ring ( o ) }
< button class = "qm-power ${r?" qm - on ":" "}" aria - pressed = $ { r } @ click = $ { ( ) => this . ask ( ) && this . call ( "light" , "toggle" ) } >
< svg viewBox = "0 0 24 24" width = "22" height = "22" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" > < path d = "M12 3v8M6.3 6.8a8 8 0 1 0 11.4 0" / > < / s v g >
@@ -1313,7 +1313,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. value = $ { String ( Math . max ( 1 , i ) ) }
aria - label = $ { this . t ( "brightness" ) }
@ change = $ { s => this . call ( "light" , "turn_on" , { brightness _pct : Number ( s . target . value ) } ) }
/ > ` : f } ` } r e n d e r C o v e r ( e ) { e = S r ( t h i s . h a s s , e , t h i s . t i l t E n t i t y ) ; l e t t = t y p e o f e . a t t r i b u t e s . c u r r e n t _ p o s i t i o n = = " n u m b e r " ? e . a t t r i b u t e s . c u r r e n t _ p o s i t i o n : n u l l , r = e . s t a t e = = = " o p e n i n g " | | e . s t a t e = = = " c l o s i n g " , i = n s ( e ) , o = ( u , h , m , d = ! 1 ) = > p ` < b u t t o n c l a s s = " q m - s w a t c h q m - s l o t $ { d ? " q m - s l o t - o n " : " " } " a r i a - l a b e l = $ { h } @ c l i c k = $ { m } > $ { u } < / b u t t o n > ` , s = u = > t ! = = n u l l & & M a t h . a b s ( t - u ) < 3 , a = [ o ( " \ u 2 5 B 2 " , t h i s . t ( " c o v e r _ o p e n " ) , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " o p e n _ c o v e r " ) , s ( 1 0 0 ) ) , . . . i ? [ 7 5 , 5 0 ] . m a p ( u = > o ( ` $ { u } ` , ` $ { u } % ` , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { p o s i t i o n : u } ) , s ( u ) ) ) : [ ] , o ( " \ u 2 5 B C " , t h i s . t ( " c o v e r _ c l o s e " ) , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " c l o s e _ c o v e r " ) , s ( 0 ) ) , . . . i ? [ 2 5 ] . m a p ( u = > o ( ` $ { u } ` , ` $ { u } % ` , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { p o s i t i o n : u } ) , s ( u ) ) ) : [ ] , . . . N u m b e r ( e . a t t r i b u t e s . s u p p o r t e d _ f e a t u r e s ? ? 0 ) & 8 ? [ o ( " \ u 2 5 A 0 " , t h i s . t ( " c o v e r _ s t o p " ) , ( ) = > t h i s . c a l l ( " c o v e r " , " s t o p _ c o v e r " ) , r ) ] : [ ] , . . . t h i s . m y P o s i t i o n ! = n u l l & & ( i | | N u m b e r ( e . a t t r i b u t e s . s u p p o r t e d _ f e a t u r e s ? ? 0 ) & 8 ) ? [ o ( " M y " , t h i s . t ( " c o v e r _ m y _ g o " , { p : t h i s . m y P o s i t i o n } ) , ( ) = > t h i s . a s k ( ) & & ( i ? t h i s . c a l l ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { p o s i t i o n : t h i s . m y P o s i t i o n } ) : t h i s . c a l l ( " c o v e r " , " s t o p _ c o v e r " ) ) , s ( t h i s . m y P o s i t i o n ) ) ] : [ ] ] , l = t = = = n u l l ? e . s t a t e = = = " c l o s e d " ? 1 0 0 : 0 : 1 0 0 - t , c = t ! = = n u l l | | r | | e . s t a t e = = = " o p e n " | | e . s t a t e = = = " c l o s e d " ; r e t u r n p ` < d i v c l a s s = " q m - r i n g " >
/ > ` : f } ` } r e n d e r C o v e r ( e ) { e = M r ( t h i s . h a s s , e , t h i s . t i l t E n t i t y ) ; l e t t = t y p e o f e . a t t r i b u t e s . c u r r e n t _ p o s i t i o n = = " n u m b e r " ? e . a t t r i b u t e s . c u r r e n t _ p o s i t i o n : n u l l , r = e . s t a t e = = = " o p e n i n g " | | e . s t a t e = = = " c l o s i n g " , i = o s ( e ) , o = ( u , h , m , d = ! 1 ) = > p ` < b u t t o n c l a s s = " q m - s w a t c h q m - s l o t $ { d ? " q m - s l o t - o n " : " " } " a r i a - l a b e l = $ { h } @ c l i c k = $ { m } > $ { u } < / b u t t o n > ` , s = u = > t ! = = n u l l & & M a t h . a b s ( t - u ) < 3 , a = [ o ( " \ u 2 5 B 2 " , t h i s . t ( " c o v e r _ o p e n " ) , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " o p e n _ c o v e r " ) , s ( 1 0 0 ) ) , . . . i ? [ 7 5 , 5 0 ] . m a p ( u = > o ( ` $ { u } ` , ` $ { u } % ` , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { p o s i t i o n : u } ) , s ( u ) ) ) : [ ] , o ( " \ u 2 5 B C " , t h i s . t ( " c o v e r _ c l o s e " ) , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " c l o s e _ c o v e r " ) , s ( 0 ) ) , . . . i ? [ 2 5 ] . m a p ( u = > o ( ` $ { u } ` , ` $ { u } % ` , ( ) = > t h i s . a s k ( ) & & t h i s . c a l l ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { p o s i t i o n : u } ) , s ( u ) ) ) : [ ] , . . . N u m b e r ( e . a t t r i b u t e s . s u p p o r t e d _ f e a t u r e s ? ? 0 ) & 8 ? [ o ( " \ u 2 5 A 0 " , t h i s . t ( " c o v e r _ s t o p " ) , ( ) = > t h i s . c a l l ( " c o v e r " , " s t o p _ c o v e r " ) , r ) ] : [ ] , . . . t h i s . m y P o s i t i o n ! = n u l l & & ( i | | N u m b e r ( e . a t t r i b u t e s . s u p p o r t e d _ f e a t u r e s ? ? 0 ) & 8 ) ? [ o ( " M y " , t h i s . t ( " c o v e r _ m y _ g o " , { p : t h i s . m y P o s i t i o n } ) , ( ) = > t h i s . a s k ( ) & & ( i ? t h i s . c a l l ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { p o s i t i o n : t h i s . m y P o s i t i o n } ) : t h i s . c a l l ( " c o v e r " , " s t o p _ c o v e r " ) ) , s ( t h i s . m y P o s i t i o n ) ) ] : [ ] ] , l = t = = = n u l l ? e . s t a t e = = = " c l o s e d " ? 1 0 0 : 0 : 1 0 0 - t , c = t ! = = n u l l | | r | | e . s t a t e = = = " o p e n " | | e . s t a t e = = = " c l o s e d " ; r e t u r n p ` < d i v c l a s s = " q m - r i n g " >
$ { this . ring ( a ) }
< button
class = "qm-power qm-blind ${c&&l<100?" qm - on ":" "}"
@@ -1323,7 +1323,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
@ click = $ { ( ) => r ? this . call ( "cover" , "stop_cover" ) : this . ask ( ) && this . call ( "cover" , l > 50 ? "open_cover" : "close_cover" ) }
>
< svg viewBox = "0 0 24 24" width = "22" height = "22" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" > < path d = "M4 4h16M5 4v15M19 4v15M7 8h10M7 12h10M7 16h10" / > < / s v g >
< b > $ { t !== null ? ` ${ Math . round ( t ) } % ` : se ( this . hass , e ) } < / b >
< b > $ { t !== null ? ` ${ Math . round ( t ) } % ` : ae ( this . hass , e ) } < / b >
< / b u t t o n >
< / d i v >
$ { i ? p ` <input
@@ -1335,7 +1335,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
aria - label = $ { this . t ( "position" ) }
@ change = $ { u => 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&Y f&&r!==null?p ` < label class = "qm-tilt"
$ { 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&X f&&r!==null?p ` < label class = "qm-tilt"
> < span > $ { this . t ( "cover_tilt" ) } · $ { Math . round ( r ) } % < / s p a n >
< input
class = "qm-slider"
@@ -1345,9 +1345,9 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. value = $ { String ( r ) }
aria - label = $ { this . t ( "cover_tilt" ) }
@ change = $ { i => this . call ( "cover" , "set_cover_tilt_position" , { entity _id : e . attributes . nf _cover _control ? this . entity : this . tiltEntity || this . entity , tilt _position : Number ( i . target . value ) } ) }
/ > < / l a b e l > ` : t & ( P u | I u ) ? p ` < d i v c l a s s = " q m - t i l t - b u t t o n s " >
$ { t & Pu ? p ` <button class="qm-swatch qm-slot" @click= ${ ( ) => this . call ( "cover" , "open_cover_tilt" ) } > ${ this . t ( "cover_tilt_open" ) } </button> ` : f }
$ { t & Iu ? p ` <button class="qm-swatch qm-slot" @click= ${ ( ) => this . call ( "cover" , "close_cover_tilt" ) } > ${ this . t ( "cover_tilt_close" ) } </button> ` : f }
/ > < / l a b e l > ` : t & ( N u | L u ) ? p ` < d i v c l a s s = " q m - t i l t - b u t t o n s " >
$ { t & Nu ? p ` <button class="qm-swatch qm-slot" @click= ${ ( ) => this . call ( "cover" , "open_cover_tilt" ) } > ${ this . t ( "cover_tilt_open" ) } </button> ` : f }
$ { t & Lu ? p ` <button class="qm-swatch qm-slot" @click= ${ ( ) => this . call ( "cover" , "close_cover_tilt" ) } > ${ this . t ( "cover_tilt_close" ) } </button> ` : f }
< / d i v > ` : f } r e n d e r T o g g l e ( e ) { l e t t = e . s t a t e = = = " o n " | | e . s t a t e = = = " u n l o c k e d " | | e . s t a t e = = = " p l a y i n g " , r = e . e n t i t y _ i d . s p l i t ( " . " ) [ 0 ] ; r e t u r n p ` < d i v c l a s s = " q m - r i n g q m - r i n g - s m a l l " >
< button
class = "qm-power ${t?" qm - on ":" "}"
@@ -1355,13 +1355,13 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
@ click = $ { ( ) => this . ask ( ) && ( r === "lock" ? this . call ( "lock" , t ? "lock" : "unlock" ) : this . call ( "homeassistant" , "toggle" ) ) }
>
< svg viewBox = "0 0 24 24" width = "22" height = "22" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" > < path d = "M12 3v8M6.3 6.8a8 8 0 1 0 11.4 0" / > < / s v g >
< b > $ { se ( this . hass , e ) } < / b >
< b > $ { ae ( this . hass , e ) } < / b >
< / b u t t o n >
< /div>`}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`<svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor"><path d=${h} / > < / s v g > ` , c = ( h , m , d , g = ! 1 ) = > p ` < b u t t o n c l a s s = " q m - s w a t c h q m - s l o t $ { g ? " q m - s l o t - o n " : " " } " a r i a - l a b e l = $ { m } t i t l e = $ { m } @ c l i c k = $ { d } > $ { h } < / b u t t o n > ` , u = t ? [ c ( l ( r ? " M 6 5 h 4 v 1 4 H 6 z M 1 4 5 h 4 v 1 4 h - 4 z " : " M 8 5 v 1 4 l 1 1 - 7 z " ) , t h i s . t ( r ? " m e d i a _ p a u s e " : " m e d i a _ p l a y " ) , ( ) = > t h i s . c a l l ( " m e d i a _ p l a y e r " , " m e d i a _ p l a y _ p a u s e " ) , r ) , c ( l ( " M 6 6 h 2 v 1 2 H 6 z m 3 . 5 6 8 . 5 6 V 6 z " ) , t h i s . t ( " m e d i a _ p r e v i o u s " ) , ( ) = > t h i s . c a l l ( " m e d i a _ p l a y e r " , " m e d i a _ p r e v i o u s _ t r a c k " ) ) , c ( l ( " M 1 6 6 h 2 v 1 2 h - 2 z M 6 1 8 l 8 . 5 - 6 L 6 6 z " ) , t h i s . t ( " m e d i a _ n e x t " ) , ( ) = > t h i s . c a l l ( " m e d i a _ p l a y e r " , " m e d i a _ n e x t _ t r a c k " ) ) ] : [ ] ; r e t u r n p ` < d i v c l a s s = " q m - r i n g $ { u . l e n g t h ? " " : " q m - r i n g - s m a l l " } " >
$ { this . ring ( u ) }
< button class = "qm-power ${t?" qm - on ":" "}" aria - pressed = $ { t } @ click = $ { ( ) => this . ask ( ) && this . call ( "media_player" , t ? "turn_off" : "turn_on" ) } >
< svg viewBox = "0 0 24 24" width = "22" height = "22" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" > < path d = "M12 3v8M6.3 6.8a8 8 0 1 0 11.4 0" / > < / s v g >
< b > $ { o !== null && t ? ` ${ o } % ` : se ( this . hass , e ) } < / b >
< b > $ { o !== null && t ? ` ${ o } % ` : ae ( this . hass , e ) } < / b >
< / b u t t o n >
< / d i v >
$ { a ? p ` <div class="qm-media-title"> ${ a } </div> ` : f }
@@ -1369,11 +1369,11 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
$ { s . length ? p ` <div class="qm-play-head"> ${ this . t ( "media_sources" ) } </div>
< div class = "qm-play" > $ { s . map ( h => p ` <button class="qm-chip ${ i . source === h ? "qm-chip-on" : "" } " @click= ${ ( ) => this . call ( "media_player" , "select_source" , { source : h } )}> ${ h } </button> ` ) } < / d i v > ` : f }
$ { this . presets ? . length ? p ` <div class="qm-play-head"> ${ this . t ( "presets" ) } </div>
< div class = "qm-play" > $ { this . presets . map ( h => p ` <button class="qm-chip" @click= ${ ( ) => this . call ( "media_player" , "play_media" , { media _content _type : h . type , media _content _id : h . content } )}> ${ h . label } </button> ` ) } < / d i v > ` : f } ` } r e n d e r ( ) { l e t e = t h i s . h a s s ? . s t a t e s [ t h i s . e n t i t y ] ; i f ( ! e ) r e t u r n f ; l e t t = P ( t h i s . e n t i t y ) , r = C ( e ) & & ! p n ( e ) ? p ` < p c l a s s = " q m - n o t e " > $ { s e ( t h i s . h a s s , e ) } < / p > ` : t = = = " l i g h t " ? t h i s . r e n d e r L i g h t ( e ) : t = = = " c o v e r " ? t h i s . r e n d e r C o v e r ( e ) : t = = = " m e d i a " ? t h i s . r e n d e r M e d i a ( e ) : t h i s . r e n d e r T o g g l e ( e ) ; r e t u r n p ` < d i v c l a s s = " q m " r o l e = " d i a l o g " a r i a - l a b e l = $ { O ( t h i s . h a s s , t h i s . e n t i t y ) } >
< div class = "qm-play" > $ { this . presets . map ( h => p ` <button class="qm-chip" @click= ${ ( ) => this . call ( "media_player" , "play_media" , { media _content _type : h . type , media _content _id : h . content } )}> ${ h . label } </button> ` ) } < / d i v > ` : f } ` } r e n d e r ( ) { l e t e = t h i s . h a s s ? . s t a t e s [ t h i s . e n t i t y ] ; i f ( ! e ) r e t u r n f ; l e t t = P ( t h i s . e n t i t y ) , r = ! W ( t h i s . h a s s , t h i s . e n t i t y ) | | C ( e ) & & ! g n ( e ) ? p ` < p c l a s s = " q m - n o t e " > $ { a e ( t h i s . h a s s , e ) } < / p > ` : t = = = " l i g h t " ? t h i s . r e n d e r L i g h t ( e ) : t = = = " c o v e r " ? t h i s . r e n d e r C o v e r ( e ) : t = = = " m e d i a " ? t h i s . r e n d e r M e d i a ( e ) : t h i s . r e n d e r T o g g l e ( e ) ; r e t u r n p ` < d i v c l a s s = " q m " r o l e = " d i a l o g " a r i a - l a b e l = $ { O ( t h i s . h a s s , t h i s . e n t i t y ) } >
< div class = "qm-title" > $ { O ( this . hass , this . entity ) } < / d i v >
$ { r }
< button class = "qm-details" @ click = $ { ( ) => this . details ( ) } > $ { this . t ( "details" ) } … < / b u t t o n >
< / d i v > ` } s t a t i c s t y l e s = [ y e , J `
< / d i v > ` } s t a t i c s t y l e s = [ v e , Q `
. qm - play - head {
margin : 10 px 0 4 px ;
font - size : 11 px ;
@@ -1616,7 +1616,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. qm - note {
color : var ( -- nf - muted ) ;
}
` ]};function Jf(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",es);var Qf=new URL(import.meta.url),Xf=new URL("./nextfloor-3d.js?v=3c3ea11cac21",Qf).href,Cu;function Nu(){return Cu??=import(Xf),Cu}function Lu(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 Ou="weather.nextfloor_symcon",Bu={condition:"Wetterzustand",temperature:"Au \x DFentemperatur",humidity:"Au \x DFenluftfeuchte",pressure:"Luftdruck",wind_speed:"Windgeschwindigkeit",wind_gust_speed:"Windb \x F6en",wind_bearing:"Windrichtung",cloud_coverage:"Bew \x F6lkung",precipitation:"Niederschlagsrate",precipitation_total:"Niederschlagsmenge",illuminance:"Au \x DFenhelligkeit",uv_index:"UV-Index",visibility:"Sichtweite",snow:"Schnee",fog:"Nebel",lightning:"Gewitter"},Wu=new WeakMap;function eg(n){let e=n.toLowerCase().normalize("NFD").replace(/[ \u 0300- \u 036f]/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 ui(n,e){if(!V(n))return n;let t=e.weather_variables??{};if(!e.rain_sensor&&!Object.values(t).some(d=>d&&d!=="none"))return n;let r=Wu.get(n)??new WeakMap;Wu.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),_=ge(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),_=ge(g);_!==null&&(o[d]=ti(_,g?.attributes.unit_of_measurement))}o.wind_speed_unit="km/h";let a=fe(s("wind_bearing"));a!==null&&(o.wind_bearing=a);let l=eg(De(s("condition"))),c=e.rain_sensor?n.states[e.rain_sensor]:void 0,u=le(c);u!==null&&e.rain_sensor_inverted&&(u=!u),u===null&&typeof o.precipitation=="number"&&(u=o.precipitation>0),le(s("lightning"))?l=u?"lightning-rainy":"lightning":le(s("snow"))?l=u?"snowy-rainy":"snowy":le(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:Ou,state:l??"unknown",attributes:o},m={...n,states:{...n.states,[Ou]:h}};return r.set(e,m),m}var rs=class extends Q{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 ` < span class = "value" title = $ { ` ${ Vt ( e ) } ${ e . manual ? " \xB7 eigener Z\xE4hler" : "" } ` } > < b > $ { Ne ( this . hass , e ) } < / b > $ { e . p e r i o d ! = = " t o t a l " ? p ` < s m a l l > $ { { d a y : " h e u t e " , m o n t h : " M o n a t " , y e a r : " J a h r " } [ e . p e r i o d ] } < / s m a l l > ` : f } $ { G ( t h i s . h a s s , e . s o u r c e s , ` $ { I e [ e . k i n d ] } \ x B 7 $ { V t ( e ) } ` ) } < / s p a n > ` : f } o p e n ( e , t ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( " u t i l i t y - o p e n " , { d e t a i l : { f l o o r I d : t ? t h i s . f l o o r I d : e , r o o m I d : t ? e : n u l l } , b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } r o w s ( e ) { r e t u r n O e . m a p ( t = > { l e t r = e . f i l t e r ( o = > o . k i n d = = = t & & o . m e t r i c = = = " p o w e r " ) , i = e . f i l t e r ( o = > o . k i n d = = = t & & o . m e t r i c = = = " e n e r g y " ) ; r e t u r n A r r a y . f r o m ( { l e n g t h : M a t h . m a x ( r . l e n g t h , i . l e n g t h ) } , ( o , s ) = > p ` < d i v c l a s s = " r o w " > < s p a n c l a s s = " k i n d " t i t l e = $ { I e [ t ] } > $ { s ? " " : ` $ { A n [ t ] } $ { I e [ t ] } ` } < / s p a n > $ { r [ s ] ? t h i s . v a l u e ( r [ s ] ) : p ` < s p a n > < / s p a n > ` } $ { i [ s ] ? t h i s . v a l u e ( i [ s ] ) : p ` < s p a n > < / s p a n > ` } < / d i v > ` ) } ) } r e n d e r ( ) { i f ( ! t h i s . h a s s ) r e t u r n f ; l e t e = t h i s . f l o o r s . f l a t M a p ( s = > s . r o o m s ) , t = t h i s . f l o o r s . f i n d ( s = > s . i d = = = t h i s . f l o o r I d ) ; i f ( t h i s . i n l i n e ) { l e t s = t ? C e ( t h i s . h a s s , t , e ) : O l ( t h i s . h a s s , t h i s . f l o o r s ) ; r e t u r n p ` $ { O e . m a p ( a = > { l e t l = s . f i l t e r ( c = > c . k i n d = = = a ) ; r e t u r n l . l e n g t h ? p ` < d i v c l a s s = " m e t e r " a r i a - l a b e l = $ { ` $ { t ? . n a m e | | " G e s a m t g e b \ x E 4 u d e " } \ x B 7 $ { I e [ a ] } ` } > < s p a n c l a s s = " m e d i u m " t i t l e = $ { t ? . n a m e | | " G e s a m t g e b \ x E 4 u d e " } > $ { A n [ a ] } $ { I e [ a ] } < / s p a n > < d i v c l a s s = " v a l u e s " > $ { l . m a p ( c = > t h i s . v a l u e ( c ) ) } < / d i v > < / d i v > ` : f } ) } ` } l e t i = ( t ? B t ( t h i s . h a s s , t , e , ! 0 ) . m a p ( s = > ( { . . . s , h a s D e t a i l s : s . r o o m s . l e n g t h > 0 } ) ) : [ . . . t h i s . f l o o r s ] . s o r t ( ( s , a ) = > a . e l e v a t i o n - s . e l e v a t i o n ) . m a p ( s = > ( { i d : s . i d , n a m e : s . n a m e , p a t h : " " , r e a d i n g s : C e ( t h i s . h a s s , s , e ) , r o o m s : [ ] , h a s D e t a i l s : B t ( t h i s . h a s s , s , e , ! 0 ) . l e n g t h > 0 } ) ) ) . f i l t e r ( s = > s . r e a d i n g s . l e n g t h | | s . h a s D e t a i l s ) ; i f ( ! i . l Line truncated
` ]};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 \x DFentemperatur",humidity:"Au \x DFenluftfeuchte",pressure:"Luftdruck",wind_speed:"Windgeschwindigkeit",wind_gust_speed:"Windb \x F6en",wind_bearing:"Windrichtung",cloud_coverage:"Bew \x F6lkung",precipitation:"Niederschlagsrate",precipitation_total:"Niederschlagsmenge",illuminance:"Au \x DFenhelligkeit",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(/[ \u 0300- \u 036f]/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 ` < span class = "value" title = $ { ` ${ Gt ( e ) } ${ e . manual ? " \xB7 eigener Z\xE4hler" : "" } ` } > < b > $ { Le ( this . hass , e ) } < / b > $ { e . p e r i o d ! = = " t o t a l " ? p ` < s m a l l > $ { { d a y : " h e u t e " , m o n t h : " M o n a t " , y e a r : " J a h r " } [ e . p e r i o d ] } < / s m a l l > ` : f } $ { U ( t h i s . h a s s , e . s o u r c e s , ` $ { C e [ e . k i n d ] } \ x B 7 $ { G t ( e ) } ` ) } < / s p a n > ` : f } o p e n ( e , t ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( " u t i l i t y - o p e n " , { d e t a i l : { f l o o r I d : t ? t h i s . f l o o r I d : e , r o o m I d : t ? e : n u l l } , b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } r o w s ( e ) { r e t u r n W e . m a p ( t = > { l e t r = e . f i l t e r ( o = > o . k i n d = = = t & & o . m e t r i c = = = " p o w e r " ) , i = e . f i l t e r ( o = > o . k i n d = = = t & & o . m e t r i c = = = " e n e r g y " ) ; r e t u r n A r r a y . f r o m ( { l e n g t h : M a t h . m a x ( r . l e n g t h , i . l e n g t h ) } , ( o , s ) = > p ` < d i v c l a s s = " r o w " > < s p a n c l a s s = " k i n d " t i t l e = $ { C e [ t ] } > $ { s ? " " : ` $ { R n [ t ] } $ { C e [ t ] } ` } < / s p a n > $ { r [ s ] ? t h i s . v a l u e ( r [ s ] ) : p ` < s p a n > < / s p a n > ` } $ { i [ s ] ? t h i s . v a l u e ( i [ s ] ) : p ` < s p a n > < / s p a n > ` } < / d i v > ` ) } ) } r e n d e r ( ) { i f ( ! t h i s . h a s s ) r e t u r n f ; l e t e = t h i s . f l o o r s . f l a t M a p ( s = > s . r o o m s ) , t = t h i s . f l o o r s . f i n d ( s = > s . i d = = = t h i s . f l o o r I d ) ; i f ( t h i s . i n l i n e ) { l e t s = t ? N e ( t h i s . h a s s , t , e ) : V l ( t h i s . h a s s , t h i s . f l o o r s ) ; r e t u r n p ` $ { W e . m a p ( a = > { l e t l = s . f i l t e r ( c = > c . k i n d = = = a ) ; r e t u r n l . l e n g t h ? p ` < d i v c l a s s = " m e t e r " a r i a - l a b e l = $ { ` $ { t ? . n a m e | | " G e s a m t g e b \ x E 4 u d e " } \ x B 7 $ { C e [ a ] } ` } > < s p a n c l a s s = " m e d i u m " t i t l e = $ { t ? . n a m e | | " G e s a m t g e b \ x E 4 u d e " } > $ { R n [ a ] } $ { C e [ a ] } < / s p a n > < d i v c l a s s = " v a l u e s " > $ { l . m a p ( c = > t h i s . v a l u e ( c ) ) } < / d i v > < / d i v > ` : f } ) } ` } l e t i = ( t ? K t ( t h i s . h a s s , t , e , ! 0 ) . m a p ( s = > ( { . . . s , h a s D e t a i l s : s . r o o m s . l e n g t h > 0 } ) ) : [ . . . t h i s . f l o o r s ] . s o r t ( ( s , a ) = > a . e l e v a t i o n - s . e l e v a t i o n ) . m a p ( s = > ( { i d : s . i d , n a m e : s . n a m e , p a t h : " " , r e a d i n g s : N e ( t h i s . h a s s , s , e ) , r o o m s : [ ] , h a s D e t a i l s : K t ( t h i s . h a s s , s , e , ! 0 ) . l e n g t h > 0 } ) ) ) . f i l t e r ( s = > s . r e a d i n g s . l e n g t h | | s . h a s D e t a i l s ) ; i f ( ! i . l Line truncated
< button class = "heading" aria - expanded = $ { ! o } @ click = $ { ( ) => { this . folded = ! o } } > < span > $ { t ? "Bereiche" : "Stockwerke" } < small > $ { t ? . name || "Gesamtgeb\xE4ude" } < / s m a l l > < / s p a n > < s p a n a r i a - h i d d e n = " t r u e " > $ { o ? " + " : " \ u 2 2 1 2 " } < / s p a n > < / b u t t o n >
$ { o ? f : p ` <div class="entries"><div class="columns"><span></span><span title="Leistung bzw. Durchfluss">Leistung</span><span>Energie / Verbrauch</span></div>
$ { i . map ( s => p ` <section class="entry" data-area= ${ t ? s . id : f } >
@@ -1627,7 +1627,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< / s e c t i o n > ` ) }
< / s e c t i o n > ` ) }
< / d i v > ` }
< / s e c t i o n > ` } s t a t i c s t y l e s = J `
< / s e c t i o n > ` } s t a t i c s t y l e s = Q `
: host { display : flex ; width : 100 % ; min - height : 0 ; max - height : 100 % ; color : var ( -- nf - text ) ; font : 12 px / 1.4 system - ui , sans - serif ; pointer - events : auto ; }
: host ( [ inline ] ) { display : flex ; flex - wrap : wrap ; align - items : stretch ; gap : 6 px ; width : auto ; max - width : 100 % ; }
. meter { padding : 5 px 9 px ; border - radius : 10 px ; background : var ( -- nf - chrome ) ; border - left : 2 px solid var ( -- nf - line ) ; backdrop - filter : blur ( 6 px ) ; }
@@ -1660,43 +1660,43 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. kind { color : var ( -- nf - muted ) ; font - size : 10 px ; white - space : nowrap ; }
. row . value b { font - size : 11 px ; font - weight : normal ; }
@ media ( max - width : 600 px ) { . entries { max - height : 32 vh ; } }
` };customElements.get("nf-utility-overview")||customElements.define("nf-utility-overview",rs);var Vu="image:";function is(n,e,t){let r=(e??"").trim();if(!r)return null;if(r.startsWith(Vu))return t(r.slice(Vu.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 Bn=n=>Number(n);function Kn(n){if(Array.isArray(n)){let[o,s]=[Bn(n[0]),Bn(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]=[Bn(e),Bn(t)];return Number.isFinite(r)&&Number.isFinite(i)?[r,i]:null}function Ku(n){return n?Kn(n.charger)??Kn(n.charger_position):null}function Gu(n){for(let[e,t]of Object.entries(n.states))if(e.startsWith("camera.")&&(Kn(t.attributes?.vacuum_position)??Ku(t.attributes)))return e;return null}var tg=n=>Array.isArray(n)?typeof n[0]=="number":!!n&&typeof n=="object",Vn=(n,e)=>e?[n[0],-n[1]]:n;function ng(n){if(!n)return null;let e=n.mirror===!0,[t,r]=Vn(n.ga,e),[i,o]=Vn(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,k]=[Math.cos(y),Math.sin(y)];return M=>{let z=Vn(M,e),[E,D]=[z[0]-t,z[1]-r];return[s+b*(E*S-D*k),a+b*(E*k+D*S)]}}function rg(n){if(!n)return null;let e=n.mirror===!0,[t,r]=Vn(n.ga,e),[i,o]=Vn(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 Uu(n,e,t){if(!e)return null;let r=n.states[e]?.attributes;if(!r)return null;let i=ng(t)??(g=>g),o=rg(t)??0,s=t?.mirror===!0?-1:1,a=r.vacuum_position,l=Kn(a),c=l?(()=>{let[g,_]=i(l),b=Bn(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=Ku(r),h=Array.isArray(r.path)?r.path:[],m=h.length>0&&tg(h[0])?[h]:h,d=[];for(let g of m){let _=[];for(let b of Array.isArray(g)?g:[]){let y=Kn(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 ju="nextfloor.lock3d",qu=520,ss=class extends Q{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
Line truncated
` };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
Line truncated
$ { e . map ( t => p ` <button class="nf-chip" aria-pressed= ${ ! this . hiddenLayers . has ( t . id ) } @click= ${ ( ) => this . toggleLayer ( t . id ) } > ${ this . hiddenLayers . has ( t . id ) ? "\u25CC" : "\u{1F441}" } ${ t . name } </button> ` ) }
< /div>`}syncDevices(e){let t=this.viewer,r=this.building;if(!t||!r||!this.hass)return;let i=this._travel,o=i&&!i.loading?Ut(this.hass,i.history,i.t):this.hass;if((e||!this.openingLinks||this.linkedRegistry!==o.entities)&&(this.openingLinks=Be(o,r.floors),this.furnitureLinks=Ke(o,r.floors),this.linkedRegistry=o.entities,this.findIndex=null,this.alertSrc=this.alerts?Dc(o,r,this.weatherEntityId,this.openingLinks):null,this.watched=Oc({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;uo(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=Sn(o,r),l=rl(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=$n(o,r,a,Ze(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=bt(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 x of v.outdoor??[]){if(!x.area_id&&!x.temp_entity&&!x.pump_entity)continue;let B=x.temp_entity?o.states[x.temp_entity]:void 0,F=x.pump_entity?o.states[x.pump_entity]:void 0,[W,_e]=Te(x.points),ct=B&&Number.isFinite(Number(B.state))?`${L(o,ce(o,fr(Number(B.state),B.attributes.unit_of_measurement)),1)} ${re(o)}`:"",$t=!!F&&te(F);l.push({id:x.area_id?`outdoor:${x.id}`:x.pump_entity??x.temp_entity,floorId:v.id,roomId:null,x:W,z:_e,y:cr(v,x,W,_e)+.7,icon:Fe(x.type==="pool"?"pool":x.type==="terrace"?"table-chair":"tree-outline"),name:x.area_id&&o.areas?.[x.area_id]?.name||$(o,`out_${x.type}`),text:[ct,$t?$(o,"pool_pump_on"):""].filter(Boolean).join(" \xB7 "),active:$t,unavailable:!1,glow:null,show:"always"})}let d=new Map;for(let v of r.floors){for(let x of v.placements)x.pin_offset&&d.set(`${v.id}:${x.entity_id}`,x.pin_offset);for(let x of v.furniture)x.pin_offset&&d.set(`f:${x.id}`,x.pin_offset)}let g=v=>{let x=v.lamp?void 0:(v.furnitureId?d.get(`f:${v.furnitureId}`):void 0)??d.get(`${v.floorId}:${v.id}`);return x?{...v,x:v.x+(x.x??0),z:v.z+(x.z??0),y:v.y+(x.y??0)}:v};t.setDevices([...[...l,...c.markers].map(g).map(v=>{let x=v.show==="no_power"||"energyDevice"in v&&v.energyDevice?null:h.get(v.id)??null,B={...v,power:x,powerText:x===null?void 0:he(o,x),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:"",W=m.has(v.id)||!!v.furnitureId&&m.has(v.furnitureId);return{...B,pin:this.showPin(B)&&!W,full:v.show==="always",caption:F}})]),t.setPickTargets(c.targets,this.openingTargets(),this.secondBlinds()),t.setScreens(c.screens),t.setFridgeDoors(Na(o,r.floors)),t.setCovers(Za(o,r)),t.setRobots(this.robotInfos(o,r));let _=new Map;for(let v of r.floors)for(let x of v.furniture)!X(x.type)?.pet||!x.room_sensor||x.room_sensor==="none"||_.set(x.id,Ji(o,v.rooms.filter(B=>B.points.length>=3),null,x.room_sensor)?.id??null);_.size&&t.setPetRooms(_),t.setRoofWindows(Rc(o,r)),t.setParked(Po(o,r)),t.setGateStates(Uc(o,r));let b=new Map(r.floors.flatMap(v=>v.openings.map(x=>[x.id,x.type]))),y=new Map([...this.openingLinks].map(([v,x])=>[v,Ve(o,x,b.get(v))]));t.setOpeningStates(y),this.setAlerts(this.alertSrc?Fo(o,r,this.alertSrc,this.openingLinks):[]),this.watchLostContacts(o);let S=[...l,...c.markers].map(v=>`${v.id}:${v.glow?`${v.glow.level.toFixed(1)}/ $ { v . glow . color . map ( x => x . toFixed ( 1 ) ) . join ( "/" ) } ` :0} ` ) . join ( ";" ) + "|" + [ ... y ] . map ( ( [ v , x ] ) => ` ${ v } : ${ x . open } : ${ x . cover === null ? "-" : x . cover . toFixed ( 1 ) } ` ) . join ( ";" ) ; if ( S !== this . thumbSig ) { let v = this . thumbSig === "" ; this . thumbSig = S , v || this . scheduleThumbs ( 1500 ) } let k = su ( o , r , a , r . energy . advanced ? v => this . furnitureLinks ? . get ( v . id ) ? . power ? ? null : void 0 ) , M = this . liveCars ( o , r ) ; for ( let v of M ) { if ( ! v . car . home || ! v . car . charging && ! v . car . plugged ) continue ; let x = r . floors . flatMap ( W => W . furniture . filter ( _e => _e . type === "wallbox" ) . map ( _e => ( { floorId : W . id , x : _e . x , z : _e . z , y : 1 } ) ) ) . sort ( ( W , _e ) => Math . hypot ( W . x - v . at . x , W . z - v . at . z ) - Math . hypot ( _e . x - v . at . x , _e . z - v . at . z ) ) [ 0 ] , B = x && x . floorId === v . at . floorId && Math . hypot ( x . x - v . at . x , x . z - v . at . z ) < 9 , F = x ? ? Nn ( r ) ; ! F || ! v . car . charging && ! B || k . 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 ] , ... B ? { 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 = Nn ( r ) ; for ( let v of this . liveHeatPumps ( r ) ) { let x = v . pump . heat ? ? ( v . Line truncated
< button class = "nf-thumbs-fold" title = $ { $ ( this . hass , r ? "thumbs_show" : "thumbs_fold" ) } aria - label = $ { $ ( this . hass , r ? "thumbs_show" : "thumbs_fold" ) } @ click = $ { i } > $ { r ? "\u25B8" : "\u25C2" } < / b u t t o n >
< /div>`}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=yt(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),ut=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:[ut,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 Line truncated
< button class = "nf-thumbs-fold" title = $ { M ( this . hass , r ? "thumbs_show" : "thumbs_fold" ) } aria - label = $ { M ( this . hass , r ? "thumbs_show" : "thumbs_fold" ) } @ click = $ { i } > $ { r ? "\u25B8" : "\u25C2" } < / b u t t o n >
< button class = "nf-thumb nf-thumb-house" aria - pressed = $ { this . floorId === null } @ click = $ { ( ) => this . fire ( "floor-tap" , { floorId : null } ) } >
< svg viewBox = "0 0 24 24" width = "18" height = "18" fill = "none" stroke = "currentColor" stroke - width = "1.8" stroke - linejoin = "round" > < path d = "M3 11l9-7 9 7M5 10v10h14V10" / > < / s v g >
< span > $ { $ ( this . hass , "all_floors" ) } < / s p a n >
< span > $ { M ( this . hass , "all_floors" ) } < / s p a n >
< / b u t t o n >
$ { t . map ( o => p ` <button class="nf-thumb" aria-pressed= ${ this . floorId === o . floorId } @click= ${ ( ) => this . fire ( "floor-tap" , { floorId : o . floorId } )}>
$ { r ? f : p ` <img src= ${ o . url } alt="" /> ` }
< span > $ { e . get ( o . floorId ) ? ? "" } < / s p a n >
< / b u t t o n > ` ) }
< / n a v > ` } o n D e v i c e H o l d ( e , t , r ) { l e t i = P ( e ) ; i = = = " l i g h t " | | i = = = " c o v e r " | | i = = = " s w i t c h " | | i = = = " f a n " | | i = = = " l o c k " ? t h i s . _ m e n u = { e n t i t y : e , x : t , y : r } : k e ( t h i s , e ) } o n D e v i c e S w i p e ( e , t , r , i , o ) { l e t s = t h i s . h a s s ? . s t a t e s [ e ] ; i f ( t = = = " s t a r t " ) { i f ( ! s | | C ( s ) | | t h i s . c o n f i r m S e t . h a s ( e ) ) r e t u r n ! 1 ; l e t l = P ( e ) ; i f ( l = = = " l i g h t " & & t s ( s ) . d i m ) { l e t c = s . s t a t e = = = " o n " ? t y p e o f s . a t t r i b u t e s . b r i g h t n e s s = = " n u m b e r " ? M a t h . r o u n d ( s . a t t r i b u t e s . b r i g h t n e s s / 2 . 5 5 ) : 1 0 0 : 0 ; r e t u r n t h i s . _ s w i p e = { e n t i t y : e , k i n d : " l i g h t " , s t a r t : c , v a l u e : c , x : i , y : o } , ! 0 } i f ( l = = = " f a n " & & t y p e o f s . a t t r i b u t e s . p e r c e n t a g e _ s t e p = = " n u m b e r " ) { l e t c = s . s t a t e = = = " o n " & & t y p e o f s . a t t r i b u t e s . p e r c e n t a g e = = " n u m b e r " ? s . a t t r i b u t e s . p e r c e n t a g e : 0 ; r e t u r n t h i s . _ s w i p e = { e n t i t y : e , k i n d : " f a n " , s t a r t : c , v a l u e : c , x : i , y : o } , ! 0 } i f ( l = = = " c o v e r " & & n s ( s ) ) { l e t c = s . a t t r i b u t e s . c u r r e n t _ p o s i t i o n ; r e t u r n t h i s . _ s w i p e = { e n t i t y : e , k i n d : " c o v e r " , s t a r t : c , v a l u e : c , x : i , y : o } , ! 0 } r e t u r n ! 1 } l e t a = t h i s . _ s w i p e ; i f ( ! a | | a . e n t i t y ! = = e ) r e t u r n ! 1 ; i f ( t = = = " m o v e " ) { l e t l = M a t h . r o u n d ( M a t h . m i n ( 1 0 0 , M a t h . m a x ( 0 , a . s t a r t - r / 2 2 0 * 1 0 0 ) ) ) ; l ! = = a . v a l u e & & ( t h i s . _ s w i p e = { . . . a , v a l u e : l } ) ; l e t c = p e r f o r m a n c e . n o w ( ) ; c - t h i s . s w i p e S e n t > 3 5 0 & & ( t h i s . s w i p e S e n t = c , t h i s . a p p l y S w i p e ( ) ) } e l s e t h i s . a p p l y S w i p e ( ) , c l e a r T i m e o u t ( t h i s . s w i p e T i m e r ) , t h i s . s w i p e T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ s w i p e = n u l l , 7 0 0 ) ; r e t u r n ! 0 } a p p l y S w i p e ( ) { l e t e = t h i s . _ s w i p e ; ! e | | ! t h i s . h a s s | | ( e . k i n d = = = " l i g h t " ? e . v a l u e < = 0 ? t h i s . h a s s . c a l l S e r v i c e ( " l i g h t " , " t u r n _ o f f " , { e n t i t y _ i d : e . e n t i t y } ) : t h i s . h a s s . c a l l S e r v i c e ( " l i g h t " , " t u r n _ o n " , { e n t i t y _ i d : e . e n t i t y , b r i g h t n e s s _ p c t : e . v a l u e } ) : e . k i n d = = = " f a n " ? e . v a l u e < = 0 ? t h i s . h a s s . c a l l S e r v i c e ( " f a n " , " t u r n _ o f f " , { e n t i t y _ i d : e . e n t i t y } ) : t h i s . h a s s . c a l l S e r v i c e ( " f a n " , " s e t _ p e r c e n t a g e " , { e n t i t y _ i d : e . e n t i t y , p e r c e n t a g e : e . v a l u e } ) : t h i s . h a s s . c a l l S e r v i c e ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { e n t i t y _ i d : e . e n t i t y , p o s i t i o n : e . v a l u e } ) ) } o p e n R o o m ( e , t ) { t h i s . f l o o r I d = = = e & & t h i s . r o o m I d = = = t | | ( t h i s . f l o o r I d ! = = e ? ( t h i s . f i r e ( " f l o o r - t a p " , { f l o o r I d : e } ) , s e t T i m e o u t ( ( ) = > t h i s . f i r e ( " r o o m - t a p " , { f l o o r I d : e , r o o m I d : t } ) , 6 0 ) ) : t h i s . f i r e ( " r o o m - t a p " , { f l o o r I d : e , r o o m I d : t } ) ) } g o T o ( e ) { i f ( t h i s . _ f i n d = n u l l , e . k i n d = = = " r o o m " | | e . k i n d = = = " c i r c u i t " ) { e . r o o m I d & & t h i s . o p e n R o o m ( e . f l o o r I d , e . r o o m I d ) ; r e t u r n } t h i s . f l o o r I d ! = = e . f l o o r I d & & t h i s . f i r e ( " f l o o r - t a p " , { f l o o r I d : e . f l o o r I d } ) , s e t T i m e o u t ( ( ) = > t h i s . v i e w e r ? . f o c u s ( e . f l o o r I d , e . x , e . z , e . y , e . e n t i t y ) , 1 2 0 ) } l i s t e n T o A n n o u n c e m e n t s ( e ) { i f ( ! e ) { t h i s . s t o p A n n o u n c e m e n t s ? . ( ) , t h i s . s t o p A n n o u n c e m e n t s = n u l l , c l e a r T i m e o u t ( t h i s . a n n o u n c e T i m e r ) ; r e t u r n } i f ( t h i s . s t o p A n n o u n c e m e n t s ) r e t u r n ; l e t t = ! 1 ; t h i s . s t o p A n n o u n c e m e n t s = ( ) = > t = ! 0 , h l ( t h i s . h a s s , r = > t h i s . a n n o u n c e ( r ) ) . t h e n ( r = > { t ? r ( ) : t h i s . s t o p A n n o u n c e m e n t s = r } ) } a n n o u n c e ( e ) { l e t t = e ; i f ( t ? . r e l o a d = = = ! 0 ) { ( ! t . t e m p l a t e | | t . t e m p l a t e = = = t h i s . t e m p l a t e N a m e ) & & s e t T i m e o u t ( ( ) = > l o c a t i o n . r e l o a d ( ) , 5 0 0 + M a t h . r a n d o m ( ) * 6 e 3 ) ; r e t u r n } i f ( t y p e o f e ? . m e s s a g e ! = " s t r i n g " | | ! e . m e s s a g e . t r i m ( ) | | ! l l ( e , t h i s . s c r e e n N a m e ) | | ! c l ( e ) ) r e t u r n ; l e t r = u l ( e . m e s s a g e ) ; t h i s . _ a n n o u n c e m e n t = { m e s s a g e : e . m e s s a g e , u n t i l : D a t e . n o w ( ) + r } , c l e a r T i m e o u t ( t h i s . a n n o u n c e T i m e r ) , t h i s . a n n o u n c e T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ a n n o u n c e m e n t = n u l l , r ) , d l ( t h i s . h a s s , e ) } r e n d e r A n n o u n c e m e n t ( ) { l e t e = t h i s . _ a n n o u n c e m e n t ; r e t u r n e ? p ` < b u t t o n c l a s s = " n f - a n n o u n c e m e n t " r o l e = " a l e r t " t i t l e = $ { $ ( t h i s . h a s s , " c l o s e " ) } @ c l i c k = $ { ( ) = > t h i s . _ a n n o u n c e m e n t = n u l l } >
< / n a v > ` } o n D e v i c e H o l d ( e , t , r ) { l e t i = P ( e ) ; i = = = " l i g h t " | | i = = = " c o v e r " | | i = = = " s w i t c h " | | i = = = " f a n " | | i = = = " l o c k " ? t h i s . _ m e n u = { e n t i t y : e , x : t , y : r } : S e ( t h i s , e ) } o n D e v i c e S w i p e ( e , t , r , i , o ) { l e t s = t h i s . h a s s ? . s t a t e s [ e ] ; i f ( t = = = " s t a r t " ) { i f ( ! s | | C ( s ) | | ! W ( t h i s . h a s s , e ) | | t h i s . c o n f i r m S e t . h a s ( e ) ) r e t u r n ! 1 ; l e t l = P ( e ) ; i f ( l = = = " l i g h t " & & i s ( s ) . d i m ) { l e t c = s . s t a t e = = = " o n " ? t y p e o f s . a t t r i b u t e s . b r i g h t n e s s = = " n u m b e r " ? M a t h . r o u n d ( s . a t t r i b u t e s . b r i g h t n e s s / 2 . 5 5 ) : 1 0 0 : 0 ; r e t u r n t h i s . _ s w i p e = { e n t i t y : e , k i n d : " l i g h t " , s t a r t : c , v a l u e : c , x : i , y : o } , ! 0 } i f ( l = = = " f a n " & & t y p e o f s . a t t r i b u t e s . p e r c e n t a g e _ s t e p = = " n u m b e r " ) { l e t c = s . s t a t e = = = " o n " & & t y p e o f s . a t t r i b u t e s . p e r c e n t a g e = = " n u m b e r " ? s . a t t r i b u t e s . p e r c e n t a g e : 0 ; r e t u r n t h i s . _ s w i p e = { e n t i t y : e , k i n d : " f a n " , s t a r t : c , v a l u e : c , x : i , y : o } , ! 0 } i f ( l = = = " c o v e r " & & o s ( s ) ) { l e t c = s . a t t r i b u t e s . c u r r e n t _ p o s i t i o n ; r e t u r n t h i s . _ s w i p e = { e n t i t y : e , k i n d : " c o v e r " , s t a r t : c , v a l u e : c , x : i , y : o } , ! 0 } r e t u r n ! 1 } l e t a = t h i s . _ s w i p e ; i f ( ! a | | a . e n t i t y ! = = e ) r e t u r n ! 1 ; i f ( t = = = " m o v e " ) { l e t l = M a t h . r o u n d ( M a t h . m i n ( 1 0 0 , M a t h . m a x ( 0 , a . s t a r t - r / 2 2 0 * 1 0 0 ) ) ) ; l ! = = a . v a l u e & & ( t h i s . _ s w i p e = { . . . a , v a l u e : l } ) ; l e t c = p e r f o r m a n c e . n o w ( ) ; c - t h i s . s w i p e S e n t > 3 5 0 & & ( t h i s . s w i p e S e n t = c , t h i s . a p p l y S w i p e ( ) ) } e l s e t h i s . a p p l y S w i p e ( ) , c l e a r T i m e o u t ( t h i s . s w i p e T i m e r ) , t h i s . s w i p e T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ s w i p e = n u l l , 7 0 0 ) ; r e t u r n ! 0 } a p p l y S w i p e ( ) { i f ( t h i s . _ s w i p e & & ! W ( t h i s . h a s s , t h i s . _ s w i p e . e n t i t y ) ) r e t u r n ; l e t e = t h i s . _ s w i p e ; ! e | | ! t h i s . h a s s | | ( e . k i n d = = = " l i g h t " ? e . v a l u e < = 0 ? t h i s . h a s s . c a l l S e r v i c e ( " l i g h t " , " t u r n _ o f f " , { e n t i t y _ i d : e . e n t i t y } ) : t h i s . h a s s . c a l l S e r v i c e ( " l i g h t " , " t u r n _ o n " , { e n t i t y _ i d : e . e n t i t y , b r i g h t n e s s _ p c t : e . v a l u e } ) : e . k i n d = = = " f a n " ? e . v a l u e < = 0 ? t h i s . h a s s . c a l l S e r v i c e ( " f a n " , " t u r n _ o f f " , { e n t i t y _ i d : e . e n t i t y } ) : t h i s . h a s s . c a l l S e r v i c e ( " f a n " , " s e t _ p e r c e n t a g e " , { e n t i t y _ i d : e . e n t i t y , p e r c e n t a g e : e . v a l u e } ) : t h i s . h a s s . c a l l S e r v i c e ( " c o v e r " , " s e t _ c o v e r _ p o s i t i o n " , { e n t i t y _ i d : e . e n t i t y , p o s i t i o n : e . v a l u e } ) ) } o p e n R o o m ( e , t ) { t h i s . f l o o r I d = = = e & & t h i s . r o o m I d = = = t | | ( t h i s . f l o o r I d ! = = e ? ( t h i s . f i r e ( " f l o o r - t a p " , { f l o o r I d : e } ) , s e t T i m e o u t ( ( ) = > t h i s . f i r e ( " r o o m - t a p " , { f l o o r I d : e , r o o m I d : t } ) , 6 0 ) ) : t h i s . f i r e ( " r o o m - t a p " , { f l o o r I d : e , r o o m I d : t } ) ) } g o T o ( e ) { i f ( t h i s . _ f i n d = n u l l , e . k i n d = = = " r o o m " | | e . k i n d = = = " c i r c u i t " ) { e . r o o m I d & & t h i s . o p e n R o o m ( e . f l o o r I d , e . r o o m I d ) ; r e t u r n } t h i s . f l o o r I d ! = = e . f l o o r I d & & t h i s . f i r e ( " f l o o r - t a p " , { f l o o r I d : e . f l o o r I d } ) , s e t T i m e o u t ( ( ) = > t h i s . v i e w e r ? . f o c u s ( e . f l o o r I d , e . x , e . z , e . y , e . e n t i t y ) , 1 2 0 ) } l i s t e n T o A n n o u n c e m e n t s ( e ) { i f ( ! e ) { t h i s . s t o p A n n o u n c e m e n t s ? . ( ) , t h i s . s t o p A n n o u n c e m e n t s = n u l l , c l e a r T i m e o u t ( t h i s . a n n o u n c e T i m e r ) ; r e t u r n } i f ( t h i s . s t o p A n n o u n c e m e n t s ) r e t u r n ; l e t t = ! 1 ; t h i s . s t o p A n n o u n c e m e n t s = ( ) = > t = ! 0 , g l ( t h i s . h a s s , r = > t h i s . a n n o u n c e ( r ) ) . t h e n ( r = > { t ? r ( ) : t h i s . s t o p A n n o u n c e m e n t s = r } ) } a n n o u n c e ( e ) { l e t t = e ; i f ( t ? . r e l o a d = = = ! 0 ) { ( ! t . t e m p l a t e | | t . t e m p l a t e = = = t h i s . t e m p l a t e N a m e ) & & s e t T i m e o u t ( ( ) = > l o c a t i o n . r e l o a d ( ) , 5 0 0 + M a t h . r a n d o m ( ) * 6 e 3 ) ; r e t u r n } i f ( t y p e o f e ? . m e s s a g e ! = " s t r i n g " | | ! e . m e s s a g e . t r i m ( ) | | ! h l ( e , t h i s . s c r e e n N a m e ) | | ! m l ( e ) ) r e t u r n ; l e t r = p l ( e . m e s s a g e ) ; t h i s . _ a n n o u n c e m e n t = { m e s s a g e : e . m e s s a g e , u n t i l : D a t e . n o w ( ) + r } , c l e a r T i m e o u t ( t h i s . a n n o u n c e T i m e r ) , t h i s . a n n o u n c e T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ a n n o u n c e m e n t = n u l l , r ) , f l ( t h i s . h a s s , e ) } r e n d e r A n n o u n c e m e n t ( ) { l e t e = t h i s . _ a n n o u n c e m e n t ; r e t u r n e ? p ` < b u t t o n c l a s s = " n f - a n n o u n c e m e n t " r o l e = " a l e r t " t i t l e = $ { M ( t h i s . h a s s , " c l o s e " ) } @ c l i c k = $ { ( ) = > t h i s . _ a n n o u n c e m e n t = n u l l } >
< span class = "nf-announcement-icon" aria - hidden = "true" > 📢 < / s p a n > < s p a n c l a s s = " n f - a n n o u n c e m e n t - t e x t " > $ { e . m e s s a g e } < / s p a n >
< / b u t t o n > ` : f } r e n d e r A l e r t s ( ) { l e t e = t h i s . b u i l d i n g ; i f ( ! t h i s . _ a l e r t s . l e n g t h | | ! e ) r e t u r n f ; l e t t = t h i s . _ a l e r t s . s l i c e ( 0 , 3 ) ; r e t u r n p ` < d i v c l a s s = " n f - a l e r t - b a n n e r " r o l e = " a l e r t " >
$ { t . map ( r => p ` <button class="nf-alert nf-alert- ${ r . kind } " style= ${ r . color ? ` border-left-color: ${ r . color } ` : "" } title= ${ Do ( this . hass , e , r ) } @click= ${ ( ) => this . jumpTo ( r ) } > ${ Do ( this . hass , e , r ) } </button> ` ) }
$ { t . map ( r => p ` <button class="nf-alert nf-alert- ${ r . kind } " style= ${ r . color ? ` border-left-color: ${ r . color } ` : "" } title= ${ Io ( this . hass , e , r ) } @click= ${ ( ) => this . jumpTo ( r ) } > ${ Io ( this . hass , e , r ) } </button> ` ) }
$ { this . _alerts . length > 3 ? p ` <span class="nf-alert-more">+ ${ this . _alerts . length - 3 } </span> ` : f }
< / d i v > ` } r e n d e r S c e n e s ( ) { l e t e = t h i s . b u i l d i n g ; i f ( ! t h i s . s c e n e s | | ! t h i s . r o o m I d | | t h i s . p a n e l O p e n | | ! e | | ! t h i s . h a s s ) r e t u r n f ; l e t t = e . f l o o r s . f l a t M a p ( o = > o . r o o m s ) . f i n d ( o = > o . i d = = = t h i s . r o o m I d ) , r = t ? U ( t h i s . h a s s , t ) . f i l t e r ( o = > P ( o ) = = = " s c e n e " | | P ( o ) = = = " s c r i p t " ) . s l i c e ( 0 , 6 ) : [ ] ; i f ( ! r . l e n g t h ) r e t u r n f ; l e t i = t ? . a r e a _ i d ? t h i s . h a s s . a r e a s ? . [ t . a r e a _ i d ] ? . n a m e : v o i d 0 ; r e t u r n p ` < d i v c l a s s = " n f - s c e n e s " >
< / d i v > ` } r e n d e r S c e n e s ( ) { l e t e = t h i s . b u i l d i n g ; i f ( ! t h i s . s c e n e s | | ! t h i s . r o o m I d | | t h i s . p a n e l O p e n | | ! e | | ! t h i s . h a s s ) r e t u r n f ; l e t t = e . f l o o r s . f l a t M a p ( o = > o . r o o m s ) . f i n d ( o = > o . i d = = = t h i s . r o o m I d ) , r = t ? j ( t h i s . h a s s , t ) . f i l t e r ( o = > P ( o ) = = = " s c e n e " | | P ( o ) = = = " s c r i p t " ) . s l i c e ( 0 , 6 ) : [ ] ; i f ( ! r . l e n g t h ) r e t u r n f ; l e t i = t ? . a r e a _ i d ? t h i s . h a s s . a r e a s ? . [ t . a r e a _ i d ] ? . n a m e : v o i d 0 ; r e t u r n p ` < d i v c l a s s = " n f - s c e n e s " >
$ { r . map ( o => p ` <button class="nf-chip" aria-pressed= ${ this . _sceneFired === o } @click= ${ ( ) => this . runScene ( o ) } > ${ O ( this . hass , o , i ) } </button> ` ) }
< / d i v > ` } r e n d e r F i n d ( ) { l e t e = t h i s . b u i l d i n g ; i f ( ! e | | ! t h i s . h a s s ) r e t u r n f ; i f ( t h i s . _ f i n d = = = n u l l ) r e t u r n p ` < b u t t o n c l a s s = " n f - f i n d - b t n " t i t l e = $ { $ ( t h i s . h a s s , " f i n d " ) } a r i a - l a b e l = $ { $ ( t h i s . h a s s , " f i n d " ) } @ c l i c k = $ { ( ) = > t h i s . _ f i n d = " " } >
< / d i v > ` } r e n d e r F i n d ( ) { l e t e = t h i s . b u i l d i n g ; i f ( ! e | | ! t h i s . h a s s ) r e t u r n f ; i f ( t h i s . _ f i n d = = = n u l l ) r e t u r n p ` < b u t t o n c l a s s = " n f - f i n d - b t n " t i t l e = $ { M ( t h i s . h a s s , " f i n d " ) } a r i a - l a b e l = $ { M ( t h i s . h a s s , " f i n d " ) } @ c l i c k = $ { ( ) = > t h i s . _ f i n d = " " } >
< svg viewBox = "0 0 24 24" width = "18" height = "18" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" > < circle cx = "11" cy = "11" r = "6.5" / > < path d = "M16 16l4.5 4.5" / > < / s v g >
< / b u t t o n > ` ; l e t t = H u ( t h i s . f i n d I n d e x ? ? = D u ( t h i s . h a s s , e ) , t h i s . _ f i n d ) ; r e t u r n p ` < d i v c l a s s = " n f - f i n d " >
< / b u t t o n > ` ; l e t t = C u ( t h i s . f i n d I n d e x ? ? = I u ( t h i s . h a s s , e ) , t h i s . _ f i n d ) ; r e t u r n p ` < d i v c l a s s = " n f - f i n d " >
< input
type = "search"
placeholder = $ { $ ( this . hass , "find_placeholder" ) }
placeholder = $ { M ( this . hass , "find_placeholder" ) }
. value = $ { this . _find }
@ input = $ { r => this . _find = r . target . value }
@ keydown = $ { r => { r . key === "Escape" && ( this . _find = null ) , r . key === "Enter" && t [ 0 ] && this . goTo ( t [ 0 ] ) } }
/ >
< button class = "nf-find-close" aria - label = $ { $ ( this . hass , "close" ) } @ click = $ { ( ) => this . _find = null } > ✕ < / b u t t o n >
< button class = "nf-find-close" aria - label = $ { M ( this . hass , "close" ) } @ click = $ { ( ) => this . _find = null } > ✕ < / b u t t o n >
$ { this . _find . trim ( ) ? p ` <div class="nf-find-list">
$ { t . length ? t . map ( r => p ` <button @click= ${ ( ) => this . goTo ( r ) } >
< span class = "nf-find-icon" > < svg viewBox = "0 0 24 24" width = "16" height = "16" fill = "none" stroke = "currentColor" stroke - width = "1.8" stroke - linecap = "round" stroke - linejoin = "round" > < path d = $ { r . icon ? Ar ( r . icon ) : "M4 10l8-6 8 6v10H4z" } / > < / s v g > < / s p a n >
< span class = "nf-find-icon" > < svg viewBox = "0 0 24 24" width = "16" height = "16" fill = "none" stroke = "currentColor" stroke - width = "1.8" stroke - linecap = "round" stroke - linejoin = "round" > < path d = $ { r . icon ? Rr ( r . icon ) : "M4 10l8-6 8 6v10H4z" } / > < / s v g > < / s p a n >
< span > < b > $ { r . name } < / b > $ { r . w h e r e ? p ` < s m a l l > $ { r . w h e r e } < / s m a l l > ` : f } < / s p a n >
< / b u t t o n > ` ) : p ` < p > $ { $ ( t h i s . h a s s , " f i n d _ n o n e " ) } < / p > ` }
< / b u t t o n > ` ) : p ` < p > $ { M ( t h i s . h a s s , " f i n d _ n o n e " ) } < / p > ` }
< / d i v > ` : f }
< / d i v > ` } r e n d e r C e n t r a l ( ) { l e t e = t h i s . b u i l d i n g , t = t h i s . h a s s ; i f ( ! e | | ! t | | ! t h i s . c e n t r a l | | t h i s . _ f i n d ! = = n u l l ) r e t u r n f ; l e t r = ( b , y ) = > $ ( t , b , y ) , i = p ` < b u t t o n
< / d i v > ` } r e n d e r C e n t r a l ( ) { l e t e = t h i s . b u i l d i n g , t = t h i s . h a s s ; i f ( ! e | | ! t | | ! t h i s . c e n t r a l | | t h i s . _ f i n d ! = = n u l l ) r e t u r n f ; l e t r = ( b , y ) = > M ( t , b , y ) , i = p ` < b u t t o n
class = "nf-central-btn ${this._central?" nf - central - on ":" "}"
title = $ { r ( "central" ) }
aria - label = $ { r ( "central" ) }
@@ -1704,7 +1704,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
@ click = $ { ( ) => { this . _central = ! this . _central , this . _armed = null } }
>
< svg viewBox = "0 0 24 24" width = "19" height = "19" fill = "none" stroke = "currentColor" stroke - width = "1.9" stroke - linejoin = "round" > < path d = "M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8-4.3-4.1 5.9-.9z" / > < / s v g >
< / b u t t o n > ` ; i f ( ! t h i s . _ c e n t r a l ) r e t u r n i ; l e t o = t h i s . f l o o r I d ? e . f l o o r s . f i n d ( b = > b . i d = = = t h i s . f l o o r I d ) : v o i d 0 , s = o ? [ o ] : e . f l o o r s , a = s . f l a t M a p ( b = > Q i ( t , b ) . l i g h t s ) , l = s . f l a t M a p ( b = > Q i ( t , b ) . c o v e r s ) , c = a . f i l t e r ( b = > t . s t a t e s [ b ] ? . s t a t e = = = " o n " ) . l e n g t h , u = ! o , h = ( b , y , S , k ) = > { i f ( k . l e n g t h ) { i f ( u & & t h i s . _ a r m e d ! = = b ) { t h i s . _ a r m e d = b , c l e a r T i m e o u t ( t h i s . a r m T i m e r ) , t h i s . a r m T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ a r m e d = n u l l , 3 5 0 0 ) ; r e t u r n } t h i s . _ a r m e d = n u l l , t . c a l l S e r v i c e ( y , S , { e n t i t y _ i d : k } ) } } , m = ( b , y , S , k , M ) = > p ` < b u t t o n c l a s s = " n f - b t n $ { t h i s . _ a r m e d = = = b ? " n f - c e n t r a l - a r m e d " : " " } " ? d i s a b l e d = $ { ! M . l e n g t h } @ c l i c k = $ { ( ) = > h ( b , S , k , M ) } >
< / b u t t o n > ` ; i f ( ! t h i s . _ c e n t r a l ) r e t u r n i ; l e t o = t h i s . f l o o r I d ? e . f l o o r s . f i n d ( b = > b . i d = = = t h i s . f l o o r I d ) : v o i d 0 , s = o ? [ o ] : e . f l o o r s , a = s . f l a t M a p ( b = > t o ( t , b ) . l i g h t s ) . f i l t e r ( b = > W ( t , b ) ) , l = s . f l a t M a p ( b = > t o ( t , b ) . c o v e r s ) . f i l t e r ( b = > W ( t , b ) ) , c = a . f i l t e r ( b = > t . s t a t e s [ b ] ? . s t a t e = = = " o n " ) . l e n g t h , u = ! o , h = ( b , y , $ , S ) = > { i f ( S . l e n g t h ) { i f ( u & & t h i s . _ a r m e d ! = = b ) { t h i s . _ a r m e d = b , c l e a r T i m e o u t ( t h i s . a r m T i m e r ) , t h i s . a r m T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ a r m e d = n u l l , 3 5 0 0 ) ; r e t u r n } t h i s . _ a r m e d = n u l l , t . c a l l S e r v i c e ( y , $ , { e n t i t y _ i d : S } ) } } , m = ( b , y , $ , S , A ) = > p ` < b u t t o n c l a s s = " n f - b t n $ { t h i s . _ a r m e d = = = b ? " n f - c e n t r a l - a r m e d " : " " } " ? d i s a b l e d = $ { ! A . l e n g t h } @ c l i c k = $ { ( ) = > h ( b , $ , S , A ) } >
$ { this . _armed === b ? r ( "central_sure" ) : r ( y ) }
< / b u t t o n > ` , d = e . s e t t i n g s . f a v o r i t e _ f l o o r s ? ? { } , g = ( e . s e t t i n g s . f a v o r i t e s ? ? [ ] ) . f i l t e r ( b = > t . s t a t e s [ b ] & & ( ! d [ b ] | | ! o | | d [ b ] = = = o . i d ) ) , _ = t h i s . b u t t o n s ? ? e . s e t t i n g s . b u t t o n s ? ? [ ] ; r e t u r n p ` $ { i }
< div class = "nf-central ${this.centralOpen?" nf - central - big ":" "}" role = "dialog" aria - label = $ { r ( "central" ) } >
@@ -1721,11 +1721,11 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< / d i v > ` : f }
< b > $ { r ( "central_favorites" ) } < / b >
$ { g . length ? p ` <div class="nf-central-favs">
$ { g . map ( b => { let [ y , S ] = Va ( b ) , k = t . states [ b ] , M = y === "homeassistant" && k ? . state === "on" ; return p ` <button
$ { g . map ( b => { let [ y , $ ] = ja ( b ) , S = t . states [ b ] , A = y === "homeassistant" && S ? . state === "on" ; return p ` <button
class = "nf-chip"
aria - pressed = $ { M || this . _sceneFired === b }
? disabled = $ { C ( k ) }
@ click = $ { ( ) => { t . callService ( y , S , { entity _id : b } ) , this . _sceneFired = b , setTimeout ( ( ) => this . _sceneFired = null , 600 ) } }
aria - pressed = $ { A || this . _sceneFired === b }
? disabled = $ { C ( S ) || ! W ( t , b ) }
@ click = $ { ( ) => { t . callService ( y , $ , { entity _id : b } ) , this . _sceneFired = b , setTimeout ( ( ) => this . _sceneFired = null , 600 ) } }
>
$ { O ( t , b ) }
< / b u t t o n > ` } ) }
@@ -1733,17 +1733,17 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
$ { _ . length ? p ` <div class="nf-central-favs">
$ { _ . map ( b => p ` <button
class = "nf-chip nf-own-btn"
aria - pressed = $ { Ka ( t , b ) }
@ click = $ { y => { Xi ( t , y . currentTarget , b ) , b . action !== "service" && ( this . _central = ! 1 ) } }
aria - pressed = $ { qa ( t , b ) }
@ click = $ { y => { no ( t , y . currentTarget , b ) , b . action !== "service" && ( this . _central = ! 1 ) } }
>
$ { b . icon ? p ` <ha-icon .icon= ${ b . icon . startsWith ( "mdi:" ) ? b . icon : ` mdi: ${ b . icon } ` } ></ha-icon> ` : f } $ { b . label }
< / b u t t o n > ` ) }
< / d i v > ` : f }
< / d i v > ` } t o g g l e L o c k ( ) { t h i s . _ l o c k e d = ! t h i s . _ l o c k e d ; t r y { l o c a l S t o r a g e . s e t I t e m ( j u , t h i s . _ l o c k e d ? " 1 " : " 0 " ) } c a t c h { } } a s y n c o p e n T r a v e l ( e ) { i f ( c l e a r I n t e r v a l ( t h i s . t r a v e l T i m e r ) , t h i s . t r a v e l T i m e r = v o i d 0 , e = = = n u l l | | ! t h i s . h a s s ) { t h i s . _ t r a v e l = n u l l , t h i s . s y n c D e v i c e s ( ! 0 ) ; r e t u r n } l e t t = D a t e . n o w ( ) , r = t - e * 3 6 e 5 ; t h i s . _ t r a v e l = { h i s t o r y : n e w M a p , f r o m : r , t o : t , t : r , p l a y i n g : ! 1 , s p e e d : e > 2 4 ? 3 6 0 0 : 6 0 0 , h o u r s : e , m o m e n t s : [ ] , l o a d i n g : ! 0 } ; t r y { l e t i = a w a i t z n ( t h i s . h a s s , p c ( t h i s . w a t c h e d ) , r , t ) ; i f ( ! t h i s . _ t r a v e l | | t h i s . _ t r a v e l . f r o m ! = = r ) r e t u r n ; t h i s . _ t r a v e l = { . . . t h i s . _ t r a v e l , h i s t o r y : i , m o m e n t s : f c ( i , r , t ) , l o a d i n g : ! 1 } } c a t c h { t h i s . _ t r a v e l = n u l l , t h i s . _ e r r o r = $ ( t h i s . h a s s , " t r a v e l _ f a i l e d " ) ; r e t u r n } t h i s . s y n c D e v i c e s ( ! 0 ) } t r a v e l T o ( e ) { l e t t = t h i s . _ t r a v e l ; t & & ( t h i s . _ t r a v e l = { . . . t , t : M a t h . m i n ( t . t o , M a t h . m a x ( t . f r o m , e ) ) } , t h i s . s y n c D e v i c e s ( ! 0 ) ) } p l a y T r a v e l ( e ) { l e t t = t h i s . _ t r a v e l ; t & & ( c l e a r I n t e r v a l ( t h i s . t r a v e l T i m e r ) , t h i s . t r a v e l T i m e r = v o i d 0 , t h i s . _ t r a v e l = { . . . t , p l a y i n g : e , t : e & & t . t > = t . t o ? t . f r o m : t . t } , e & & ( t h i s . t r a v e l T i m e r = s e t I n t e r v a l ( ( ) = > { l e t r = t h i s . _ t r a v e l ; i f ( ! r ) r e t u r n ; l e t i = r . t + 2 5 0 * r . s p e e d ; i > = r . t o & & t h i s . p l a y T r a v e l ( ! 1 ) , t h i s . t r a v e l T o ( i ) } , 2 5 0 ) ) ) } r e n d e r T r a v e l ( ) { i f ( ! t h i s . h a s s | | t h i s . c l e a n ) r e t u r n f ; l e t e = a = > $ ( t h i s . h a s s , a ) , t = t h i s . _ t r a v e l ; i f ( ! t ) r e t u r n t h i s . t r a v e l B u t t o n ? p ` < b u t t o n c l a s s = " n f - t r a v e l - b t n " t i t l e = $ { e ( " t r a v e l " ) } a r i a - l a b e l = $ { e ( " t r a v e l " ) } @ c l i c k = $ { ( ) = > { t h i s . o p e n T r a v e l ( 2 4 ) } } > ⏪ < / b u t t o n > ` : f ; l e t r = t h i s . h a s s . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , i = n e w I n t l . D a t e T i m e F o r m a t ( r , { w e e k d a y : " s h o r t " , h o u r : " 2 - d i g i t " , m i n u t e : " 2 - d i g i t " } ) . f o r m a t ( n e w D a t e ( t . t ) ) , o = t . t o - t . f r o m | | 1 , s = [ [ 6 0 , " t r a v e l _ s p e e d _ m i n " ] , [ 6 0 0 , " t r a v e l _ s p e e d _ 1 0 m i n " ] , [ 3 6 0 0 , " t r a v e l _ s p e e d _ h o u r " ] ] ; r e t u r n p ` < d i v c l a s s = " n f - t r a v e l " r o l e = " g r o u p " a r i a - l a b e l = $ { e ( " t r a v e l " ) } >
< / d i v > ` } t o g g l e L o c k ( ) { t h i s . _ l o c k e d = ! t h i s . _ l o c k e d ; t r y { l o c a l S t o r a g e . s e t I t e m ( Y u , t h i s . _ l o c k e d ? " 1 " : " 0 " ) } c a t c h { } } a s y n c o p e n T r a v e l ( e ) { i f ( c l e a r I n t e r v a l ( t h i s . t r a v e l T i m e r ) , t h i s . t r a v e l T i m e r = v o i d 0 , e = = = n u l l | | ! t h i s . h a s s ) { t h i s . _ t r a v e l = n u l l , t h i s . s y n c D e v i c e s ( ! 0 ) ; r e t u r n } l e t t = D a t e . n o w ( ) , r = t - e * 3 6 e 5 ; t h i s . _ t r a v e l = { h i s t o r y : n e w M a p , f r o m : r , t o : t , t : r , p l a y i n g : ! 1 , s p e e d : e > 2 4 ? 3 6 0 0 : 6 0 0 , h o u r s : e , m o m e n t s : [ ] , l o a d i n g : ! 0 } ; t r y { l e t i = a w a i t F n ( t h i s . h a s s , _ c ( t h i s . w a t c h e d ) , r , t ) ; i f ( ! t h i s . _ t r a v e l | | t h i s . _ t r a v e l . f r o m ! = = r ) r e t u r n ; t h i s . _ t r a v e l = { . . . t h i s . _ t r a v e l , h i s t o r y : i , m o m e n t s : b c ( i , r , t ) , l o a d i n g : ! 1 } } c a t c h { t h i s . _ t r a v e l = n u l l , t h i s . _ e r r o r = M ( t h i s . h a s s , " t r a v e l _ f a i l e d " ) ; r e t u r n } t h i s . s y n c D e v i c e s ( ! 0 ) } t r a v e l T o ( e ) { l e t t = t h i s . _ t r a v e l ; t & & ( t h i s . _ t r a v e l = { . . . t , t : M a t h . m i n ( t . t o , M a t h . m a x ( t . f r o m , e ) ) } , t h i s . s y n c D e v i c e s ( ! 0 ) ) } p l a y T r a v e l ( e ) { l e t t = t h i s . _ t r a v e l ; t & & ( c l e a r I n t e r v a l ( t h i s . t r a v e l T i m e r ) , t h i s . t r a v e l T i m e r = v o i d 0 , t h i s . _ t r a v e l = { . . . t , p l a y i n g : e , t : e & & t . t > = t . t o ? t . f r o m : t . t } , e & & ( t h i s . t r a v e l T i m e r = s e t I n t e r v a l ( ( ) = > { l e t r = t h i s . _ t r a v e l ; i f ( ! r ) r e t u r n ; l e t i = r . t + 2 5 0 * r . s p e e d ; i > = r . t o & & t h i s . p l a y T r a v e l ( ! 1 ) , t h i s . t r a v e l T o ( i ) } , 2 5 0 ) ) ) } r e n d e r T r a v e l ( ) { i f ( ! t h i s . h a s s | | t h i s . c l e a n ) r e t u r n f ; l e t e = a = > M ( t h i s . h a s s , a ) , t = t h i s . _ t r a v e l ; i f ( ! t ) r e t u r n t h i s . t r a v e l B u t t o n ? p ` < b u t t o n c l a s s = " n f - t r a v e l - b t n " t i t l e = $ { e ( " t r a v e l " ) } a r i a - l a b e l = $ { e ( " t r a v e l " ) } @ c l i c k = $ { ( ) = > { t h i s . o p e n T r a v e l ( 2 4 ) } } > ⏪ < / b u t t o n > ` : f ; l e t r = t h i s . h a s s . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , i = n e w I n t l . D a t e T i m e F o r m a t ( r , { w e e k d a y : " s h o r t " , h o u r : " 2 - d i g i t " , m i n u t e : " 2 - d i g i t " } ) . f o r m a t ( n e w D a t e ( t . t ) ) , o = t . t o - t . f r o m | | 1 , s = [ [ 6 0 , " t r a v e l _ s p e e d _ m i n " ] , [ 6 0 0 , " t r a v e l _ s p e e d _ 1 0 m i n " ] , [ 3 6 0 0 , " t r a v e l _ s p e e d _ h o u r " ] ] ; r e t u r n p ` < d i v c l a s s = " n f - t r a v e l " r o l e = " g r o u p " a r i a - l a b e l = $ { e ( " t r a v e l " ) } >
< button class = "nf-travel-play" aria - label = $ { e ( t . playing ? "travel_pause" : "travel_play" ) } ? disabled = $ { t . loading } @ click = $ { ( ) => this . playTravel ( ! t . playing ) } > $ { t . playing ? "\u23F8" : "\u25B6" } < / b u t t o n >
< b class = "nf-travel-when" > $ { t . loading ? e ( "travel_loading" ) : i } < / b >
< div class = "nf-travel-track" >
< svg viewBox = "0 0 1000 10" preserveAspectRatio = "none" aria - hidden = "true" > $ { t . moments . map ( a => ne ` <rect x= ${ ( a - t . from ) / o * 1e3 } y="0" width="1.6" height="10" /> ` ) } < / s v g >
< svg viewBox = "0 0 1000 10" preserveAspectRatio = "none" aria - hidden = "true" > $ { t . moments . map ( a => re ` <rect x= ${ ( a - t . from ) / o * 1e3 } y="0" width="1.6" height="10" /> ` ) } < / s v g >
< input type = "range" min = $ { t . from } max = $ { t . to } step = "60000" . value = $ { String ( t . t ) } ? disabled = $ { t . loading } aria - label = $ { e ( "travel" ) } @ input = $ { a => this . travelTo ( Number ( a . target . value ) ) } / >
< / d i v >
< select aria - label = $ { e ( "travel_speed" ) } @ change = $ { a => this . _travel = { ... t , speed : Number ( a . target . value ) } } >
@@ -1752,32 +1752,32 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< button class = "nf-travel-span" aria - pressed = $ { t . hours === 24 } @ click = $ { ( ) => { this . openTravel ( 24 ) } } > 24 h < / b u t t o n >
< button class = "nf-travel-span" aria - pressed = $ { t . hours === 168 } @ click = $ { ( ) => { this . openTravel ( 168 ) } } > 7 $ { e ( "travel_days" ) } < / b u t t o n >
< button class = "nf-travel-live" @ click = $ { ( ) => { this . openTravel ( null ) } } > ● $ { e ( "travel_live" ) } < / b u t t o n >
< / d i v > ` } t o g g l e W a l k ( ) { l e t e = t h i s . v i e w e r ; e & & ( t h i s . _ w a l k i n g ? ( e . s t o p W a l k ( ) , t h i s . _ w a l k i n g = ! 1 ) : t h i s . _ w a l k i n g = e . s t a r t W a l k ( ) ! = = n u l l , t h i s . _ s t i c k = n u l l ) } s t i c k M o v e ( e , t = ! 1 ) { l e t r = e . c u r r e n t T a r g e t ; i f ( t ) r . s e t P o i n t e r C a p t u r e ( e . p o i n t e r I d ) ; e l s e i f ( ! t h i s . _ s t i c k ) r e t u r n ; l e t i = r . g e t B o u n d i n g C l i e n t R e c t ( ) , o = i . w i d t h / 2 , [ s , a ] = [ ( e . c l i e n t X - i . l e f t - o ) / o , ( e . c l i e n t Y - i . t o p - o ) / o ] , l = M a t h . h y p o t ( s , a ) ; l > 1 & & ( [ s , a ] = [ s / l , a / l ] ) , t h i s . _ s t i c k = [ s , a ] , t h i s . v i e w e r ? . s e t W a l k S t i c k ( M a t h . a b s ( s ) < . 1 2 ? 0 : s , M a t h . a b s ( a ) < . 1 2 ? 0 : a ) } s t i c k E n d ( ) { t h i s . _ s t i c k = n u l l , t h i s . v i e w e r ? . s e t W a l k S t i c k ( 0 , 0 ) } r e n d e r W a l k ( ) { i f ( ! t h i s . h a s s | | t h i s . c l e a n | | ! t h i s . w a l k B u t t o n & & ! t h i s . _ w a l k i n g ) r e t u r n f ; l e t e = r = > $ ( t h i s . h a s s , r ) , t = t h i s . _ s t i c k ? ? [ 0 , 0 ] ; r e t u r n p ` < b u t t o n c l a s s = " n f - w a l k - b t n $ { t h i s . _ w a l k i n g ? " n f - w a l k - o n " : " " } " t i t l e = $ { e ( t h i s . _ w a l k i n g ? " w a l k _ s t o p " : " w a l k " ) } a r i a - l a b e l = $ { e ( t h i s . _ w a l k i n g ? " w a l k _ s t o p " : " w a l k " ) } a r i a - p r e s s e d = $ { t h i s . _ w a l k i n g } @ c l i c k = $ { ( ) = > t h i s . t o g g l e W a l k ( ) } >
$ { this . _walking ? "\u2715" : ne ` <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="13" cy="4" r="2" /><path d="M10 21l2-6 3 3v5M9 12l1-4 4 1 3 3M8 9l-2 4" /></svg> ` }
< / d i v > ` } t o g g l e W a l k ( ) { l e t e = t h i s . v i e w e r ; e & & ( t h i s . _ w a l k i n g ? ( e . s t o p W a l k ( ) , t h i s . _ w a l k i n g = ! 1 ) : t h i s . _ w a l k i n g = e . s t a r t W a l k ( ) ! = = n u l l , t h i s . _ s t i c k = n u l l ) } s t i c k M o v e ( e , t = ! 1 ) { l e t r = e . c u r r e n t T a r g e t ; i f ( t ) r . s e t P o i n t e r C a p t u r e ( e . p o i n t e r I d ) ; e l s e i f ( ! t h i s . _ s t i c k ) r e t u r n ; l e t i = r . g e t B o u n d i n g C l i e n t R e c t ( ) , o = i . w i d t h / 2 , [ s , a ] = [ ( e . c l i e n t X - i . l e f t - o ) / o , ( e . c l i e n t Y - i . t o p - o ) / o ] , l = M a t h . h y p o t ( s , a ) ; l > 1 & & ( [ s , a ] = [ s / l , a / l ] ) , t h i s . _ s t i c k = [ s , a ] , t h i s . v i e w e r ? . s e t W a l k S t i c k ( M a t h . a b s ( s ) < . 1 2 ? 0 : s , M a t h . a b s ( a ) < . 1 2 ? 0 : a ) } s t i c k E n d ( ) { t h i s . _ s t i c k = n u l l , t h i s . v i e w e r ? . s e t W a l k S t i c k ( 0 , 0 ) } r e n d e r W a l k ( ) { i f ( ! t h i s . h a s s | | t h i s . c l e a n | | ! t h i s . w a l k B u t t o n & & ! t h i s . _ w a l k i n g ) r e t u r n f ; l e t e = r = > M ( t h i s . h a s s , r ) , t = t h i s . _ s t i c k ? ? [ 0 , 0 ] ; r e t u r n p ` < b u t t o n c l a s s = " n f - w a l k - b t n $ { t h i s . _ w a l k i n g ? " n f - w a l k - o n " : " " } " t i t l e = $ { e ( t h i s . _ w a l k i n g ? " w a l k _ s t o p " : " w a l k " ) } a r i a - l a b e l = $ { e ( t h i s . _ w a l k i n g ? " w a l k _ s t o p " : " w a l k " ) } a r i a - p r e s s e d = $ { t h i s . _ w a l k i n g } @ c l i c k = $ { ( ) = > t h i s . t o g g l e W a l k ( ) } >
$ { this . _walking ? "\u2715" : re ` <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="13" cy="4" r="2" /><path d="M10 21l2-6 3 3v5M9 12l1-4 4 1 3 3M8 9l-2 4" /></svg> ` }
< / b u t t o n >
$ { this . _walking ? p ` <div class="nf-stick" @pointerdown= ${ r => this . stickMove ( r , ! 0 ) } @pointermove= ${ r => this . stickMove ( r ) } @pointerup= ${ ( ) => this . stickEnd ( ) } @pointercancel= ${ ( ) => this . stickEnd ( ) } >
< span style = "transform:translate(${t[0]*34}px, ${t[1]*34}px)" > < / s p a n >
< / d i v >
< p class = "nf-walk-hint" > $ { e ( "walk_hint" ) } < / p > ` : f } ` } r e n d e r L o c k ( ) { i f ( ! t h i s . l o c k B u t t o n | | ! t h i s . h a s s | | t h i s . c l e a n ) r e t u r n f ; l e t e = $ ( t h i s . h a s s , t h i s . _ l o c k e d ? " l o c k 3 d _ o f f " : " l o c k 3 d _ o n " ) ; r e t u r n p ` < b u t t o n c l a s s = " n f - l o c k 3 d $ { t h i s . _ l o c k e d ? " n f - l o c k 3 d - o n " : " " } " t i t l e = $ { e } a r i a - l a b e l = $ { e } a r i a - p r e s s e d = $ { t h i s . _ l o c k e d } @ c l i c k = $ { ( ) = > t h i s . t o g g l e L o c k ( ) } >
< p class = "nf-walk-hint" > $ { e ( "walk_hint" ) } < / p > ` : f } ` } r e n d e r L o c k ( ) { i f ( ! t h i s . l o c k B u t t o n | | ! t h i s . h a s s | | t h i s . c l e a n ) r e t u r n f ; l e t e = M ( t h i s . h a s s , t h i s . _ l o c k e d ? " l o c k 3 d _ o f f " : " l o c k 3 d _ o n " ) ; r e t u r n p ` < b u t t o n c l a s s = " n f - l o c k 3 d $ { t h i s . _ l o c k e d ? " n f - l o c k 3 d - o n " : " " } " t i t l e = $ { e } a r i a - l a b e l = $ { e } a r i a - p r e s s e d = $ { t h i s . _ l o c k e d } @ c l i c k = $ { ( ) = > t h i s . t o g g l e L o c k ( ) } >
< svg viewBox = "0 0 24 24" width = "18" height = "18" fill = "none" stroke = "currentColor" stroke - width = "2" stroke - linecap = "round" stroke - linejoin = "round" >
< rect x = "5" y = "11" width = "14" height = "9" rx = "2" / >
$ { this . _locked ? ne ` <path d="M8 11V8a4 4 0 0 1 8 0v3" /> ` : ne ` <path d="M8 11V8a4 4 0 0 1 7.5-2" /> ` }
$ { this . _locked ? re ` <path d="M8 11V8a4 4 0 0 1 8 0v3" /> ` : re ` <path d="M8 11V8a4 4 0 0 1 7.5-2" /> ` }
< / s v g >
< / b u t t o n > ` } r e n d e r C l o c k ( e = ! 1 ) { i f ( ! t h i s . c l o c k | | ! t h i s . h a s s | | t h i s . c l o c k = = = " t o p _ l e f t " & & ! e ) r e t u r n f ; l e t t = t h i s . h a s s . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , r = n e w D a t e ( t h i s . _ n o w ) , i = n e w I n t l . D a t e T i m e F o r m a t ( t , { h o u r : " 2 - d i g i t " , m i n u t e : " 2 - d i g i t " } ) . f o r m a t ( r ) , o = n e w I n t l . D a t e T i m e F o r m a t ( t , { w e e k d a y : " l o n g " , d a y : " n u m e r i c " , m o n t h : " l o n g " } ) . f o r m a t ( r ) ; r e t u r n p ` < d i v c l a s s = " n f - c l o c k n f - c l o c k - $ { t h i s . c l o c k } " a r i a - h i d d e n = " t r u e " > < b > $ { i } < / b > < s p a n > $ { o } < / s p a n > < / d i v > ` } r e n d e r E y e ( ) { i f ( ! t h i s . c l e a n B u t t o n | | ! t h i s . h a s s | | t h i s . _ f i n d ! = = n u l l & & ! t h i s . c l e a n ) r e t u r n f ; l e t e = $ ( t h i s . h a s s , t h i s . c l e a n ? " c o n t r o l s _ s h o w " : " c o n t r o l s _ h i d e " ) ; r e t u r n p ` < b u t t o n
< / b u t t o n > ` } r e n d e r C l o c k ( e = ! 1 ) { i f ( ! t h i s . c l o c k | | ! t h i s . h a s s | | t h i s . c l o c k = = = " t o p _ l e f t " & & ! e ) r e t u r n f ; l e t t = t h i s . h a s s . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , r = n e w D a t e ( t h i s . _ n o w ) , i = n e w I n t l . D a t e T i m e F o r m a t ( t , { h o u r : " 2 - d i g i t " , m i n u t e : " 2 - d i g i t " } ) . f o r m a t ( r ) , o = n e w I n t l . D a t e T i m e F o r m a t ( t , { w e e k d a y : " l o n g " , d a y : " n u m e r i c " , m o n t h : " l o n g " } ) . f o r m a t ( r ) ; r e t u r n p ` < d i v c l a s s = " n f - c l o c k n f - c l o c k - $ { t h i s . c l o c k } " a r i a - h i d d e n = " t r u e " > < b > $ { i } < / b > < s p a n > $ { o } < / s p a n > < / d i v > ` } r e n d e r E y e ( ) { i f ( ! t h i s . c l e a n B u t t o n | | ! t h i s . h a s s | | t h i s . _ f i n d ! = = n u l l & & ! t h i s . c l e a n ) r e t u r n f ; l e t e = M ( t h i s . h a s s , t h i s . c l e a n ? " c o n t r o l s _ s h o w " : " c o n t r o l s _ h i d e " ) ; r e t u r n p ` < b u t t o n
class = "nf-eye ${this.clean?" nf - eye - clean ":" "}"
title = $ { e }
aria - label = $ { e }
aria - pressed = $ { this . clean }
@ click = $ { ( ) => this . dispatchEvent ( new CustomEvent ( "clean-toggle" , { bubbles : ! 0 , composed : ! 0 } ) ) }
>
$ { this . clean ? ne ` <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M12 6a9.8 9.8 0 0 1 9 6 9.8 9.8 0 0 1-9 6 9.8 9.8 0 0 1-9-6 9.8 9.8 0 0 1 9-6m0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4" /></svg> ` : ne ` <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M2.4 3.8 3.8 2.4l17.8 17.8-1.4 1.4-3.3-3.3A10.5 10.5 0 0 1 12 19a9.8 9.8 0 0 1-9-6 10.3 10.3 0 0 1 3.6-4.3L2.4 3.8M12 7a4 4 0 0 1 4 4c0 .5-.1 1-.3 1.5l-5.2-5.2c.5-.2 1-.3 1.5-.3m-4 4a4 4 0 0 0 5.5 3.7l-5.2-5.2c-.2.5-.3 1-.3 1.5m4-7a9.8 9.8 0 0 1 9 6 10 10 0 0 1-2.6 3.6l-1.4-1.4A8 8 0 0 0 18.8 12 8 8 0 0 0 9.6 7.2L8 5.6A10.3 10.3 0 0 1 12 4" /></svg> ` }
$ { this . clean ? re ` <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M12 6a9.8 9.8 0 0 1 9 6 9.8 9.8 0 0 1-9 6 9.8 9.8 0 0 1-9-6 9.8 9.8 0 0 1 9-6m0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4" /></svg> ` : re ` <svg viewBox="0 0 24 24" width="20" height="20"><path fill="currentColor" d="M2.4 3.8 3.8 2.4l17.8 17.8-1.4 1.4-3.3-3.3A10.5 10.5 0 0 1 12 19a9.8 9.8 0 0 1-9-6 10.3 10.3 0 0 1 3.6-4.3L2.4 3.8M12 7a4 4 0 0 1 4 4c0 .5-.1 1-.3 1.5l-5.2-5.2c.5-.2 1-.3 1.5-.3m-4 4a4 4 0 0 0 5.5 3.7l-5.2-5.2c-.2.5-.3 1-.3 1.5m4-7a9.8 9.8 0 0 1 9 6 10 10 0 0 1-2.6 3.6l-1.4-1.4A8 8 0 0 0 18.8 12 8 8 0 0 0 9.6 7.2L8 5.6A10.3 10.3 0 0 1 12 4" /></svg> ` }
< / b u t t o n > ` } r e n d e r S w i p e ( ) { l e t e = t h i s . _ s w i p e ; i f ( ! e | | ! t h i s . h a s s ) r e t u r n f ; l e t t = e . k i n d = = = " l i g h t " & & e . v a l u e < = 0 ; r e t u r n p ` < d i v c l a s s = " n f - s w i p e " s t y l e = " l e f t : $ { e . x } p x ; t o p : $ { e . y } p x " >
< span > $ { O ( this . hass , e . entity ) } < / s p a n >
< b > $ { t ? $ ( this . hass , "swipe_off" ) : ` ${ e . value } % ` } < / b >
< b > $ { t ? M ( this . hass , "swipe_off" ) : ` ${ e . value } % ` } < / b >
< i > < em style = "height:${e.value}%" > < /em></i >
< / d i v > ` } t a p P l a t e ( e , t , r ) { l e t i = t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( s = > s . f u r n i t u r e ) . f i n d ( s = > s . i d = = = e ) , o = i ? e o ( i . g a n g _ e n t i t i e s , X ( i . t y p e ) ? . g a n g s ? ? 0 ) : [ ] ; i f ( o . l e n g t h = = = 1 ) r e t u r n t h i s . o n D e v i c e T a p ( o [ 0 ] , t , r ) ; o . l e n g t h > 1 & & ( t h i s . _ p l a t e = { i d s : o , x : t , y : r } ) } r e n d e r P l a t e ( ) { l e t e = t h i s . _ p l a t e ; i f ( ! e | | ! t h i s . h a s s ) r e t u r n f ; l e t t = t h i s . h a s s , r = ( ) = > t h i s . _ p l a t e = n u l l ; r e t u r n p ` < d i v c l a s s = " n f - m e n u - b a c k d r o p " @ c l i c k = $ { r } > < / d i v >
< / d i v > ` } t a p P l a t e ( e , t , r ) { l e t i = t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( s = > s . f u r n i t u r e ) . f i n d ( s = > s . i d = = = e ) , o = i ? r o ( i . g a n g _ e n t i t i e s , e e ( i . t y p e ) ? . g a n g s ? ? 0 ) : [ ] ; i f ( o . l e n g t h = = = 1 ) r e t u r n t h i s . o n D e v i c e T a p ( o [ 0 ] , t , r ) ; o . l e n g t h > 1 & & ( t h i s . _ p l a t e = { i d s : o , x : t , y : r } ) } r e n d e r P l a t e ( ) { l e t e = t h i s . _ p l a t e ; i f ( ! e | | ! t h i s . h a s s ) r e t u r n f ; l e t t = t h i s . h a s s , r = ( ) = > t h i s . _ p l a t e = n u l l ; r e t u r n p ` < d i v c l a s s = " n f - m e n u - b a c k d r o p " @ c l i c k = $ { r } > < / d i v >
< div class = "nf-plate-menu" style = "left:${Math.max(8,e.x-110)}px;top:${Math.max(8,e.y-20-e.ids.length*46)}px" role = "menu" >
$ { e . ids . map ( ( i , o ) => { let s = t . states [ i ] , a = te ( s ) || s ? . state === "on" ; return p ` <button role="menuitem" class= ${ a ? "on" : "" } @click= ${ ( ) => { r ( ) , this . onDeviceTap ( i , e . x , e . y ) } }><b> ${ o + 1 } </b><span> ${ O ( t , i ) } </span><i> ${ s ? se ( t , s ) : "\u2013" } </i></button> ` } ) }
$ { e . ids . map ( ( i , o ) => { let s = t . states [ i ] , a = ne ( s ) || s ? . state === "on" ; return p ` <button role="menuitem" class= ${ a ? "on" : "" } @click= ${ ( ) => { r ( ) , this . onDeviceTap ( i , e . x , e . y ) } }><b> ${ o + 1 } </b><span> ${ O ( t , i ) } </span><i> ${ s ? ae ( t , s ) : "\u2013" } </i></button> ` } ) }
< / d i v > ` } r e n d e r M e n u ( ) { l e t e = t h i s . _ m e n u ; i f ( ! e | | ! t h i s . h a s s ) r e t u r n f ; l e t t = t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - s t a g e " ) , r = t ? . c l i e n t W i d t h ? ? 8 0 0 , i = t ? . c l i e n t H e i g h t ? ? 6 0 0 , o = M a t h . m a x ( 8 , M a t h . m i n ( r - 2 4 0 , e . x - 1 1 6 ) ) , s = M a t h . m a x ( 8 , M a t h . m i n ( i - 3 6 0 , e . y - 1 7 0 ) ) ; r e t u r n p ` < d i v c l a s s = " n f - m e n u - b a c k d r o p " @ c l i c k = $ { ( ) = > t h i s . _ m e n u = n u l l } > < / d i v >
< nf - quick - menu
style = "left:${o}px;top:${s}px"
@@ -1788,28 +1788,28 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. presets = $ { ( this . building ? . settings . media _presets ? ? [ ] ) . filter ( a => ! a . speakers ? . length || a . speakers . includes ( e . entity ) ) }
? confirmSwitch = $ { this . confirmSet . has ( e . entity ) }
. myPosition = $ { this . myPositionOf ( e . entity ) }
. tiltEntity = $ { kr ( this . hass , this . building ? . floors ? ? [ ] , e . entity ) }
. tiltEntity = $ { $r ( this . hass , this . building ? . floors ? ? [ ] , e . entity ) }
@ close = $ { ( ) => this . _menu = null }
> < / n f - q u i c k - m e n u > ` } m y P o s i t i o n O f ( e ) { f o r ( l e t t o f t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] ) f o r ( l e t r o f t . o p e n i n g s ) { l e t i = t h i s . o p e n i n g L i n k s ? . g e t ( r . i d ) ; i f ( r . m y _ p o s i t i o n ! = n u l l & & ( i ? . c o v e r = = = e | | i ? . c o v e r 2 = = = e ) ) r e t u r n r . m y _ p o s i t i o n } r e t u r n n u l l } o n D e v i c e T a p ( e , t = 0 , r = 0 ) { i f ( e . s t a r t s W i t h ( " l a m p : " ) | | t h i s . _ t r a v e l ) r e t u r n ; i f ( e . s t a r t s W i t h ( " h y d r o n i c : " ) ) { l e t s = t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( a = > a . f u r n i t u r e ) . f i n d ( a = > a . i d = = = e . s l i c e ( 9 ) ) ; s & & t h i s . h a s s & & j o ( ) . t h e n ( a = > { i f ( t h i s . i s C o n n e c t e d & & t h i s . h a s s ) r e t u r n t h i s . h y d r o n i c M o d u l e = a , a . o p e n H y d r o n i c ( t h i s . h a s s , s ) } ) . c a t c h ( a = > { t h i s . _ e r r o r = S t r i n g ( a ) } ) ; r e t u r n } l e t i = e . s t a r t s W i t h ( " t a p : " ) ? e . s l i c e ( 4 ) : t h i s . t a p P i n s . g e t ( e ) ; i f ( i ) { l e t s = t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( a = > a . f u r n i t u r e ) . f i n d ( a = > a . i d = = = i ) ; s ? . t a p & & X i ( t h i s . h a s s , t h i s , s . t a p ) ; r e t u r n } i f ( t h i s . p l u g i n T a p p e d ( e ) ) r e t u r n ; i f ( e . s t a r t s W i t h ( " g a n g : " ) ) r e t u r n t h i s . t a p P l a t e ( e . s l i c e ( 5 ) , t , r ) ; i f ( e . s t a r t s W i t h ( " o u t d o o r : " ) ) { t h i s . f i r e ( " r o o m - t a p " , { f l o o r I d : n u l l , r o o m I d : " n f - o u t s i d e " } ) ; r e t u r n } i f ( e = = = " g r i d " ) { l e t s = t h i s . b u i l d i n g , a = s ? s . e n e r g y . g r i d ? ? Z e ( s , l = > t h i s . f u r n i t u r e L i n k s ? . g e t ( l . i d ) ? . p o w e r ? ? n u l l ) . g r i d : n u l l ; a & & k e ( t h i s , a ) ; r e t u r n } l e t o = P ( e ) ; i f ( o = = = " c o v e r " | | o = = = " m e d i a " ) { t h i s . _ m e n u = { e n t i t y : e , x : t , y : r } ; r e t u r n } i f ( o = = = " l o c k " ) { l e t s = Z i ( t h i s . h a s s , e ) , a = O ( t h i s . h a s s , e ) ; c o n f i r m ( $ ( t h i s . h a s s , s ? " l o c k _ c o n f i r m _ l o c k " : " l o c k _ c o n f i r m _ u n l o c k " , { n a m e : a } ) ) & & t h i s . h a s s . c a l l S e r v i c e ( " l o c k " , s ? " l o c k " : " u n l o c k " , { e n t i t y _ i d : e } ) ; r e t u r n } i f ( o & & g a . h a s ( o ) ) { i f ( t h i s . c o n f i r m S e t . h a s ( e ) & & ! c o n f i r m ( $ ( t h i s . h a s s , " c o n f i r m _ s w i t c h " , { n a m e : O ( t h i s . h a s s , e ) } ) ) ) r e t u r n ; o l ( t h i s . h a s s , e ) } e l s e k e ( t h i s , e ) } p l u g i n T a p p e d ( e ) { l e t t = t h i s . h a s s ? . s t a t e s [ e ] , r = t h i s . p l a c e m e n t I n f o . g e t ( e ) ; i f ( ! t | | ! r ) r e t u r n ! 1 ; l e t i = t h i s . b u i l d i n g ? . f l o o r s . f i n d ( o = > o . i d = = = r . f l o o r I d ) ? . p l a c e m e n t s . f i n d ( o = > o . e n t i t y _ i d = = = e ) ; r e t u r n Z s ( { h a s s : t h i s . h a s s , e n t i t y I d : e , s t a t e : t } , r , i ? . p l u g i n ? ? v o i d 0 , { s h o w W i n d o w : ( o , s ) = > { o & & " h a s s " i n o & & ( o . h a s s = t h i s . h a s s ) , t h i s . _ p l u g i n W i n d o w = o ? { n o d e : o , t i t l e : s ? . t i t l e ? ? " " } : n u l l } , m o r e I n f o : o = > k e ( t h i s , o ? ? e ) } ) } r e n d e r P l u g i n W i n d o w ( ) { l e t e = t h i s . _ p l u g i n W i n d o w ; r e t u r n e ? p ` < d i v c l a s s = " n f - p l u g i n - w i n d o w " @ p o i n t e r d o w n = $ { t = > t . s t o p P r o p a g a t i o n ( ) } >
< div class = "nf-pw-head" > < span > $ { e . title } < / s p a n > < b u t t o n c l a s s = " n f - p w - c l o s e " a r i a - l a b e l = $ { $ ( t h i s . h a s s , " c l o s e " ) } @ c l i c k = $ { ( ) = > t h i s . _ p l u g i n W i n d o w = n u l l } > ✕ < / b u t t o n > < / d i v >
> < / n f - q u i c k - m e n u > ` } m y P o s i t i o n O f ( e ) { f o r ( l e t t o f t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] ) f o r ( l e t r o f t . o p e n i n g s ) { l e t i = t h i s . o p e n i n g L i n k s ? . g e t ( r . i d ) ; i f ( r . m y _ p o s i t i o n ! = n u l l & & ( i ? . c o v e r = = = e | | i ? . c o v e r 2 = = = e ) ) r e t u r n r . m y _ p o s i t i o n } r e t u r n n u l l } o n D e v i c e T a p ( e , t = 0 , r = 0 ) { i f ( e . s t a r t s W i t h ( " l a m p : " ) | | t h i s . _ t r a v e l ) r e t u r n ; i f ( e . s t a r t s W i t h ( " h y d r o n i c : " ) ) { l e t s = t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( a = > a . f u r n i t u r e ) . f i n d ( a = > a . i d = = = e . s l i c e ( 9 ) ) ; s & & t h i s . h a s s & & Y o ( ) . t h e n ( a = > { i f ( t h i s . i s C o n n e c t e d & & t h i s . h a s s ) r e t u r n t h i s . h y d r o n i c M o d u l e = a , a . o p e n H y d r o n i c ( t h i s . h a s s , s ) } ) . c a t c h ( a = > { t h i s . _ e r r o r = S t r i n g ( a ) } ) ; r e t u r n } l e t i = e . s t a r t s W i t h ( " t a p : " ) ? e . s l i c e ( 4 ) : t h i s . t a p P i n s . g e t ( e ) ; i f ( i ) { l e t s = t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( a = > a . f u r n i t u r e ) . f i n d ( a = > a . i d = = = i ) ; s ? . t a p & & n o ( t h i s . h a s s , t h i s , s . t a p ) ; r e t u r n } i f ( t h i s . p l u g i n T a p p e d ( e ) ) r e t u r n ; i f ( e . s t a r t s W i t h ( " g a n g : " ) ) r e t u r n t h i s . t a p P l a t e ( e . s l i c e ( 5 ) , t , r ) ; i f ( e . s t a r t s W i t h ( " o u t d o o r : " ) ) { t h i s . f i r e ( " r o o m - t a p " , { f l o o r I d : n u l l , r o o m I d : " n f - o u t s i d e " } ) ; r e t u r n } i f ( e = = = " g r i d " ) { l e t s = t h i s . b u i l d i n g , a = s ? s . e n e r g y . g r i d ? ? Y e ( s , l = > t h i s . f u r n i t u r e L i n k s ? . g e t ( l . i d ) ? . p o w e r ? ? n u l l ) . g r i d : n u l l ; a & & S e ( t h i s , a ) ; r e t u r n } l e t o = P ( e ) ; i f ( t h i s . h a s s . s y m c o n O b j e c t s ! = = v o i d 0 & & ! W ( t h i s . h a s s , e ) ) { t h i s . h a s s . s t a t e s [ e ] & & ( t h i s . _ m e n u = { e n t i t y : e , x : t , y : r } ) ; r e t u r n } i f ( o = = = " c o v e r " | | o = = = " m e d i a " ) { t h i s . _ m e n u = { e n t i t y : e , x : t , y : r } ; r e t u r n } i f ( o = = = " l o c k " ) { l e t s = Q i ( t h i s . h a s s , e ) , a = O ( t h i s . h a s s , e ) ; c o n f i r m ( M ( t h i s . h a s s , s ? " l o c k _ c o n f i r m _ l o c k " : " l o c k _ c o n f i r m _ u n l o c k " , { n a m e : a } ) ) & & t h i s . h a s s . c a l l S e r v i c e ( " l o c k " , s ? " l o c k " : " u n l o c k " , { e n t i t y _ i d : e } ) ; r e t u r n } i f ( o & & v a . h a s ( o ) ) { i f ( t h i s . c o n f i r m S e t . h a s ( e ) & & ! c o n f i r m ( M ( t h i s . h a s s , " c o n f i r m _ s w i t c h " , { n a m e : O ( t h i s . h a s s , e ) } ) ) ) r e t u r n ; c l ( t h i s . h a s s , e ) } e l s e S e ( t h i s , e ) } p l u g i n T a p p e d ( e ) { l e t t = t h i s . h a s s ? . s t a t e s [ e ] , r = t h i s . p l a c e m e n t I n f o . g e t ( e ) ; i f ( ! t | | ! r ) r e t u r n ! 1 ; l e t i = t h i s . b u i l d i n g ? . f l o o r s . f i n d ( o = > o . i d = = = r . f l o o r I d ) ? . p l a c e m e n t s . f i n d ( o = > o . e n t i t y _ i d = = = e ) ; r e t u r n Q s ( { h a s s : t h i s . h a s s , e n t i t y I d : e , s t a t e : t } , r , i ? . p l u g i n ? ? v o i d 0 , { s h o w W i n d o w : ( o , s ) = > { o & & " h a s s " i n o & & ( o . h a s s = t h i s . h a s s ) , t h i s . _ p l u g i n W i n d o w = o ? { n o d e : o , t i t l e : s ? . t i t l e ? ? " " } : n u l l } , m o r e I n f o : o = > S e ( t h i s , o ? ? e ) } ) } r e n d e r P l u g i n W i n d o w ( ) { l e t e = t h i s . _ p l u g i n W i n d o w ; r e t u r n e ? p ` < d i v c l a s s = " n f - p l u g i n - w i n d o w " @ p o i n t e r d o w n = $ { t = > t . s t o p P r o p a g a t i o n ( ) } >
< div class = "nf-pw-head" > < span > $ { e . title } < / s p a n > < b u t t o n c l a s s = " n f - p w - c l o s e " a r i a - l a b e l = $ { M ( t h i s . h a s s , " c l o s e " ) } @ c l i c k = $ { ( ) = > t h i s . _ p l u g i n W i n d o w = n u l l } > ✕ < / b u t t o n > < / d i v >
< div class = "nf-pw-body" > $ { e . node } < / d i v >
< / d i v > ` : f } s t a r t V i e w O f ( ) { r e t u r n t h i s . s t a r t V i e w ? ? t h i s . b u i l d i n g ? . s e t t i n g s . s t a r t _ v i e w ? ? n u l l } c u r r e n t V i e w ( ) { r e t u r n t h i s . v i e w e r ? . c u r r e n t V i e w ( ) ? ? n u l l } r e s e t V i e w ( ) { t h i s . v i e w e r ? . r e s e t V i e w ( ) } f i r e ( e , t ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( e , { d e t a i l : t , b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } t o g g l e F l o w s ( ) { t h i s . _ f l o w s = ! t h i s . _ f l o w s ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . f l o w s " , t h i s . _ f l o w s ? " 1 " : " 0 " ) } c a t c h { } t h i s . s y n c D e v i c e s ( ! 0 ) } l i v e H e a t P u m p s ( e ) { l e t t = t h i s . h a s s ; i f ( ! t ) r e t u r n [ ] ; l e t r = [ ] ; f o r ( l e t i o f e . f l o o r s ) f o r ( l e t o o f i . f u r n i t u r e ) { i f ( ! w u ( o . t y p e ) ) c o n t i n u e ; l e t s = t h i s . f u r n i t u r e L i n k s ? . g e t ( o . i d ) , a = v u ( t , s ? . e n t i t y ? ? s ? . p o w e r ? ? n u l l ) ; a & & r . p u s h ( { i d : o . i d , n a m e : o . n a m e | | a e ( t , o . t y p e ) , f l o o r I d : i . i d , x : o . x , z : o . z , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : o e ( i , o ) + o . h + . 5 } , p u m p : a } ) } r e t u r n r } l i v e P r i n t e r s ( e ) { l e t t = t h i s . h a s s , r = [ ] ; i f ( ! t ) r e t u r n r ; f o r ( l e t i o f e . f l o o r s ) f o r ( l e t o o f i . f u r n i t u r e ) { i f ( ! Z o ( o . t y p e ) ) c o n t i n u e ; l e t s = t h i s . f u r n i t u r e L i n k s ? . g e t ( o . i d ) , a = q o ( t , s ? . e n t i t y ? ? s ? . p o w e r ? ? n u l l ) ; ! a | | ! a . p r i n t i n g & & ! / p a u s e | f i n i s h | c o m p l e t e | e r r o r / . t e s t ( a . s t a t u s ) | | r . p u s h ( { i d : o . i d , n a m e : o . n a m e | | a e ( t , o . t y p e ) , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : o e ( i , o ) + o . h + . 5 } , p r i n t e r : a } ) } r e t u r n r } l i v e C a r s ( e , t ) { l e t r = [ ] ; f o r ( l e t i o f t . f l o o r s ) f o r ( l e t o o f i . f u r n i t u r e ) { i f ( o . t y p e ! = = " p a r k i n g " ) c o n t i n u e ; l e t s = M u ( e , o ) ; i f ( ! s | | s . s o c = = = n u l l & & s . r a n g e = = = n u l l & & s . l o c k e d = = = n u l l & & s . c l i m a t e O n = = = n u l l ) c o n t i n u e ; l e t a = H o ( e , o ) , l = a ? L c ( o , a ) : n u l l , c = o . n a m e | | ( a ? a e ( e , a ) : a e ( e , o . t y p e ) ) ; r . p u s h ( { s p o t : o . i d , n a m e : c , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : o e ( i , o ) + ( l ? . h ? ? . 2 ) + . 6 } , c a r : s } ) } r e t u r n r } l i v e M e d i a ( e , t ) { l e t r = [ ] ; f o r ( l e t i o f t . f l o o r s ) { f o r ( l e t o o f i . f u r n i t u r e ) { l e t s = t h i s . f u r n i t u r e L i n k s ? . g e t ( o . i d ) ? . e n t i t y ; s ? . s t a r t s W i t h ( " m e d i a _ p l a y e r . " ) & & r . p u s h ( { e n t i t y : s , n a m e : o . n a m e | | a e ( e , o . t y p e ) , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : o e ( i , o ) + o . h + . 1 5 } , r i n g s : o . s o u n d _ r i n g s } ) } f o r ( l e t o o f i . p l a c e m e n t s ) o . e n t i t y _ i d . s t a r t s W i t h ( " m e d i a _ p l a y e r . " ) & & r . p u s h ( { e n t i t y : o . e n t i t y _ i d , n a m e : o . n a m e | | O ( e , o . e n t i t y _ i d ) , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : ( o . y ? ? 1 . 1 ) + . 1 5 } , r i n g s : o . s o u n d _ r i n g s } ) } r e t u r n S c ( e , r ) } r e f r e s h T o d a y ( e ) { l e t t = t h i s . h a s s , r = e . s e t t i n g s . c a l e n d a r s ? ? [ ] , i = M a t h . m a x ( 1 , M a t h . m i n ( 7 , e . s e t t i n g s . t o d a y _ d a y s ? ? 1 ) ) , o = ` $ { n e w D a t e ( ) . t o D a t e S t r i n g ( ) } | $ { i } ` ; ! t | | ! r . l e n g t h | | D a t e . n o w ( ) - t h i s . t o d a y A t < 9 e 5 & & o = = = t h i s . t o d a y D a y | | ( t h i s . t o d a y A t = D a t e . n o w ( ) , t h i s . t o d a y D a y = o , f u ( t , r , i ) . t h e n ( s = > t h i s . _ t o d a y I t e m s = s ) ) } r e f r e s h F o r e c a s t ( e ) { l e t t = t h i s . h a s s , r = e . s e t t i n g s . f o r e c a s t & & t ? a t ( t , t h i s . w e a t h e r E n t i t y I d ? ? e . s e t t i n g s . w e a t h e r _ e n t i t y ) : n u l l ; i f ( ! t | | ! r ) r e t u r n ; l e t i = ` $ { r } | $ { n e w D a t e ( ) . t o D a t e S t r i n g ( ) } ` ; D a t e . n o w ( ) - t h i s . f o r e c a s t A t < 1 8 e 5 & & i = = = t h i s . f o r e c a s t K e y | | ( t h i s . f o r e c a s t A t = D a t e . n o w ( ) , t h i s . f o r e c a s t K e y = i , b u ( t , r ) . t h e n ( o = > t h i s . _ f o r e c a s t = o ) ) } r e n d e r F o r e c a s t ( e ) { l e t t = t h i s . b u i l d i n g , r = t h i s . h a s s , i = t ? . s e t t i n g s . f o r e c a s t ; i f ( ! t | | ! r | | ! i | | i . c o r n e r ! = = e | | t h i s . c l e a n ) r e t u r n f ; i f ( e = = = " t o p _ r i g h t " & & ( t h i s . r o o m I d | | t h i s . p a n e l O p e n ) ) r e t u r n f ; l e t o = _ u ( t h i s . _ f o r e c a s t , M a t h . m a x ( 1 , M a t h . m i n ( 7 , i . d a y s ) ) ) ; i f ( ! o . l e n g t h ) r e t u r n f ; l e t s = a t ( r , t h i s . w e a t h e r E n t i t y I d ? ? t . s e t t i n g s . w e a t h e r _ e n t i t y ) , a = s ? r . s t a t e s [ s ] ? . a t t r i b u t e s : v o i d 0 , l = S t r i n g ( a ? . t e m p e r a t u r e _ u n i t ? ? " \ x B 0 " ) , c = S t r i n g ( a ? . p r e c i p i t a t i o n _ u n i t ? ? " m m " ) , u = r . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , h = n e w I n t l . D a t e T i m e F o r m a t ( u , { w e e k d a y : " s h o r t " } ) , m = d = > d = = = n u l l ? " \ u 2 0 1 3 " : ` $ { M a t h . r o u n d ( d ) } \ x B 0 ` ; r e t u r n p ` < s e c t i o n c l a s s = " n f - f o r e c a s t " a r i a - l a b e l = $ { $ ( r , " f o r e c a s t " ) } >
< / d i v > ` : f } s t a r t V i e w O f ( ) { r e t u r n t h i s . s t a r t V i e w ? ? t h i s . b u i l d i n g ? . s e t t i n g s . s t a r t _ v i e w ? ? n u l l } c u r r e n t V i e w ( ) { r e t u r n t h i s . v i e w e r ? . c u r r e n t V i e w ( ) ? ? n u l l } r e s e t V i e w ( ) { t h i s . v i e w e r ? . r e s e t V i e w ( ) } f i r e ( e , t ) { t h i s . d i s p a t c h E v e n t ( n e w C u s t o m E v e n t ( e , { d e t a i l : t , b u b b l e s : ! 0 , c o m p o s e d : ! 0 } ) ) } t o g g l e F l o w s ( ) { t h i s . _ f l o w s = ! t h i s . _ f l o w s ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . f l o w s " , t h i s . _ f l o w s ? " 1 " : " 0 " ) } c a t c h { } t h i s . s y n c D e v i c e s ( ! 0 ) } l i v e H e a t P u m p s ( e ) { l e t t = t h i s . h a s s ; i f ( ! t ) r e t u r n [ ] ; l e t r = [ ] ; f o r ( l e t i o f e . f l o o r s ) f o r ( l e t o o f i . f u r n i t u r e ) { i f ( ! S u ( o . t y p e ) ) c o n t i n u e ; l e t s = t h i s . f u r n i t u r e L i n k s ? . g e t ( o . i d ) , a = k u ( t , s ? . e n t i t y ? ? s ? . p o w e r ? ? n u l l ) ; a & & r . p u s h ( { i d : o . i d , n a m e : o . n a m e | | l e ( t , o . t y p e ) , f l o o r I d : i . i d , x : o . x , z : o . z , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : s e ( i , o ) + o . h + . 5 } , p u m p : a } ) } r e t u r n r } l i v e P r i n t e r s ( e ) { l e t t = t h i s . h a s s , r = [ ] ; i f ( ! t ) r e t u r n r ; f o r ( l e t i o f e . f l o o r s ) f o r ( l e t o o f i . f u r n i t u r e ) { i f ( ! Q o ( o . t y p e ) ) c o n t i n u e ; l e t s = t h i s . f u r n i t u r e L i n k s ? . g e t ( o . i d ) , a = J o ( t , s ? . e n t i t y ? ? s ? . p o w e r ? ? n u l l ) ; ! a | | ! a . p r i n t i n g & & ! / p a u s e | f i n i s h | c o m p l e t e | e r r o r / . t e s t ( a . s t a t u s ) | | r . p u s h ( { i d : o . i d , n a m e : o . n a m e | | l e ( t , o . t y p e ) , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : s e ( i , o ) + o . h + . 5 } , p r i n t e r : a } ) } r e t u r n r } l i v e C a r s ( e , t ) { l e t r = [ ] ; f o r ( l e t i o f t . f l o o r s ) f o r ( l e t o o f i . f u r n i t u r e ) { i f ( o . t y p e ! = = " p a r k i n g " ) c o n t i n u e ; l e t s = R u ( e , o ) ; i f ( ! s | | s . s o c = = = n u l l & & s . r a n g e = = = n u l l & & s . l o c k e d = = = n u l l & & s . c l i m a t e O n = = = n u l l ) c o n t i n u e ; l e t a = C o ( e , o ) , l = a ? B c ( o , a ) : n u l l , c = o . n a m e | | ( a ? l e ( e , a ) : l e ( e , o . t y p e ) ) ; r . p u s h ( { s p o t : o . i d , n a m e : c , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : s e ( i , o ) + ( l ? . h ? ? . 2 ) + . 6 } , c a r : s } ) } r e t u r n r } l i v e M e d i a ( e , t ) { l e t r = [ ] ; f o r ( l e t i o f t . f l o o r s ) { f o r ( l e t o o f i . f u r n i t u r e ) { l e t s = t h i s . f u r n i t u r e L i n k s ? . g e t ( o . i d ) ? . e n t i t y ; s ? . s t a r t s W i t h ( " m e d i a _ p l a y e r . " ) & & r . p u s h ( { e n t i t y : s , n a m e : o . n a m e | | l e ( e , o . t y p e ) , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : s e ( i , o ) + o . h + . 1 5 } , r i n g s : o . s o u n d _ r i n g s } ) } f o r ( l e t o o f i . p l a c e m e n t s ) o . e n t i t y _ i d . s t a r t s W i t h ( " m e d i a _ p l a y e r . " ) & & r . p u s h ( { e n t i t y : o . e n t i t y _ i d , n a m e : o . n a m e | | O ( e , o . e n t i t y _ i d ) , a t : { f l o o r I d : i . i d , x : o . x , z : o . z , y : ( o . y ? ? 1 . 1 ) + . 1 5 } , r i n g s : o . s o u n d _ r i n g s } ) } r e t u r n A c ( e , r ) } r e f r e s h T o d a y ( e ) { l e t t = t h i s . h a s s , r = e . s e t t i n g s . c a l e n d a r s ? ? [ ] , i = M a t h . m a x ( 1 , M a t h . m i n ( 7 , e . s e t t i n g s . t o d a y _ d a y s ? ? 1 ) ) , o = ` $ { n e w D a t e ( ) . t o D a t e S t r i n g ( ) } | $ { i } ` ; ! t | | ! r . l e n g t h | | D a t e . n o w ( ) - t h i s . t o d a y A t < 9 e 5 & & o = = = t h i s . t o d a y D a y | | ( t h i s . t o d a y A t = D a t e . n o w ( ) , t h i s . t o d a y D a y = o , b u ( t , r , i ) . t h e n ( s = > t h i s . _ t o d a y I t e m s = s ) ) } r e f r e s h F o r e c a s t ( e ) { l e t t = t h i s . h a s s , r = e . s e t t i n g s . f o r e c a s t & & t ? l t ( t , t h i s . w e a t h e r E n t i t y I d ? ? e . s e t t i n g s . w e a t h e r _ e n t i t y ) : n u l l ; i f ( ! t | | ! r ) r e t u r n ; l e t i = ` $ { r } | $ { n e w D a t e ( ) . t o D a t e S t r i n g ( ) } ` ; D a t e . n o w ( ) - t h i s . f o r e c a s t A t < 1 8 e 5 & & i = = = t h i s . f o r e c a s t K e y | | ( t h i s . f o r e c a s t A t = D a t e . n o w ( ) , t h i s . f o r e c a s t K e y = i , w u ( t , r ) . t h e n ( o = > t h i s . _ f o r e c a s t = o ) ) } r e n d e r F o r e c a s t ( e ) { l e t t = t h i s . b u i l d i n g , r = t h i s . h a s s , i = t ? . s e t t i n g s . f o r e c a s t ; i f ( ! t | | ! r | | ! i | | i . c o r n e r ! = = e | | t h i s . c l e a n ) r e t u r n f ; i f ( e = = = " t o p _ r i g h t " & & ( t h i s . r o o m I d | | t h i s . p a n e l O p e n ) ) r e t u r n f ; l e t o = v u ( t h i s . _ f o r e c a s t , M a t h . m a x ( 1 , M a t h . m i n ( 7 , i . d a y s ) ) ) ; i f ( ! o . l e n g t h ) r e t u r n f ; l e t s = l t ( r , t h i s . w e a t h e r E n t i t y I d ? ? t . s e t t i n g s . w e a t h e r _ e n t i t y ) , a = s ? r . s t a t e s [ s ] ? . a t t r i b u t e s : v o i d 0 , l = S t r i n g ( a ? . t e m p e r a t u r e _ u n i t ? ? " \ x B 0 " ) , c = S t r i n g ( a ? . p r e c i p i t a t i o n _ u n i t ? ? " m m " ) , u = r . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , h = n e w I n t l . D a t e T i m e F o r m a t ( u , { w e e k d a y : " s h o r t " } ) , m = d = > d = = = n u l l ? " \ u 2 0 1 3 " : ` $ { M a t h . r o u n d ( d ) } \ x B 0 ` ; r e t u r n p ` < s e c t i o n c l a s s = " n f - f o r e c a s t " a r i a - l a b e l = $ { M ( r , " f o r e c a s t " ) } >
< ul >
$ { o . map ( ( d , g ) => p ` <li>
< span class = "nf-fc-day" > $ { g === 0 ? $ ( r , "today" ) : h . format ( new Date ( d . day ) ) } < / s p a n >
< span class = "nf-fc-day" > $ { g === 0 ? M ( r , "today" ) : h . format ( new Date ( d . day ) ) } < / s p a n >
< span class = "nf-fc-icon" aria - hidden = "true" > $ { d . icon } < / s p a n >
< span class = "nf-fc-temp" title = $ { l } > < b > $ { m ( d . high ) } < / b > < s m a l l > $ { m ( d . l o w ) } < / s m a l l > < / s p a n >
< span class = "nf-fc-rain" > $ { 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 ) } % ` : "" } < / s p a n >
< / l i > ` ) }
< / u l >
< / s e c t i o n > ` } r e n d e r T o d a y ( e ) { l e t t = t h i s . b u i l d i n g , r = t h i s . h a s s ; i f ( ! t | | ! r | | t h i s . c l e a n | | t h i s . r o o m I d | | t h i s . p a n e l O p e n ) r e t u r n f ; l e t i = t h i s . r e n d e r F o r e c a s t ( " t o p _ r i g h t " ) , o = t h i s . t o d a y = = = ! 1 ? f : t h i s . r e n d e r T o d a y C a r d ( t , r ) ; r e t u r n o = = = f & & i = = = f & & e = = = f ? f : p ` < d i v c l a s s = " n f - r i g h t - c o l $ { e ! = = f ? " n f - u t i l i t y - r i g h t " : " " } " s t y l e = $ { t h i s . c l o c k = = = " t o p _ r i g h t " ? " t o p : 7 8 p x " : " " } > $ { e } $ { o } $ { i } < / d i v > ` } r e n d e r T o d a y C a r d ( e , t ) { l e t r = m u ( t , e , D a t e . n o w ( ) , { t o d a y : $ ( t , " c a r e _ b i n _ t o d a y " ) , t o m o r r o w : $ ( t , " c a r e _ b i n _ t o m o r r o w " ) } ) , i = p u ( [ . . . r , . . . t h i s . _ t o d a y I t e m s ? ? [ ] ] ) ; i f ( ! i . l e n g t h & & ! ( e . s e t t i n g s . c a l e n d a r s ? ? [ ] ) . l e n g t h ) r e t u r n f ; l e t o = t h i s . _ t o d a y O p e n ! = = ! 1 , s = n e w I n t l . D a t e T i m e F o r m a t ( t . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , { w e e k d a y : " l o n g " , d a y : " n u m e r i c " , m o n t h : " l o n g " } ) . f o r m a t ( n e w D a t e ) , a = t . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , l = u = > { i f ( u = = = 1 ) r e t u r n $ ( t , " t o m o r r o w " ) ; l e t h = n e w D a t e ; r e t u r n h . s e t D a t e ( h . g e t D a t e ( ) + u ) , n e w I n t l . D a t e T i m e F o r m a t ( a , { w e e k d a y : " l o n g " , d a y : " n u m e r i c " , m o n t h : " n u m e r i c " } ) . f o r m a t ( h ) } , c = i . f l a t M a p ( ( u , h ) = > [ ( u . d a y ? ? 0 ) > 0 & & ( i [ h - 1 ] ? . d a y ? ? 0 ) ! = = u . d a y ? p ` < l i c l a s s = " n f - t o d a y - d a y " > $ { l ( u . d a y ? ? 0 ) } < / l i > ` : f , p ` < l i c l a s s = $ { u . p a s t ? " n f - t o d a y - p a s t " : " " } > < t i m e > $ { u . k i n d = = = " b i n " ? " \ u { 1 F 5 D 1 } " : u . t i m e | | " \ u 2 5 C F " } < / t i m e > < s p a n > $ { u . t i t l e } < s m a l l > $ { u . s o u r c e } < / s m a l l > < / s p a n > < / l i > ` ] ) ; r e t u r n p ` < s e c t i o n c l a s s = " n f - t o d a y $ { o ? " " : " n f - t o d a y - f o l d e d " } " a r i a - l a b e l = $ { $ ( t , " t o d a y " ) } >
< / s e c t i o n > ` } r e n d e r T o d a y ( e ) { l e t t = t h i s . b u i l d i n g , r = t h i s . h a s s ; i f ( ! t | | ! r | | t h i s . c l e a n | | t h i s . r o o m I d | | t h i s . p a n e l O p e n ) r e t u r n f ; l e t i = t h i s . r e n d e r F o r e c a s t ( " t o p _ r i g h t " ) , o = t h i s . t o d a y = = = ! 1 ? f : t h i s . r e n d e r T o d a y C a r d ( t , r ) ; r e t u r n o = = = f & & i = = = f & & e = = = f ? f : p ` < d i v c l a s s = " n f - r i g h t - c o l $ { e ! = = f ? " n f - u t i l i t y - r i g h t " : " " } " s t y l e = $ { t h i s . c l o c k = = = " t o p _ r i g h t " ? " t o p : 7 8 p x " : " " } > $ { e } $ { o } $ { i } < / d i v > ` } r e n d e r T o d a y C a r d ( e , t ) { l e t r = g u ( t , e , D a t e . n o w ( ) , { t o d a y : M ( t , " c a r e _ b i n _ t o d a y " ) , t o m o r r o w : M ( t , " c a r e _ b i n _ t o m o r r o w " ) } ) , i = _ u ( [ . . . r , . . . t h i s . _ t o d a y I t e m s ? ? [ ] ] ) ; i f ( ! i . l e n g t h & & ! ( e . s e t t i n g s . c a l e n d a r s ? ? [ ] ) . l e n g t h ) r e t u r n f ; l e t o = t h i s . _ t o d a y O p e n ! = = ! 1 , s = n e w I n t l . D a t e T i m e F o r m a t ( t . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , { w e e k d a y : " l o n g " , d a y : " n u m e r i c " , m o n t h : " l o n g " } ) . f o r m a t ( n e w D a t e ) , a = t . l a n g u a g e ? ? n a v i g a t o r . l a n g u a g e , l = u = > { i f ( u = = = 1 ) r e t u r n M ( t , " t o m o r r o w " ) ; l e t h = n e w D a t e ; r e t u r n h . s e t D a t e ( h . g e t D a t e ( ) + u ) , n e w I n t l . D a t e T i m e F o r m a t ( a , { w e e k d a y : " l o n g " , d a y : " n u m e r i c " , m o n t h : " n u m e r i c " } ) . f o r m a t ( h ) } , c = i . f l a t M a p ( ( u , h ) = > [ ( u . d a y ? ? 0 ) > 0 & & ( i [ h - 1 ] ? . d a y ? ? 0 ) ! = = u . d a y ? p ` < l i c l a s s = " n f - t o d a y - d a y " > $ { l ( u . d a y ? ? 0 ) } < / l i > ` : f , p ` < l i c l a s s = $ { u . p a s t ? " n f - t o d a y - p a s t " : " " } > < t i m e > $ { u . k i n d = = = " b i n " ? " \ u { 1 F 5 D 1 } " : u . t i m e | | " \ u 2 5 C F " } < / t i m e > < s p a n > $ { u . t i t l e } < s m a l l > $ { u . s o u r c e } < / s m a l l > < / s p a n > < / l i > ` ] ) ; r e t u r n p ` < s e c t i o n c l a s s = " n f - t o d a y $ { o ? " " : " n f - t o d a y - f o l d e d " } " a r i a - l a b e l = $ { M ( t , " t o d a y " ) } >
< button class = "nf-today-head" aria - expanded = $ { o } @ click = $ { ( ) => this . _todayOpen = ! o } >
< b > 📅 $ { $ ( t , "today" ) } < / b > < s p a n > $ { s } < / s p a n >
< b > 📅 $ { M ( t , "today" ) } < / b > < s p a n > $ { s } < / s p a n >
< / b u t t o n >
$ { o ? i . length ? p ` <ul>
$ { c }
< / u l > ` : p ` < p c l a s s = " n f - t o d a y - n o n e " > $ { $ ( t , " t o d a y _ n o n e " ) } < / p > ` : f }
< / s e c t i o n > ` } w e e k = n u l l ; w e e k A t = 0 ; r e f r e s h W e e k ( e ) { l e t t = t h i s . h a s s ; i f ( ! t | | t h i s . _ t r a v e l | | D a t e . n o w ( ) - t h i s . w e e k A t < 3 6 e 5 ) r e t u r n ; t h i s . w e e k A t = D a t e . n o w ( ) ; l e t r = Z e ( e , s = > t h i s . f u r n i t u r e L i n k s ? . g e t ( s . i d ) ? . p o w e r ? ? n u l l ) , i = e . e n e r g y , o = { s o l a r : i . s o l a r ? [ i . s o l a r ] : r . s o l a r , g r i d : i . g r i d ? ? r . g r i d , g r i d I n v e r t : ! ! i . g r i d _ i n v e r t , b a t t e r y : i . b a t t e r y ? [ i . b a t t e r y ] : r . b a t t e r y , b a t t e r y I n v e r t : ! ! i . b a t t e r y _ i n v e r t , c o n s u m p t i o n : i . c o n s u m p t i o n } ; t c ( t , o ) . t h e n ( s = > { t h i s . w e e k = s , t h i s . s y n c D e v i c e s ( ! 0 ) } ) . c a t c h ( ( ) = > t h i s . w e e k = n u l l ) } m e t e r R o w s ( e , t = n u l l ) { l e t r = t h i s . h a s s , i = [ ] , o = t h i s . f l o o r I d ? e . f l o o r s . f i n d ( l = > l . i d = = = t h i s . f l o o r I d ) : v o i d 0 , s = o & & V ( r ) ? C e ( r , o , e . f l o o r s . f l a t M a p ( l = > l . r o o m s ) ) . f i n d ( l = > l . k i n d = = = " e l e c t r i c i t y " & & l . m e t r i c = = = " p o w e r " & & l . u n i t = = = " W " ) : v o i d 0 , a = V ( r ) ? s ? . v a l u e ? ? n u l l : o ? . p o w e r _ e n t i t y ? q ( r ? . s t a t e s [ o . p o w e r _ e n t i t y ] ) : n u l l ; i f ( o & & ( s | | a ! = = n u l l ) ) { l e t l = ! s ? . i n c o m p l e t e & & a ! = = n u l l & & t & & t > 0 ? ` \ x B 7 $ { $ ( r , " f l o o r _ p o w e r _ s h a r e " , { n : M a t h . r o u n d ( M a t h . m a x ( 0 , a ) / t * 1 0 0 ) } ) } ` : " " ; i . p u s h ( { i c o n : " \ u 2 6 A 1 " , l a b e l : o . n a m e , v a l u e : ` $ { s ? N e ( r , s ) : w t ( r , a ) } $ { l } ` } ) } f o r ( l e t [ l , c , u ] o f [ [ " g a s " , " \ u { 1 F 5 2 5 } " , " e n e r g y _ g a s _ s h o r t " ] , [ " w a t e r " , " \ u { 1 F 4 A 7 } " , " e n e r g y _ w a t e r _ s h o r t " ] ] ) { l e t h = e . e n e r g y [ l ] , m = h ? r ? . s t a t e s [ h ] : v o i d 0 ; m & & ! C ( m ) & & i . p u s h ( { i c o n : c , l a b e l : $ ( r , u ) , v a l u e : s e ( r , m ) } ) } r e t u r n i } r e f r e s h D a y C u r v e s ( e ) { l e t t = t h i s . h a s s ; i f ( ! t | | t h i s . _ t r a v e l | | D a t e . n o w ( ) - t h i s . c u r v e s A t < 6 e 5 ) r e t u r n ; t h i s . c u r v e s A t = D a t e . n o w ( ) ; l e t r = a = > $ n ( a , e , S n ( a , e ) , Z e ( e , l = > t h i s . f u r n i t u r e L i n k s ? . g e t ( l . i d ) ? . p o w e r ? ? n u l l ) ) , i = g c ( t , r ) , o = D a t e . n o w ( ) , s = o - 2 4 * 3 6 e 5 ; z n ( t , i , s , o , ! 0 ) . t h e n ( a = > { t h i s . d a y C u r v e s = _ c ( t , a , s , o , r ) , t h i s . s y n c D e v i c e s ( ! 0 ) } ) . c a t c h ( ( ) = > t h i s . d a y C u r v e s = n u l l ) } s y n c H y d r o n i c s ( e , t , r ) { l e t i = + + t h i s . h y d r o n i c G e n e r a t i o n , o = t h i s . s h o w n B u i l d i n g ( r ) . f l o o r s . f i l t e r ( s = > ! t h i s . f l o o r I d | | s . i d = = = t h i s . f l o o r I d ) . f l a t M a p ( s = > s . f u r n i t u r e . f i l t e r ( a = > o t ( a . t y p e ) ) . m a p ( a = > ( { f l o o r : s , i t e m : a } ) ) ) ; i f ( ! o . l e n g t h ) { e . s e t H y d r o n i c s ( [ ] ) , t h i s . h y d r o n i c M o d u l e ? . r e f r e s h H y d r o n i c ( r , t , ! ! t h i s . _ t r a v e l ) ; r e t u r n } j o ( ) . t h e n ( s = > { i ! = = t h i s . h y d r o n i c G e n e r a t i o n | | t h i s . v i e w e r ! = = e | | ! t h i s . i s C o n n e c t e d | | ( t h i s . h y d r o n i c M o d u l e = s , e . s e t H y d r o n i c s ( o . m a p ( ( { f l o o r : a , i t e m : l } ) = > ( { . . . s . h y d r o n i c V i s u a l ( r , l , a . i d , o e ( a , l ) ) , a n i m a t e : ! t h i s . d i m m e d & & ! t h i s . _ t r a v e l } ) ) ) , s . r e f r e s h H y d r o n i c ( r , t , ! ! t h i s . _ t r a v e l ) ) } ) . c a t c h ( s = > { t h i s . _ e r r o r = S t r i n g ( s ) } ) } s y n c L h C a r d s ( e , t , r , i , o , s ) { l e t a = [ ] , l = r . s u m m a r y , c = l . s o l a r ! = = n u l l | | l . g r i d ! = = n u l l | | l . b a t t e r y ! = = n u l l | | l . c o n s u m p t i o n ! = = n u l l , u = N n ( t ) , h = ( t h i s . f l o o r I d ? t . f l o o r s . f i n d ( m = > m . i d = = = t h i s . f l o o r I d ) : v o i d 0 ) ? ? [ . . . t . f l o o r s ] . s o r t ( ( m , d ) = > d . e l e v a t i o n - m . e l e v a t i o n ) [ 0 ] ; i f ( t h i s . l i v e C a r d s O n & & ! t h i s . d i m m e d & & ! t h i s . r o o m I d & & c & & u & & h ) { l e t m = 0 , d = 0 , g = 0 ; f o r ( l e t _ o f h . r o o m s ) f o r ( l e t [ b , y ] o f _ . p o i n t s ) m + = b , d + = y , g + + ; a . p u s h ( { k i n d : " h o u s e " , a t : { f l o o r I d : h . i d , x : g ? m / g : u . x , z : g ? d / g : u . z , y : h . h e i g h t + ( t h i s . f l o o r I d ? 1 . 2 : 3 . 2 ) } , s u m m a r y : l , a u t a r k y : r . a u t a r k y , c u r v e s : t h i s . d a y C u r v e s ? ? v o i d 0 , w e e k : t h i s . w e e k ? ? v o i d 0 , m e t e r s : t h i s . m e t e r R o w s ( t , l . c o n s u m p t i o n ) } ) , t h i s . r e f r e s h D a y C u r v e s ( t ) , t h i s . r e f r e s h W e e k ( t ) } i f ( t h i s . l i v e C a r d s O n & & ! t h i s . d i m m e d & & ! t h i s . r o o m I d ) { f o r ( l e t m o f i ) a . p u s h ( { k i n d : " c a r " , a t : m . a t , s p o t : m . s p o t , n a m e : m . n a m e , c a r : m . c a r } ) ; f o r ( l e t m o f t h i s . l i v e P r i n t e r s ( t ) ) a . p u s h ( { k i n d : " p r i n t e r " , a t : m . a t , n a m e : m . n a m e , p r i n t e r : m . p r i n t e r } ) ; f o r ( l e t m o f t h i s . l i v e H e a t P u m p s ( t ) ) a . p u s h ( { k i n d : " h e a t p u m p " , a t : m . a t , n a m e : m . n a m e , p u m p : m . p u m p } ) ; f o r ( l e t m o f o ) a . p u s h ( { k i n d : " m e d i a " , a t : { . . . m . a t , y : m . a t . y + . 5 } , m e d i a : m } ) } i f ( t h i s . l i v e C a r d s O n & & ! t h i s . d i m m e d ) { a . p u s h ( . . . a u ( s , t , t h i s . f l o o r I d , t h i s . r o o m I d ) ) , a . p u s h ( . . . l u ( s , t , t h i s . f u r n i t u r e L i n k s ? ? n e w M a p , t h i s . f l o o r I d , t h i s . r o o m I d ) ) ; f o r ( l e t m o f t . f l o o r s ) f o r ( l e t d o f m . f u r n i t u r e ) { i f ( ! o t ( d . t y p e ) | | d . h y d r o n i c ? . c a r d = = = ! 1 | | t h i s . f l o o r I d & & m . i d ! = = t h i s . f l o o r I d | | ! U e ( s , d ) ) c o n t i n u e ; l e t g = t h i s . r o o m I d ? m . r o o m s . f i n d ( _ = > _ . i d = = = t h i s . r o o m I d ) : n u l l ; t h i s . r o o m I d & & ( ! g | | ! H ( [ d . x , d . z ] , g . p o i n t s ) ) | | a . p u s h ( { k i n d : " h y d r o n i c " , i t e m : d , r e a d O n l y : ! ! t h i s . _ t r a v e l , a t : { f l o o r I d : m . i d , x : d . x + ( d . p i n _ o f f s e t ? . x ? ? 0 ) , z : d . z + ( d . p i n _ o f f s e t ? . z ? ? 0 ) , y : o e ( m , d ) + d . h + . 3 + ( d . p i n _ o f f s e t ? . y ? ? 0 ) } } ) } } J S O N . s t r i n g i f y ( a ) ! = = J S O N . s t r i n g i f y ( t h i s . _ l i v e C a r d s ) & & ( t h i s . _ l i v e C a r d s = a ) , e . s e t L i v e A n c h o r s ( a . m a p ( m = > m . a t ) , a . l e n g t h ? ( m , d , g , _ , b ) = > t h i s . p l a c e L h C a r d ( m , d , g , _ , b ) : n u l l ) } p l a c e L h C a r d ( e , t , r , i , o ) { l e t s = t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( ` . l i v e - c a r d [ d a t a - i = " $ { e } " ] ` ) ; i f ( ! s ) r e t u r n ; l e t a = t h i s . _ l i v e C a r d s [ e ] , l = ` $ { a . k i n d } : $ { a . a t . f l o o r I d } : $ { a . a t . x } : $ { a . a t . z } ` , c = s . d a t a s e t . z o o m K e y = = = l & & s . d a t a s e t . z o o m V i s i b l e = = = " 1 " , u = t h i s . s h a d o w R o o t ? . a c t i v e E l e m e n t , h = ! ! u & & s . c o n t a i n s ( u ) , m = h | | T u ( a , o , c ) ; s . d a t a s e t . z o o m K e y = l , s . d a t a s e t . z o o m V i s i b l e = m ? " 1 " : " 0 " , s . d a t a s e t . d e n s i t y = S t r i n g ( M a t h . r o u n d ( o ) ) , s . d a t a s e t . p r i o r i t y = S t r i n g ( h ? 1 1 0 : Q o ( a ) . p r i o r i t y ) , s . d a t a s e t . f o c u s e d = h ? " 1 " : " 0 " , s . d a t a s e t . x = S t r i n g ( t ) , s . d a t a s e t . y = S t r i n g ( r ) , s . s t y l e . v i s i b i l i t y = i & & m ? " v i s i b l e " : " h i d d e n " , e = = = t h i s . _ l i v e C a r d s . l e n g t h - 1 & & R u ( t h i s . r e n d e r R o o t ) } t o g g l e H o u s e F o l d ( ) { t h i s . _ h o u s e F o l d e d = ! t h i s . _ h o u s e F o l d e d ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . h o u s e _ c a r d _ f o l d e d " , t h i s . _ h o u s e F o l d e d ? " 1 " : " 0 " ) } c a t c h { } } t o g g l e L h C a r d s ( ) { t h i s . _ l i v e C a r d O n = ! t h i s . _ l i v e C a r d O n ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . c a r d s " , t h i s . _ l i v e C a r d O n ? " 1 " : " 0 " ) } c a t c h { } t h i s . s y n c D e v i c e s ( ! 0 ) } r e n d e r T o p L e f t ( ) { l e t e = t h i s . c l e a n ? f : t h i s . r e n d e r L h E n e r g y ( ) , t = t h i s . r e n d e r F o r e c a s t ( " t o p _ l e f t " ) ; r e t u r n t h i s . c l o c k ! = = " t o p _ l e f t " & & t = = = f | | ! t h i s . h a s s ? e : p ` < d i v c l a s s = " n f - t o p l e f t " > $ { t h i s . c l o c k = = = " t o p _ l e f t " ? t h i s . r e n d e r C l o c k ( ! 0 ) : f } $ { e } $ { t } < / d i v > ` } r e n Line truncated
< / u l > ` : p ` < p c l a s s = " n f - t o d a y - n o n e " > $ { M ( t , " t o d a y _ n o n e " ) } < / p > ` : f }
< / s e c t i o n > ` } w e e k = n u l l ; w e e k A t = 0 ; r e f r e s h W e e k ( e ) { l e t t = t h i s . h a s s ; i f ( ! t | | t h i s . _ t r a v e l | | D a t e . n o w ( ) - t h i s . w e e k A t < 3 6 e 5 ) r e t u r n ; t h i s . w e e k A t = D a t e . n o w ( ) ; l e t r = Y e ( e , s = > t h i s . f u r n i t u r e L i n k s ? . g e t ( s . i d ) ? . p o w e r ? ? n u l l ) , i = e . e n e r g y , o = { s o l a r : i . s o l a r ? [ i . s o l a r ] : r . s o l a r , g r i d : i . g r i d ? ? r . g r i d , g r i d I n v e r t : ! ! i . g r i d _ i n v e r t , b a t t e r y : i . b a t t e r y ? [ i . b a t t e r y ] : r . b a t t e r y , b a t t e r y I n v e r t : ! ! i . b a t t e r y _ i n v e r t , c o n s u m p t i o n : i . c o n s u m p t i o n } ; i c ( t , o ) . t h e n ( s = > { t h i s . w e e k = s , t h i s . s y n c D e v i c e s ( ! 0 ) } ) . c a t c h ( ( ) = > t h i s . w e e k = n u l l ) } m e t e r R o w s ( e , t = n u l l ) { l e t r = t h i s . h a s s , i = [ ] , o = t h i s . f l o o r I d ? e . f l o o r s . f i n d ( l = > l . i d = = = t h i s . f l o o r I d ) : v o i d 0 , s = o & & B ( r ) ? N e ( r , o , e . f l o o r s . f l a t M a p ( l = > l . r o o m s ) ) . f i n d ( l = > l . k i n d = = = " e l e c t r i c i t y " & & l . m e t r i c = = = " p o w e r " & & l . u n i t = = = " W " ) : v o i d 0 , a = B ( r ) ? s ? . v a l u e ? ? n u l l : o ? . p o w e r _ e n t i t y ? Z ( r ? . s t a t e s [ o . p o w e r _ e n t i t y ] ) : n u l l ; i f ( o & & ( s | | a ! = = n u l l ) ) { l e t l = ! s ? . i n c o m p l e t e & & a ! = = n u l l & & t & & t > 0 ? ` \ x B 7 $ { M ( r , " f l o o r _ p o w e r _ s h a r e " , { n : M a t h . r o u n d ( M a t h . m a x ( 0 , a ) / t * 1 0 0 ) } ) } ` : " " ; i . p u s h ( { i c o n : " \ u 2 6 A 1 " , l a b e l : o . n a m e , v a l u e : ` $ { s ? L e ( r , s ) : x t ( r , a ) } $ { l } ` } ) } f o r ( l e t [ l , c , u ] o f [ [ " g a s " , " \ u { 1 F 5 2 5 } " , " e n e r g y _ g a s _ s h o r t " ] , [ " w a t e r " , " \ u { 1 F 4 A 7 } " , " e n e r g y _ w a t e r _ s h o r t " ] ] ) { l e t h = e . e n e r g y [ l ] , m = h ? r ? . s t a t e s [ h ] : v o i d 0 ; m & & ! C ( m ) & & i . p u s h ( { i c o n : c , l a b e l : M ( r , u ) , v a l u e : a e ( r , m ) } ) } r e t u r n i } r e f r e s h D a y C u r v e s ( e ) { l e t t = t h i s . h a s s ; i f ( ! t | | t h i s . _ t r a v e l | | D a t e . n o w ( ) - t h i s . c u r v e s A t < 6 e 5 ) r e t u r n ; t h i s . c u r v e s A t = D a t e . n o w ( ) ; l e t r = a = > A n ( a , e , M n ( a , e ) , Y e ( e , l = > t h i s . f u r n i t u r e L i n k s ? . g e t ( l . i d ) ? . p o w e r ? ? n u l l ) ) , i = y c ( t , r ) , o = D a t e . n o w ( ) , s = o - 2 4 * 3 6 e 5 ; F n ( t , i , s , o , ! 0 ) . t h e n ( a = > { t h i s . d a y C u r v e s = v c ( t , a , s , o , r ) , t h i s . s y n c D e v i c e s ( ! 0 ) } ) . c a t c h ( ( ) = > t h i s . d a y C u r v e s = n u l l ) } s y n c H y d r o n i c s ( e , t , r ) { l e t i = + + t h i s . h y d r o n i c G e n e r a t i o n , o = t h i s . s h o w n B u i l d i n g ( r ) . f l o o r s . f i l t e r ( s = > ! t h i s . f l o o r I d | | s . i d = = = t h i s . f l o o r I d ) . f l a t M a p ( s = > s . f u r n i t u r e . f i l t e r ( a = > s t ( a . t y p e ) ) . m a p ( a = > ( { f l o o r : s , i t e m : a } ) ) ) ; i f ( ! o . l e n g t h ) { e . s e t H y d r o n i c s ( [ ] ) , t h i s . h y d r o n i c M o d u l e ? . r e f r e s h H y d r o n i c ( r , t , ! ! t h i s . _ t r a v e l ) ; r e t u r n } Y o ( ) . t h e n ( s = > { i ! = = t h i s . h y d r o n i c G e n e r a t i o n | | t h i s . v i e w e r ! = = e | | ! t h i s . i s C o n n e c t e d | | ( t h i s . h y d r o n i c M o d u l e = s , e . s e t H y d r o n i c s ( o . m a p ( ( { f l o o r : a , i t e m : l } ) = > ( { . . . s . h y d r o n i c V i s u a l ( r , l , a . i d , s e ( a , l ) ) , a n i m a t e : ! t h i s . d i m m e d & & ! t h i s . _ t r a v e l } ) ) ) , s . r e f r e s h H y d r o n i c ( r , t , ! ! t h i s . _ t r a v e l ) ) } ) . c a t c h ( s = > { t h i s . _ e r r o r = S t r i n g ( s ) } ) } s y n c L h C a r d s ( e , t , r , i , o , s ) { l e t a = [ ] , l = r . s u m m a r y , c = l . s o l a r ! = = n u l l | | l . g r i d ! = = n u l l | | l . b a t t e r y ! = = n u l l | | l . c o n s u m p t i o n ! = = n u l l , u = O n ( t ) , h = ( t h i s . f l o o r I d ? t . f l o o r s . f i n d ( m = > m . i d = = = t h i s . f l o o r I d ) : v o i d 0 ) ? ? [ . . . t . f l o o r s ] . s o r t ( ( m , d ) = > d . e l e v a t i o n - m . e l e v a t i o n ) [ 0 ] ; i f ( t h i s . l i v e C a r d s O n & & ! t h i s . d i m m e d & & ! t h i s . r o o m I d & & c & & u & & h ) { l e t m = 0 , d = 0 , g = 0 ; f o r ( l e t _ o f h . r o o m s ) f o r ( l e t [ b , y ] o f _ . p o i n t s ) m + = b , d + = y , g + + ; a . p u s h ( { k i n d : " h o u s e " , a t : { f l o o r I d : h . i d , x : g ? m / g : u . x , z : g ? d / g : u . z , y : h . h e i g h t + ( t h i s . f l o o r I d ? 1 . 2 : 3 . 2 ) } , s u m m a r y : l , a u t a r k y : r . a u t a r k y , c u r v e s : t h i s . d a y C u r v e s ? ? v o i d 0 , w e e k : t h i s . w e e k ? ? v o i d 0 , m e t e r s : t h i s . m e t e r R o w s ( t , l . c o n s u m p t i o n ) } ) , t h i s . r e f r e s h D a y C u r v e s ( t ) , t h i s . r e f r e s h W e e k ( t ) } i f ( t h i s . l i v e C a r d s O n & & ! t h i s . d i m m e d & & ! t h i s . r o o m I d ) { f o r ( l e t m o f i ) a . p u s h ( { k i n d : " c a r " , a t : m . a t , s p o t : m . s p o t , n a m e : m . n a m e , c a r : m . c a r } ) ; f o r ( l e t m o f t h i s . l i v e P r i n t e r s ( t ) ) a . p u s h ( { k i n d : " p r i n t e r " , a t : m . a t , n a m e : m . n a m e , p r i n t e r : m . p r i n t e r } ) ; f o r ( l e t m o f t h i s . l i v e H e a t P u m p s ( t ) ) a . p u s h ( { k i n d : " h e a t p u m p " , a t : m . a t , n a m e : m . n a m e , p u m p : m . p u m p } ) ; f o r ( l e t m o f o ) a . p u s h ( { k i n d : " m e d i a " , a t : { . . . m . a t , y : m . a t . y + . 5 } , m e d i a : m } ) } i f ( t h i s . l i v e C a r d s O n & & ! t h i s . d i m m e d ) { a . p u s h ( . . . u u ( s , t , t h i s . f l o o r I d , t h i s . r o o m I d ) ) , a . p u s h ( . . . d u ( s , t , t h i s . f u r n i t u r e L i n k s ? ? n e w M a p , t h i s . f l o o r I d , t h i s . r o o m I d ) ) ; f o r ( l e t m o f t . f l o o r s ) f o r ( l e t d o f m . f u r n i t u r e ) { i f ( ! s t ( d . t y p e ) | | d . h y d r o n i c ? . c a r d = = = ! 1 | | t h i s . f l o o r I d & & m . i d ! = = t h i s . f l o o r I d | | ! j e ( s , d ) ) c o n t i n u e ; l e t g = t h i s . r o o m I d ? m . r o o m s . f i n d ( _ = > _ . i d = = = t h i s . r o o m I d ) : n u l l ; t h i s . r o o m I d & & ( ! g | | ! H ( [ d . x , d . z ] , g . p o i n t s ) ) | | a . p u s h ( { k i n d : " h y d r o n i c " , i t e m : d , r e a d O n l y : ! ! t h i s . _ t r a v e l , a t : { f l o o r I d : m . i d , x : d . x + ( d . p i n _ o f f s e t ? . x ? ? 0 ) , z : d . z + ( d . p i n _ o f f s e t ? . z ? ? 0 ) , y : s e ( m , d ) + d . h + . 3 + ( d . p i n _ o f f s e t ? . y ? ? 0 ) } } ) } } J S O N . s t r i n g i f y ( a ) ! = = J S O N . s t r i n g i f y ( t h i s . _ l i v e C a r d s ) & & ( t h i s . _ l i v e C a r d s = a ) , e . s e t L i v e A n c h o r s ( a . m a p ( m = > m . a t ) , a . l e n g t h ? ( m , d , g , _ , b ) = > t h i s . p l a c e L h C a r d ( m , d , g , _ , b ) : n u l l ) } p l a c e L h C a r d ( e , t , r , i , o ) { l e t s = t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( ` . l i v e - c a r d [ d a t a - i = " $ { e } " ] ` ) ; i f ( ! s ) r e t u r n ; l e t a = t h i s . _ l i v e C a r d s [ e ] , l = ` $ { a . k i n d } : $ { a . a t . f l o o r I d } : $ { a . a t . x } : $ { a . a t . z } ` , c = s . d a t a s e t . z o o m K e y = = = l & & s . d a t a s e t . z o o m V i s i b l e = = = " 1 " , u = t h i s . s h a d o w R o o t ? . a c t i v e E l e m e n t , h = ! ! u & & s . c o n t a i n s ( u ) , m = h | | H u ( a , o , c ) ; s . d a t a s e t . z o o m K e y = l , s . d a t a s e t . z o o m V i s i b l e = m ? " 1 " : " 0 " , s . d a t a s e t . d e n s i t y = S t r i n g ( M a t h . r o u n d ( o ) ) , s . d a t a s e t . p r i o r i t y = S t r i n g ( h ? 1 1 0 : t s ( a ) . p r i o r i t y ) , s . d a t a s e t . f o c u s e d = h ? " 1 " : " 0 " , s . d a t a s e t . x = S t r i n g ( t ) , s . d a t a s e t . y = S t r i n g ( r ) , s . s t y l e . v i s i b i l i t y = i & & m ? " v i s i b l e " : " h i d d e n " , e = = = t h i s . _ l i v e C a r d s . l e n g t h - 1 & & T u ( t h i s . r e n d e r R o o t ) } t o g g l e H o u s e F o l d ( ) { t h i s . _ h o u s e F o l d e d = ! t h i s . _ h o u s e F o l d e d ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . h o u s e _ c a r d _ f o l d e d " , t h i s . _ h o u s e F o l d e d ? " 1 " : " 0 " ) } c a t c h { } } t o g g l e L h C a r d s ( ) { t h i s . _ l i v e C a r d O n = ! t h i s . _ l i v e C a r d O n ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . c a r d s " , t h i s . _ l i v e C a r d O n ? " 1 " : " 0 " ) } c a t c h { } t h i s . s y n c D e v i c e s ( ! 0 ) } r e n d e r T o p L e f t ( ) { l e t e = t h i s . c l e a n ? f : t h i s . r e n d e r L h E n e r g y ( ) , t = t h i s . r e n d e r F o r e c a s t ( " t o p _ l e f t " ) ; r e t u r n t h i s . c l o c k ! = = " t o p _ l e f t " & & t = = = f | | ! t h i s . h a s s ? e : p ` < d i v c l a s s = " n f - t o p l e f t " > $ { t h i s . c l o c k = = = " t o p _ l e f t " ? t h i s . r e n d e r C l o c k ( ! 0 ) : f } $ { e } $ { t } < / d i v > ` } r e n Line truncated
$ { s }
$ { this . liveCardsOn && this . _liveCards . some ( c => c . kind === "house" ) ? f : l . map ( c => p ` <div class="nf-energy-item nf-energy- ${ c . cls } "><span> ${ c . label } </span><b> ${ c . value } </b></div> ` ) }
$ { this . flows !== null ? f : p ` <button class="nf-energy-item nf-flow-toggle" aria-pressed= ${ this . _flows } title= ${ a ( "flows_hint" ) } aria-label= ${ a ( "flows" ) } @click= ${ ( ) => this . toggleFlows ( ) } >
@@ -1817,38 +1817,38 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< / b u t t o n > ` }
$ { this . renderCardToggle ( ) }
$ { e }
< / d i v > ` } r e n d e r C a r d T o g g l e ( ) { r e t u r n t h i s . h o l o g r a m s ! = = n u l l ? f : p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - c a r d - t o g g l e " a r i a - p r e s s e d = $ { t h i s . _ l i v e C a r d O n } t i t l e = $ { $ ( t h i s . h a s s , " h o l o s _ h i n t " ) } a r i a - l a b e l = $ { $ ( t h i s . h a s s , " h o l o s " ) } @ c l i c k = $ { ( ) = > t h i s . t o g g l e L h C a r d s ( ) } >
< span > $ { $ ( this . hass , "holos" ) } < / s p a n > < b > ◫ < / b >
< / b u t t o n > ` } u t i l i t y O v e r v i e w ( e ) { l e t t = t h i s . b u i l d i n g ; i f ( ! t | | ! V ( t h i s . h a s s ) | | ! t h i s . s h o w E n e r g y | | t h i s . c l e a n | | t h i s . r o o m I d | | t h i s . p a n e l O p e n | | ! e & & ! t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ) r e t u r n f ; l e t r = t . f l o o r s . f l a t M a p ( o = > o . r o o m s ) ; r e t u r n ( t h i s . f l o o r I d ? t . f l o o r s . f i l t e r ( o = > o . i d = = = t h i s . f l o o r I d ) : t . f l o o r s ) . s o m e ( o = > C e ( t h i s . h a s s , o , r ) . l e n g t h | | B t ( t h i s . h a s s , o , r , ! 0 ) . l e n g t h ) ? p ` < n f - u t i l i t y - o v e r v i e w ? i n l i n e = $ { e } . h a s s = $ { t h i s . h a s s } . f l o o r s = $ { t . f l o o r s } . f l o o r I d = $ { t h i s . f l o o r I d } . c o m p a c t = $ { t h i s . _ n a r r o w S t a g e }
@ utility - open = $ { o => { o . stopPropagation ( ) , o . detail . roomId ? this . openRoom ( o . detail . floorId , o . detail . roomId ) : this . fire ( "floor-tap" , { floorId : o . detail . floorId } ) } } > < / n f - u t i l i t y - o v e r v i e w > ` : f } o w n S e n s o r s ( ) { l e t e = t h i s . u t i l i t y O v e r v i e w ( ! 0 ) , t = e = = = f ? f : p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - u t i l i t y - o v e r v i e w - t o g g l e " a r i a - l a b e l = " R e c h t e Ü b e r s i c h t " a r i a - p r e s s e d = $ { t h i s . _ u t i l i t y O v e r v i e w V i s i b l e } t i t l e = $ { t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ? " R e c h t e \ x D C b e r s i c h t a u s b l e n d e n " : " R e c h t e \ x D C b e r s i c h t e i n b l e n d e n " } @ c l i c k = $ { ( ) = > { t h i s . _ u t i l i t y O v e r v i e w V i s i b l e = ! t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . u t i l i t y _ o v e r v i e w " , t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ? " 1 " : " 0 " ) } c a t c h { } } } > < s p a n > Ü b e r s i c h t < / s p a n > < b a r i a - h i d d e n = " t r u e " > < s v g w i d t h = " 1 8 " h e i g h t = " 1 6 " v i e w B o x = " 0 0 2 0 1 6 " f i l l = " n o n e " s t r o k e = " c u r r e n t C o l o r " s t r o k e - w i d t h = " 1 . 3 " > < r e c t x = " 1 " y = " 1 " w i d t h = " 1 8 " h e i g h t = " 1 4 " r x = " 2 " / > < p a t h d = " M 1 2 1 v 1 4 m 2 - 1 0 h 3 m - 3 3 h 3 m - 3 3 h 3 " / > < / s v g > < / b > < / b u t t o n > ` , r = t h i s . s e n s o r B a r & & t h i s . h a s s ? t h i s . b u i l d i n g ? . s e t t i n g s . s t a t u s _ e n t i t i e s ? ? [ ] : [ ] , i = V ( t h i s . h a s s ) ? ( t h i s . b u i l d i n g ? . p r e s e n c e ? ? [ ] ) . f i l t e r ( c = > f l ( t h i s . h a s s , c . p e r s o n , [ 0 ] ) ) . m a p ( c = > p ` < d i v c l a s s = " n f - e n e r g y - i t e m n f - p r e s e n c e - s t a t e " > < s p a n > $ { c . n a m e | | O ( t h i s . h a s s , c . p e r s o n ) } < / s p a n > < b > $ { l e ( t h i s . h a s s . s t a t e s [ c . p e r s o n ] ) = = = n u l l ? " \ u 2 0 1 3 " : l e ( t h i s . h a s s . s t a t e s [ c . p e r s o n ] ) ? " A n w e s e n d " : " A b w e s e n d " } $ { G ( t h i s . h a s s , [ c . p e r s o n ] , c . n a m e | | " A n w e s e n h e i t " ) } < / b > < / d i v > ` ) : [ ] , o = V ( t h i s . h a s s ) ? O b j e c t . e n t r i e s ( t h i s . b u i l d i n g ? . s e t t i n g s . w e a t h e r _ v a r i a b l e s ? ? { } ) . f i l t e r ( c = > ! ! c [ 1 ] & & c [ 1 ] ! = = " n o n e " ) . m a p ( ( [ c , u ] ) = > [ B u [ c ] | | c , u ] ) : [ ] ; V ( t h i s . h a s s ) & & t h i s . b u i l d i n g ? . s e t t i n g s . r a i n _ s e n s o r & & t h i s . b u i l d i n g . s e t t i n g s . r a i n _ s e n s o r ! = = " n o n e " & & o . p u s h ( [ " R e g e n s e n s o r " , t h i s . b u i l d i n g . s e t t i n g s . r a i n _ s e n s o r ] ) ; l e t s = o . l e n g t h ? p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - w e a t h e r - v a l u e s " a r i a - l a b e l = " W e t t e r w e r t e a n z e i g e n " t i t l e = " W e t t e r w e r t e a n z e i g e n " a r i a - h a s p o p u p = " d i a l o g " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - w e a t h e r - d i a l o g " ) ? . s h o w M o d a l ( ) } > < s p a n > W e t t e r < / s p a n > < b a r i a - h i d d e n = " t r u e " > ⛅ < / b > < / b u t t o n >
< dialog class = "nf-weather-dialog" aria - label = "Wetterwerte" @ keydown = $ { c => c . stopPropagation ( ) } > < header > < b > Wetter < / b > < b u t t o n t y p e = " b u t t o n " c l a s s = " n f - c h i p " a r i a - l a b e l = " S c h l i e ß e n " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - w e a t h e r - d i a l o g " ) ? . c l o s e ( ) } > × < / b u t t o n > < / h e a d e r > $ { o . m a p ( ( [ c , u ] ) = > p ` < p > < s p a n > $ { c } < / s p a n > < b > $ { D e ( t h i s . h a s s . s t a t e s [ u ] ) } $ { G ( t h i s . h a s s , [ u ] , c ) } < / b > < / p > ` ) } < / d i a l o g > ` : f , a = V ( t h i s . h a s s ) ? ( t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] ) . f i l t e r ( c = > ! t h i s . f l o o r I d | | c . i d = = = t h i s . f l o o r I d ) . m a p ( c = > ( { f l o o r : c , r e a d i n g s : C e ( t h i s . h a s s , c , t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( u = > u . r o o m s ) ) } ) ) . f i l t e r ( c = > c . r e a d i n g s . l e n g t h ) : [ ] , l = a . l e n g t h ? p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - u t i l i t y - t o g g l e " a r i a - l a b e l = " S t o c k w e r k s z ä h l e r a n z e i g e n " t i t l e = " S t o c k w e r k s z ä h l e r a n z e i g e n " a r i a - h a s p o p u p = " d i a l o g " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - u t i l i t y - d i a l o g " ) ? . s h o w M o d a l ( ) } > < s p a n > S t o c k w e r k s z ä h l e r < / s p a n > < b a r i a - h i d d e n = " t r u e " > ⚡ 💧 < / b > < / b u t t o n >
< dialog class = "nf-weather-dialog nf-utility-dialog" aria - label = "Stockwerkszähler" @ keydown = $ { c => c . stopPropagation ( ) } > < header > < b > Stockwerkszähler < / b > < b u t t o n t y p e = " b u t t o n " c l a s s = " n f - c h i p " a r i a - l a b e l = " S c h l i e ß e n " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - u t i l i t y - d i a l o g " ) ? . c l o s e ( ) } > × < / b u t t o n > < / h e a d e r > $ { a . m a p ( ( { f l o o r : c , r e a d i n g s : u } ) = > p ` < h 3 > $ { c . n a m e } < / h 3 > < n f - u t i l i t y - r e p o r t . h a s s = $ { t h i s . h a s s } . r e a d i n g s = $ { u } > < / n f - u t i l i t y - r e p o r t > ` ) } < / d i a l o g > ` : f ; r e t u r n [ t , e , . . . i , s , l , . . . r . f i l t e r ( c = > t h i s . h a s s . s t a t e s [ c ] ) . m a p ( c = > p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - o w n - s e n s o r " t i t l e = $ { O ( t h i s . h a s s , c ) } @ c l i c k = $ { ( ) = > k e ( t h i s , c ) } >
< span > $ { O ( this . hass , c ) } < / s p a n > < b > $ { s e ( t h i s . h a s s , t h i s . h a s s . s t a t e s [ c ] ) } < / b >
< / b u t t o n > $ { G ( t h i s . h a s s , [ c ] , O ( t h i s . h a s s , c ) ) } ` ) ] } r e n d e r M a p C r e d i t ( ) { l e t e = t h i s . b u i l d i n g ? . s e t t i n g s . m a p ; r e t u r n G c ( e ) ? p ` < a c l a s s = " n f - m a p - c r e d i t " h r e f = $ { C o ( e ) . h r e f } t a r g e t = " _ b l a n k " r e l = " n o o p e n e r " > $ { C o ( e ) . t e x t } < / a > ` : f } r e n d e r L e g e n d ( ) { i f ( t h i s . h e a t M o d e = = = " w i f i " ) r e t u r n t h i s . r e n d e r W i f i L e g e n d ( ) ; i f ( t h i s . h e a t M o d e = = = " n o n e " | | t h i s . h e a t M o d e = = = " v a l u e s " ) r e t u r n f ; l e t e = v t ( n e w D a t e , t h i s . h a s s ? . c o n f i g ? . l a t i t u d e ? ? 5 0 ) , t = K r ( t h i s . h e a t M o d e , e ) , r = t h i s . h e a t M o d e = = = " t e m p e r a t u r e " , i = r ? c e ( t h i s . h a s s , t . s t o p s [ 0 ] [ 0 ] ) : t . s t o p s [ 0 ] [ 0 ] , o = r ? c e ( t h i s . h a s s , t . s t o p s [ t . s t o p s . l e n g t h - 1 ] [ 0 ] ) : t . s t o p s [ t . s t o p s . l e n g t h - 1 ] [ 0 ] , s = r ? r e ( t h i s . h a s s ) : t . u n i t , a = l = > $ ( t h i s . h a s s , l ) ; r e t u r n p ` < d i v c l a s s = " n f - l e g e n d " >
< / d i v > ` } r e n d e r C a r d T o g g l e ( ) { r e t u r n t h i s . h o l o g r a m s ! = = n u l l ? f : p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - c a r d - t o g g l e " a r i a - p r e s s e d = $ { t h i s . _ l i v e C a r d O n } t i t l e = $ { M ( t h i s . h a s s , " h o l o s _ h i n t " ) } a r i a - l a b e l = $ { M ( t h i s . h a s s , " h o l o s " ) } @ c l i c k = $ { ( ) = > t h i s . t o g g l e L h C a r d s ( ) } >
< span > $ { M ( this . hass , "holos" ) } < / s p a n > < b > ◫ < / b >
< / b u t t o n > ` } u t i l i t y O v e r v i e w ( e ) { l e t t = t h i s . b u i l d i n g ; i f ( ! t | | ! B ( t h i s . h a s s ) | | ! t h i s . s h o w E n e r g y | | t h i s . c l e a n | | t h i s . r o o m I d | | t h i s . p a n e l O p e n | | ! e & & ! t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ) r e t u r n f ; l e t r = t . f l o o r s . f l a t M a p ( o = > o . r o o m s ) ; r e t u r n ( t h i s . f l o o r I d ? t . f l o o r s . f i l t e r ( o = > o . i d = = = t h i s . f l o o r I d ) : t . f l o o r s ) . s o m e ( o = > N e ( t h i s . h a s s , o , r ) . l e n g t h | | K t ( t h i s . h a s s , o , r , ! 0 ) . l e n g t h ) ? p ` < n f - u t i l i t y - o v e r v i e w ? i n l i n e = $ { e } . h a s s = $ { t h i s . h a s s } . f l o o r s = $ { t . f l o o r s } . f l o o r I d = $ { t h i s . f l o o r I d } . c o m p a c t = $ { t h i s . _ n a r r o w S t a g e }
@ utility - open = $ { o => { o . stopPropagation ( ) , o . detail . roomId ? this . openRoom ( o . detail . floorId , o . detail . roomId ) : this . fire ( "floor-tap" , { floorId : o . detail . floorId } ) } } > < / n f - u t i l i t y - o v e r v i e w > ` : f } o w n S e n s o r s ( ) { l e t e = t h i s . u t i l i t y O v e r v i e w ( ! 0 ) , t = e = = = f ? f : p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - u t i l i t y - o v e r v i e w - t o g g l e " a r i a - l a b e l = " R e c h t e Ü b e r s i c h t " a r i a - p r e s s e d = $ { t h i s . _ u t i l i t y O v e r v i e w V i s i b l e } t i t l e = $ { t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ? " R e c h t e \ x D C b e r s i c h t a u s b l e n d e n " : " R e c h t e \ x D C b e r s i c h t e i n b l e n d e n " } @ c l i c k = $ { ( ) = > { t h i s . _ u t i l i t y O v e r v i e w V i s i b l e = ! t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ; t r y { l o c a l S t o r a g e . s e t I t e m ( " n e x t f l o o r . u t i l i t y _ o v e r v i e w " , t h i s . _ u t i l i t y O v e r v i e w V i s i b l e ? " 1 " : " 0 " ) } c a t c h { } } } > < s p a n > Ü b e r s i c h t < / s p a n > < b a r i a - h i d d e n = " t r u e " > < s v g w i d t h = " 1 8 " h e i g h t = " 1 6 " v i e w B o x = " 0 0 2 0 1 6 " f i l l = " n o n e " s t r o k e = " c u r r e n t C o l o r " s t r o k e - w i d t h = " 1 . 3 " > < r e c t x = " 1 " y = " 1 " w i d t h = " 1 8 " h e i g h t = " 1 4 " r x = " 2 " / > < p a t h d = " M 1 2 1 v 1 4 m 2 - 1 0 h 3 m - 3 3 h 3 m - 3 3 h 3 " / > < / s v g > < / b > < / b u t t o n > ` , r = t h i s . s e n s o r B a r & & t h i s . h a s s ? t h i s . b u i l d i n g ? . s e t t i n g s . s t a t u s _ e n t i t i e s ? ? [ ] : [ ] , i = B ( t h i s . h a s s ) ? ( t h i s . b u i l d i n g ? . p r e s e n c e ? ? [ ] ) . f i l t e r ( c = > _ a ( t h i s . h a s s , c . p e r s o n , [ 0 ] ) ) . m a p ( c = > p ` < d i v c l a s s = " n f - e n e r g y - i t e m n f - p r e s e n c e - s t a t e " > < s p a n > $ { c . n a m e | | O ( t h i s . h a s s , c . p e r s o n ) } < / s p a n > < b > $ { c e ( t h i s . h a s s . s t a t e s [ c . p e r s o n ] ) = = = n u l l ? " \ u 2 0 1 3 " : c e ( t h i s . h a s s . s t a t e s [ c . p e r s o n ] ) ? " A n w e s e n d " : " A b w e s e n d " } $ { U ( t h i s . h a s s , [ c . p e r s o n ] , c . n a m e | | " A n w e s e n h e i t " ) } < / b > < / d i v > ` ) : [ ] , o = B ( t h i s . h a s s ) ? O b j e c t . e n t r i e s ( t h i s . b u i l d i n g ? . s e t t i n g s . w e a t h e r _ v a r i a b l e s ? ? { } ) . f i l t e r ( c = > ! ! c [ 1 ] & & c [ 1 ] ! = = " n o n e " ) . m a p ( ( [ c , u ] ) = > [ G u [ c ] | | c , u ] ) : [ ] ; B ( t h i s . h a s s ) & & t h i s . b u i l d i n g ? . s e t t i n g s . r a i n _ s e n s o r & & t h i s . b u i l d i n g . s e t t i n g s . r a i n _ s e n s o r ! = = " n o n e " & & o . p u s h ( [ " R e g e n s e n s o r " , t h i s . b u i l d i n g . s e t t i n g s . r a i n _ s e n s o r ] ) ; l e t s = o . l e n g t h ? p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - w e a t h e r - v a l u e s " a r i a - l a b e l = " W e t t e r w e r t e a n z e i g e n " t i t l e = " W e t t e r w e r t e a n z e i g e n " a r i a - h a s p o p u p = " d i a l o g " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - w e a t h e r - d i a l o g " ) ? . s h o w M o d a l ( ) } > < s p a n > W e t t e r < / s p a n > < b a r i a - h i d d e n = " t r u e " > ⛅ < / b > < / b u t t o n >
< dialog class = "nf-weather-dialog" aria - label = "Wetterwerte" @ keydown = $ { c => c . stopPropagation ( ) } > < header > < b > Wetter < / b > < b u t t o n t y p e = " b u t t o n " c l a s s = " n f - c h i p " a r i a - l a b e l = " S c h l i e ß e n " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - w e a t h e r - d i a l o g " ) ? . c l o s e ( ) } > × < / b u t t o n > < / h e a d e r > $ { o . m a p ( ( [ c , u ] ) = > p ` < p > < s p a n > $ { c } < / s p a n > < b > $ { D e ( t h i s . h a s s . s t a t e s [ u ] ) } $ { U ( t h i s . h a s s , [ u ] , c ) } < / b > < / p > ` ) } < / d i a l o g > ` : f , a = B ( t h i s . h a s s ) ? ( t h i s . b u i l d i n g ? . f l o o r s ? ? [ ] ) . f i l t e r ( c = > ! t h i s . f l o o r I d | | c . i d = = = t h i s . f l o o r I d ) . m a p ( c = > ( { f l o o r : c , r e a d i n g s : N e ( t h i s . h a s s , c , t h i s . b u i l d i n g ? . f l o o r s . f l a t M a p ( u = > u . r o o m s ) ) } ) ) . f i l t e r ( c = > c . r e a d i n g s . l e n g t h ) : [ ] , l = a . l e n g t h ? p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - f l o w - t o g g l e n f - u t i l i t y - t o g g l e " a r i a - l a b e l = " S t o c k w e r k s z ä h l e r a n z e i g e n " t i t l e = " S t o c k w e r k s z ä h l e r a n z e i g e n " a r i a - h a s p o p u p = " d i a l o g " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - u t i l i t y - d i a l o g " ) ? . s h o w M o d a l ( ) } > < s p a n > S t o c k w e r k s z ä h l e r < / s p a n > < b a r i a - h i d d e n = " t r u e " > ⚡ 💧 < / b > < / b u t t o n >
< dialog class = "nf-weather-dialog nf-utility-dialog" aria - label = "Stockwerkszähler" @ keydown = $ { c => c . stopPropagation ( ) } > < header > < b > Stockwerkszähler < / b > < b u t t o n t y p e = " b u t t o n " c l a s s = " n f - c h i p " a r i a - l a b e l = " S c h l i e ß e n " @ c l i c k = $ { ( ) = > t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " . n f - u t i l i t y - d i a l o g " ) ? . c l o s e ( ) } > × < / b u t t o n > < / h e a d e r > $ { a . m a p ( ( { f l o o r : c , r e a d i n g s : u } ) = > p ` < h 3 > $ { c . n a m e } < / h 3 > < n f - u t i l i t y - r e p o r t . h a s s = $ { t h i s . h a s s } . r e a d i n g s = $ { u } > < / n f - u t i l i t y - r e p o r t > ` ) } < / d i a l o g > ` : f ; r e t u r n [ t , e , . . . i , s , l , . . . r . f i l t e r ( c = > t h i s . h a s s . s t a t e s [ c ] ) . m a p ( c = > p ` < b u t t o n c l a s s = " n f - e n e r g y - i t e m n f - o w n - s e n s o r " t i t l e = $ { O ( t h i s . h a s s , c ) } @ c l i c k = $ { ( ) = > S e ( t h i s , c ) } >
< span > $ { O ( this . hass , c ) } < / s p a n > < b > $ { a e ( t h i s . h a s s , t h i s . h a s s . s t a t e s [ c ] ) } < / b >
< / b u t t o n > $ { U ( t h i s . h a s s , [ c ] , O ( t h i s . h a s s , c ) ) } ` ) ] } r e n d e r M a p C r e d i t ( ) { l e t e = t h i s . b u i l d i n g ? . s e t t i n g s . m a p ; r e t u r n q c ( e ) ? p ` < a c l a s s = " n f - m a p - c r e d i t " h r e f = $ { O o ( e ) . h r e f } t a r g e t = " _ b l a n k " r e l = " n o o p e n e r " > $ { O o ( e ) . t e x t } < / a > ` : f } r e n d e r L e g e n d ( ) { i f ( t h i s . h e a t M o d e = = = " w i f i " ) r e t u r n t h i s . r e n d e r W i f i L e g e n d ( ) ; i f ( t h i s . h e a t M o d e = = = " n o n e " | | t h i s . h e a t M o d e = = = " v a l u e s " ) r e t u r n f ; l e t e = w t ( n e w D a t e , t h i s . h a s s ? . c o n f i g ? . l a t i t u d e ? ? 5 0 ) , t = U r ( t h i s . h e a t M o d e , e ) , r = t h i s . h e a t M o d e = = = " t e m p e r a t u r e " , i = r ? u e ( t h i s . h a s s , t . s t o p s [ 0 ] [ 0 ] ) : t . s t o p s [ 0 ] [ 0 ] , o = r ? u e ( t h i s . h a s s , t . s t o p s [ t . s t o p s . l e n g t h - 1 ] [ 0 ] ) : t . s t o p s [ t . s t o p s . l e n g t h - 1 ] [ 0 ] , s = r ? i e ( t h i s . h a s s ) : t . u n i t , a = l = > M ( t h i s . h a s s , l ) ; r e t u r n p ` < d i v c l a s s = " n f - l e g e n d " >
< b > $ { a ( ` heat_ ${ this . heatMode } ` ) } $ { this . heatMode === "temperature" ? p ` <small> ${ a ( e ? "heat_summer" : "heat_winter" ) } </small> ` : f } < / b >
< span class = "nf-legend-bar" style = "background:${e c(this.heatMode,e)}" > < / s p a n >
< span class = "nf-legend-bar" style = "background:${r c(this.heatMode,e)}" > < / s p a n >
< span class = "nf-legend-range" > < span > $ { L ( this . hass , i , 0 ) } $ { s } < / s p a n > < s p a n > $ { L ( t h i s . h a s s , o , 0 ) } $ { s } < / s p a n > < / s p a n >
$ { this . heatValues . size ? f : p ` <span class="nf-legend-none"> ${ a ( "heat_none_found" ) } </span> ` }
< / d i v > ` } r e n d e r W i f i L e g e n d ( ) { l e t e = t h i s . h a s s , t = t h i s . b u i l d i n g ; i f ( ! e | | ! t ) r e t u r n f ; l e t r = ( c , u ) = > $ ( e , c , u ) , i = t . f l o o r s . f l a t M a p ( c = > c . f u r n i t u r e . f i l t e r ( u = > Y o ( u . t y p e ) ) . m a p ( u = > J o ( e , t h i s . f u r n i t u r e L i n k s ? . g e t ( u . i d ) ? . e n t i t y ? ? t h i s . f u r n i t u r e L i n k s ? . g e t ( u . i d ) ? . p o w e r ? ? n u l l ) ) ) , s = i . f i l t e r ( c = > ! ! c ) . r e d u c e ( ( c , u ) = > c + ( u . c l i e n t s ? ? 0 ) , 0 ) , a = t . f l o o r s . f l a t M a p ( c = > c . p l a c e m e n t s . m a p ( u = > e . s t a t e s [ u . e n t i t y _ i d ] ) ) , l = S u ( a ) ; r e t u r n p ` < d i v c l a s s = " n f - l e g e n d " >
< / d i v > ` } r e n d e r W i f i L e g e n d ( ) { l e t e = t h i s . h a s s , t = t h i s . b u i l d i n g ; i f ( ! e | | ! t ) r e t u r n f ; l e t r = ( c , u ) = > M ( e , c , u ) , i = t . f l o o r s . f l a t M a p ( c = > c . f u r n i t u r e . f i l t e r ( u = > X o ( u . t y p e ) ) . m a p ( u = > e s ( e , t h i s . f u r n i t u r e L i n k s ? . g e t ( u . i d ) ? . e n t i t y ? ? t h i s . f u r n i t u r e L i n k s ? . g e t ( u . i d ) ? . p o w e r ? ? n u l l ) ) ) , s = i . f i l t e r ( c = > ! ! c ) . r e d u c e ( ( c , u ) = > c + ( u . c l i e n t s ? ? 0 ) , 0 ) , a = t . f l o o r s . f l a t M a p ( c = > c . p l a c e m e n t s . m a p ( u = > e . s t a t e s [ u . e n t i t y _ i d ] ) ) , l = A u ( a ) ; r e t u r n p ` < d i v c l a s s = " n f - l e g e n d " >
< b > 📶 $ { r ( "heat_wifi" ) } < / b >
< span > $ { r ( "wifi_aps" , { n : i . length , clients : s } ) } < / s p a n >
$ { l . online + l . offline . length ? p ` <span> ${ r ( "wifi_network" , { online : l . online , offline : l . offline . length } )}</span> ` : f }
$ { l . offline . length ? p ` <span class="nf-legend-none"> ${ l . offline . slice ( 0 , 4 ) . join ( ", " ) } </span> ` : f }
$ { i . length ? f : p ` <span class="nf-legend-none"> ${ r ( "wifi_none" ) } </span> ` }
< / d i v > ` } s k y C o l o r ( ) { l e t e = F n [ t h i s . t h e m e ] ? ? F n . n e o n , t = t h i s . _ s k y ; r e t u r n e . n i g h t [ 0 ] . m a p ( ( r , i ) = > M a t h . r o u n d ( r + ( e . d a y [ 0 ] [ i ] - r ) * t ) ) } r e n d e r ( ) { l e t e = t h i s . u t i l i t y O v e r v i e w ( ! 1 ) , t = t h i s . _ s k y , r = ( s , a ) = > ` r g b ( $ { s . m a p ( ( l , c ) = > M a t h . r o u n d ( l + ( a [ c ] - l ) * t ) ) . j o i n ( " , " ) } ) ` , i = F n [ t h i s . t h e m e ] ? ? F n . n e o n , o = ` - - n f - s k y : $ { r ( i . n i g h t [ 0 ] , i . d a y [ 0 ] ) } ; - - n f - g r o u n d : $ { r ( i . n i g h t [ 1 ] , i . d a y [ 1 ] ) } ` + x c ( t h i s . b u i l d i n g ? . s e t t i n g s . b a c k d r o p ) ; r e t u r n p ` < d i v
< / d i v > ` } s k y C o l o r ( ) { l e t e = H n [ t h i s . t h e m e ] ? ? H n . n e o n , t = t h i s . _ s k y ; r e t u r n e . n i g h t [ 0 ] . m a p ( ( r , i ) = > M a t h . r o u n d ( r + ( e . d a y [ 0 ] [ i ] - r ) * t ) ) } r e n d e r ( ) { l e t e = t h i s . u t i l i t y O v e r v i e w ( ! 1 ) , t = t h i s . _ s k y , r = ( s , a ) = > ` r g b ( $ { s . m a p ( ( l , c ) = > M a t h . r o u n d ( l + ( a [ c ] - l ) * t ) ) . j o i n ( " , " ) } ) ` , i = H n [ t h i s . t h e m e ] ? ? H n . n e o n , o = ` - - n f - s k y : $ { r ( i . n i g h t [ 0 ] , i . d a y [ 0 ] ) } ; - - n f - g r o u n d : $ { r ( i . n i g h t [ 1 ] , i . d a y [ 1 ] ) } ` + $ c ( t h i s . b u i l d i n g ? . s e t t i n g s . b a c k d r o p ) ; r e t u r n p ` < d i v
class = "nf-stage ${this.roomLabels?" ":" nf - no - room - names "} ${this._low?" nf - low ":" "} ${this.panelOpen?" nf - panel - open ":" "} ${this._alerts.length?" nf - has - alerts ":" "} ${this._narrowStage?" nf - narrow ":" "} ${e!==f?" nf - has - utility - overview ":" "}"
style = $ { o }
>
$ { this . _error ? p ` <p class="nf-error"> ${ this . _error } </p> ` : f } $ { this . renderTopLeft ( ) } $ { Eu ( 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 . _error ? p ` <p class="nf-error"> ${ this . _error } </p> ` : 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 ` <span class="nf-stats"
> < b > $ { this . _stats . fps ? $ ( this . hass , "stats_fps" , { fps : this . _stats . fps , ms : this . _stats . worstMs } ) : $ ( this . hass , "stats_idle" ) } < / b >
$ { this . _stats . busy . length ? p ` ( ${ this . _stats . busy . map ( s => $ ( this . hass , ` stats_busy_ ${ s } ` ) ) . join ( ", " ) } ) ` : f } ·
$ { $ ( this . hass , "stats" , { calls : this . _stats . calls , tris : this . _stats . triangles . toLocaleString ( ) } ) } ·
$ { $ ( this . hass , this . _stats . low ? "stats_low" : "stats_full" , { r : L ( this . hass , this . _stats . pixelRatio , 2 ) } ) } < / s p a n
> < b > $ { this . _stats . fps ? M ( this . hass , "stats_fps" , { fps : this . _stats . fps , ms : this . _stats . worstMs } ) : M ( this . hass , "stats_idle" ) } < / b >
$ { 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 ) } ) } < / s p a n
> ` :f}
< / d i v > ` } s t a t i c s t y l e s = [ y e , H e , z u , J `
< / d i v > ` } s t a t i c s t y l e s = [ v e , P e , D u , Q `
: host {
display : block ;
position : relative ;
@@ -3449,26 +3449,26 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
inset : auto 16 px 16 px ;
color : var ( -- nf - danger ) ;
}
` ]};customElements.get("nf-view3d")||customElements.define("nf-view3d",s s);function h e(n,e){return Math.abs(e)>=1e3? ` $ { L ( n , e / 1e3 , 1 ) } kW ` : ` $ { Math . round ( e ) } W ` }function o s(n){return n.type==="tv_board"?n.h+.9:n.type==="tv_wall"||n.type==="kitchen_wall"?n.h+.25:n.h+.35}function o g(n,e){let t=e.attributes.percentage;return e.state==="on"&&typeof t=="number"? ` $ { Math . round ( t ) } % ` :s e(n,e)}var Z u;function Y u(){let n=new URL("./nextfloor-editor.js?v=1a84ce4ff399 ",new URL(import.meta.url)).href;return Z u??=import(n),Z u}var s g=.25,Ju =n=>Math.round(n*1e3)/1e3,Qu =(n,e,t)=>n.rooms.find(r=>r.points.length>=3&&H([e,t],r.points));function l s(n,e,t,r,i){let o=Qu (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 a g(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(u e(e e(o,t),r))<.02&&Math.abs(u e(e e(a,t),r))<.02}))}var a s=(n,e)=>Math.abs((n-e+540)%360-180);function Xu (n,e,t,r=s g){let i=Qu (n,e.x,e.z);if(!i)return null;let o=i.points,s=g t(o)>=0?1:-1,a=null;return o.forEach((l,c)=>{let u=o[(c+1)%o.length],h=q e(e e(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=u e(e e([e.x,e.z],l),m);if(g<0||g>h)return;let _=a g(n,i,l,d)?t/2:0,b=u e(e e([e.x,e.z],l),d)-_,y=Math.atan2(-d[0],d[1])*180/Math.PI,k =[{rotation:y,extent:e.d/2},{rotation:y+90,extent:e.w/2},{rotation:y-90,extent:e.w/2}].reduce((z,E )=>a s(e.rotation,E .rotation)<a s(e.rotation,z.rotation)?E :z);if(a s(e.rotation,k .rotation)>50)return;let M =b-k .extent;Math.abs(M )>r||a&&Math.abs(M )>=Math.abs(a.gap)||(a={x:Ju (e.x-d[0]*M ),z:Ju (e.z-d[1]*M ),rotation:(Math.round(k .rotation)%360+360)%360,gap:M })}),a&&{x:a.x,z:a.z,rotation:a.rotation}}function d i(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 h i(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 e d(n,e){let t=structuredClone(n);for(let r of t.floors)r.furniture=r.furniture.filter(i=>i.id!==e);return t}function t d(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 n d(n,e,t,r){return h i(n,e,(i,o)=>{[i.x,i.z]=l s(o,i.x,i.z,t,r)})}function r d(n,e,t,r){let i=n.settings.wall_interior??.12;return d i(n,e,(o,s)=>{[o.x,o.z]=l s(s,o.x,o.z,t,r);let a=Xu (s,o,i);a&&Object.assign(o,a)})}var c s=(n,e)=>((n+e)%360+360)%360,i d=n=>Number.parseFloat(n.replace(",",".")),G n=(n,e)=>Math.round(n*10**e)/10**e;function u s(n){let{min:e,max:t,accepts:r=()=>!0}=n,i=o=>{let s=i d(o.target.value);!Number.isFinite(s)||!r(s)||n.apply(t===void 0?s:Math.min(t,Math.max(e,s)))};return p ` < label class = "nf-size" title = $ { n . title }
` ]};customElements.get("nf-view3d")||customElements.define("nf-view3d",c s);function m e(n,e){return Math.abs(e)>=1e3? ` $ { L ( n , e / 1e3 , 1 ) } kW ` : ` $ { Math . round ( e ) } W ` }function l s(n){return n.type==="tv_board"?n.h+.9:n.type==="tv_wall"||n.type==="kitchen_wall"?n.h+.25:n.h+.35}function l g(n,e){let t=e.attributes.percentage;return e.state==="on"&&typeof t=="number"? ` $ { Math . round ( t ) } % ` :a e(n,e)}var Q u;function X u(){let n=new URL("./nextfloor-editor.js?v=2e4ad9d61b43 ",new URL(import.meta.url)).href;return Q u??=import(n),Q u}var c g=.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 d s(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 u g(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(d e(t e(o,t),r))<.02&&Math.abs(d e(t e(a,t),r))<.02}))}var u s=(n,e)=>Math.abs((n-e+540)%360-180);function nd (n,e,t,r=c g){let i=td (n,e.x,e.z);if(!i)return null;let o=i.points,s=_ t(o)>=0?1:-1,a=null;return o.forEach((l,c)=>{let u=o[(c+1)%o.length],h=Z e(t e(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=d e(t e([e.x,e.z],l),m);if(g<0||g>h)return;let _=u g(n,i,l,d)?t/2:0,b=d e(t e([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 )=>u s(e.rotation,x .rotation)<u s(e.rotation,z.rotation)?x :z);if(u s(e.rotation,S .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 m i(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 p i(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 r d(n,e){let t=structuredClone(n);for(let r of t.floors)r.furniture=r.furniture.filter(i=>i.id!==e);return t}function i d(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 o d(n,e,t,r){return p i(n,e,(i,o)=>{[i.x,i.z]=d s(o,i.x,i.z,t,r)})}function s d(n,e,t,r){let i=n.settings.wall_interior??.12;return m i(n,e,(o,s)=>{[o.x,o.z]=d s(s,o.x,o.z,t,r);let a=nd (s,o,i);a&&Object.assign(o,a)})}var h s=(n,e)=>((n+e)%360+360)%360,a d=n=>Number.parseFloat(n.replace(",",".")),j n=(n,e)=>Math.round(n*10**e)/10**e;function m s(n){let{min:e,max:t,accepts:r=()=>!0}=n,i=o=>{let s=a d(o.target.value);!Number.isFinite(s)||!r(s)||n.apply(t===void 0?s:Math.min(t,Math.max(e,s)))};return p ` < label class = "nf-size" title = $ { n . title }
> $ { n . label }
< input type = "number" inputmode = "decimal" step = $ { n . step } min = $ { e } max = $ { t ? ? f } . value = $ { String ( Gn ( n . value , 2 ) ) } @ change = $ { i } / >
< / l a b e l > ` } v a r s d = ( n , e ) = > p ` < b u t t o n c l a s s = " n f - c h i p " @ c l i c k = $ { e } > $ { n . t ( " h e i g h t _ a u t o " ) } < / b u t t o n > ` , o d = ( n , e ) = > p ` < b u t t o n c l a s s = " n f - c h i p " @ c l i c k = $ { ( ) = > e ( - n ) } > ↺ $ { n } ° < / b u t t o n > < b u t t o n c l a s s = " n f - c h i p " @ c l i c k = $ { ( ) = > e ( n ) } > ↻ $ { n } ° < / b u t t o n > ` ; f u n c t i o n l g ( n , e ) { l e t t = n . b u i l d i n g . f l o o r s . f i n d ( s = > s . f u r n i t u r e . s o m e ( a = > a . i d = = = e ) ) , r = t ? . f u r n i t u r e . f i n d ( s = > s . i d = = = e ) ; i f ( ! t | | ! r ) r e t u r n f ; l e t i = ( s , a ) = > u s ( { l a b e l : n . t ( a ) , t i t l e : n . t ( ` s i z e _ $ { s } ` ) , v a l u e : r [ s ] , s t e p : . 0 5 , m i n : . 0 5 , a c c e p t s : l = > l > 0 , a p p l y : l = > n . e d i t F u r n i t u r e ( e , c = > c [ s ] = G n ( l , 3 ) ) } ) , o = d a ( r ) ? p ` $ { u s ( { l a b e l : " \ u 2 1 9 5 " , t i t l e : n . t ( " m o u n t _ h e i g h t " ) , v a l u e : r . m o u n t _ y ? ? o e ( t , r ) , s t e p : . 0 5 , m i n : 0 , a c c e p t s : s = > s > = 0 , a p p l y : s = > n . e d i t F u r n i t u r e ( e , a = > a . m o u n t _ y = G n ( s , 3 ) ) } ) }
$ { r . mount _y != null ? sd ( 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 c g(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 ` < select class = "nf-size-select" title = $ { n . t ( l ) } @ change = $ { h => n . editDevice ( e , m => Object . assign ( m , { mount : h . target . value , y : null } ) ) } >
< input type = "number" inputmode = "decimal" step = $ { n . step } min = $ { e } max = $ { t ? ? f } . value = $ { String ( jn ( n . value , 2 ) ) } @ change = $ { i } / >
< / l a b e l > ` } v a r c d = ( n , e ) = > p ` < b u t t o n c l a s s = " n f - c h i p " @ c l i c k = $ { e } > $ { n . t ( " h e i g h t _ a u t o " ) } < / b u t t o n > ` , l d = ( n , e ) = > p ` < b u t t o n c l a s s = " n f - c h i p " @ c l i c k = $ { ( ) = > e ( - n ) } > ↺ $ { n } ° < / b u t t o n > < b u t t o n c l a s s = " n f - c h i p " @ c l i c k = $ { ( ) = > e ( n ) } > ↻ $ { n } ° < / b u t t o n > ` ; f u n c t i o n d g ( n , e ) { l e t t = n . b u i l d i n g . f l o o r s . f i n d ( s = > s . f u r n i t u r e . s o m e ( a = > a . i d = = = e ) ) , r = t ? . f u r n i t u r e . f i n d ( s = > s . i d = = = e ) ; i f ( ! t | | ! r ) r e t u r n f ; l e t i = ( s , a ) = > m s ( { l a b e l : n . t ( a ) , t i t l e : n . t ( ` s i z e _ $ { s } ` ) , v a l u e : r [ s ] , s t e p : . 0 5 , m i n : . 0 5 , a c c e p t s : l = > l > 0 , a p p l y : l = > n . e d i t F u r n i t u r e ( e , c = > c [ s ] = j n ( l , 3 ) ) } ) , o = p a ( r ) ? p ` $ { m s ( { l a b e l : " \ u 2 1 9 5 " , t i t l e : n . t ( " m o u n t _ h e i g h t " ) , v a l u e : r . m o u n t _ y ? ? s e ( t , r ) , s t e p : . 0 5 , m i n : 0 , a c c e p t s : s = > s > = 0 , a p p l y : s = > n . e d i t F u r n i t u r e ( e , a = > a . m o u n t _ y = j n ( 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 h g(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 ` < select class = "nf-size-select" title = $ { n . t ( l ) } @ change = $ { h => n . editDevice ( e , m => Object . assign ( m , { mount : h . target . value , y : null } ) ) } >
$ { c . map ( ( [ h , m ] ) => p ` <option value= ${ h } ?selected= ${ h === u } > ${ m } </option> ` ) }
< / s e l e c t > ` , s = [ " c e i l i n g " , " f l o o r " , " t a b l e " , " w a l l " ] . m a p ( l = > [ l , n . t ( ` l a m p _ $ { l } ` ) ] ) , a = i ? H t ( i , x e ( t , r . x , r . z ) , i = = = " l i g h t " ? r . m o u n t ? ? " c e i l i n g " : n u l l ) : 1 ; r e t u r n p ` $ { i = = = " l i g h t " ? o ( " l a m p _ m o u n t " , s , r . m o u n t ? ? " c e i l i n g " ) : f }
$ { us ( { 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 = Gn ( l , 3 ) ) } ) }
$ { r . y !== null ? sd ( n , ( ) => n . editDevice ( e , l => l . y = null ) ) : f } ` }function a d(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 ` < span > $ { o ? ae ( n . hass , o ) : "" } < / s p a n >
$ { lg ( n , e ) } $ { od ( 45 , s => n . turnFurniture ( e , s ) ) }
< / s e l e c t > ` , s = [ " c e i l i n g " , " f l o o r " , " t a b l e " , " w a l l " ] . m a p ( l = > [ l , n . t ( ` l a m p _ $ { l } ` ) ] ) , a = i ? I t ( i , k e ( t , r . x , r . z ) , i = = = " l i g h t " ? r . m o u n t ? ? " c e i l i n g " : n u l l ) : 1 ; r e t u r n p ` $ { i = = = " l i g h t " ? o ( " l a m p _ m o u n t " , s , r . m o u n t ? ? " c e i l i n g " ) : 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 u d(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 ` < span > $ { o ? le ( n . hass , o ) : "" } < / s p a n >
$ { dg ( n , e ) } $ { ld ( 45 , s => n . turnFurniture ( e , s ) ) }
< button class = "nf-chip" title = $ { r ( "furn_mirror_hint" ) } @ click = $ { ( ) => n . editFurniture ( e , s => s . mirror = ! s . mirror ) } > ⇋ $ { r ( "furn_mirror" ) } < / b u t t o n >
< button class = "nf-chip nf-danger-chip" @ click = $ { ( ) => n . removeFurniture ( e ) } > $ { r ( "delete" ) } < / b u t t o n > ` } e l s e t ? i = p ` < s p a n > $ { O ( n . h a s s , t ) } < / s p a n >
$ { cg ( n , t ) } $ { od ( 45 , o => n . turnDevice ( t , o ) ) }
< button class = "nf-chip nf-danger-chip" @ click = $ { ( ) => n . removeDevice ( t ) } > $ { r ( "delete" ) } < / b u t t o n > ` : i = p ` < s p a n > $ { r ( " f u r n i s h _ h i n t " ) } < / s p a n > ` ; r e t u r n p ` < d i v c l a s s = " n f - f u r n i s h - b a r " > $ { i } < b u t t o n c l a s s = " n f - c h i p n f - c h i p - o n " @ c l i c k = $ { ( ) = > n . f i n i s h ( ) } > $ { r ( " d o n e " ) } < / b u t t o n > < / d i v > ` } v a r l d = n e ` < s v g c l a s s = " n f - m a r k " v i e w B o x = " 6 0 4 0 3 9 2 4 2 0 " a r i a - h i d d e n = " t r u e " >
$ { hg ( n , t ) } $ { ld ( 45 , o => n . turnDevice ( t , o ) ) }
< button class = "nf-chip nf-danger-chip" @ click = $ { ( ) => n . removeDevice ( t ) } > $ { r ( "delete" ) } < / b u t t o n > ` : i = p ` < s p a n > $ { r ( " f u r n i s h _ h i n t " ) } < / s p a n > ` ; r e t u r n p ` < d i v c l a s s = " n f - f u r n i s h - b a r " > $ { i } < b u t t o n c l a s s = " n f - c h i p n f - c h i p - o n " @ c l i c k = $ { ( ) = > n . f i n i s h ( ) } > $ { r ( " d o n e " ) } < / b u t t o n > < / d i v > ` } v a r d d = r e ` < s v g c l a s s = " n f - m a r k " v i e w B o x = " 6 0 4 0 3 9 2 4 2 0 " a r i a - h i d d e n = " t r u e " >
< polygon points = "106,150 256,66 406,150 256,234" fill = "none" stroke = "currentColor" stroke - opacity = ".55" stroke - width = "12" stroke - dasharray = "6 22" stroke - linecap = "round" / >
< polygon points = "106,382 256,466 256,488 106,404" fill = "#34507d" / > < polygon points = "406,382 256,466 256,488 406,404" fill = "#2a4068" / > < polygon points = "106,382 256,298 406,382 256,466" fill = "#5f7fb6" / >
< polygon points = "106,310 256,394 256,416 106,332" fill = "#4a72b8" / > < polygon points = "406,310 256,394 256,416 406,332" fill = "#3b5c98" / > < polygon points = "106,310 256,226 406,310 256,394" fill = "#8ab6f5" / >
< polygon points = "106,238 256,322 256,344 106,260" fill = "#2a74d8" / > < polygon points = "406,238 256,322 256,344 406,260" fill = "#2161b8" / > < polygon points = "106,238 256,154 406,238 256,322" fill = "#4fb6ff" / >
< circle cx = "256" cy = "236" r = "16" fill = "#ffe08a" / >
< /svg>`;var m e=(n,e)=>({name:n,fallback:e,read:t=>e?t!=="0":t==="1",write:t=>t?"1":"0"}),e n=(n,e,t)=>({name:n,fallback:t,read:r=>e.find(i=>i===r)??t,write:r=>r}),d s={explode:m e("explode",!0),keepRoof:m e("roof",!1),solidWalls:m e("solid_walls",!1),quality:e n("quality",["auto","low","high"],"auto"),stats:m e("stats",!1),markers:e n("markers",["none","important","all"],"important"),heat:e n("heat",["none","temperature","humidity","co2","mould","comfort","power","sun","values","wifi"],"none"),theme:e n("theme",Qr ,"neon"),clock:e n("clock",["none","top_left","top_right","bottom_left","bottom_right"],"none"),accent:{name:"accent",fallback:null,read:n=>/ ^ # [ 0 - 9 a - f ] { 6 } $ / i . test ( n ) ? n : null , write : n => n ? ? "" } , floorStack : en ( "floor_stack" , [ "dim" , "stacked" , "single" ] , "dim" ) , roomNames : me ( "room_names" , ! 0 ) , clean : me ( "clean" , ! 1 ) , navWrap : me ( "nav_wrap" , ! 1 ) , weather : me ( "weather" , ! 0 ) , timeSlider : me ( "time_slider" , ! 1 ) , menuOpen : me ( "menu_open" , ! 1 ) , keepCamera : me ( "keep_camera" , ! 1 ) , readable : me ( "readable" , ! 1 ) , plain : me ( "plain" , ! 1 ) , rightBack : me ( "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 : me ( "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 cd ( n = pi ( ) ) { try { return n ? . getItem ( "nextfloor.screen_name" ) ? . trim ( ) || null } catch { return null } } function ud ( n = pi ( ) ) { try { return n ? . getItem ( "nextfloor.announce_muted" ) === "1" } catch { return ! 1 } } function pi ( ) { try { return localStorage } catch { return null } } var mi = 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 ( ds ) ) { let i = ds [ 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 = ds [ e ] ; try { this . storage ? . setItem ( ` nextfloor. ${ r . name } ` , r . write ( t ) ) } catch { } } } ; var dd = J `
< /svg>`;var p e=(n,e)=>({name:n,fallback:e,read:t=>e?t!=="0":t==="1",write:t=>t?"1":"0"}),n n=(n,e,t)=>({name:n,fallback:t,read:r=>e.find(i=>i===r)??t,write:r=>r}),p s={explode:p e("explode",!0),keepRoof:p e("roof",!1),solidWalls:p e("solid_walls",!1),quality:n n("quality",["auto","low","high"],"auto"),stats:p e("stats",!1),markers:n n("markers",["none","important","all"],"important"),heat:n n("heat",["none","temperature","humidity","co2","mould","comfort","power","sun","values","wifi"],"none"),theme:n n("theme",ei ,"neon"),clock:n n("clock",["none","top_left","top_right","bottom_left","bottom_right"],"none"),accent:{name:"accent",fallback:null,read:n=>/ ^ # [ 0 - 9 a - 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 : 8 px ;
@@ -3960,11 +3960,11 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
gap : 12 px ;
margin : auto ;
}
` ;var h d=new WeakMap,m d=new WeakMap;function S t(n,e){let t=m d.get(n)??n,r=h d.get(t)??new WeakMap;h d.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 B e(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=P t(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?P t(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 S =g.tilt?t.states[g.tilt]:void 0;return y&&g.tilt&&!S ?.attributes.symcon_id&&typeof S ?.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 m d.set(a,t),r.set(e,a),a}var h s=class extends Q {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 D t(this);store=new m i(p i());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:f t(R t(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 ` < button class = "nf-chip" aria - pressed = $ { t !== null } title = $ { e ( "time_of_day_hint" ) } @ click = $ { ( ) => ( this . _timeDrag = null , this . _timeOfDay = t === null ? i ( ) : null ) } > ☀ $ { t === null ? e ( "time_of_day" ) : r ( t ) } < / b u t t o n >
` ;var f d=new WeakMap,g d=new WeakMap;function $ t(n,e){let t=g d.get(n)??n,r=f d.get(t)??new WeakMap;f d.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 V e(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=C t(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?C t(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 g d.set(a,t),r.set(e,a),a}var f s=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 P t(this);store=new f i(g i());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:g t(z t(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 ` < button class = "nf-chip" aria - pressed = $ { t !== null } title = $ { e ( "time_of_day_hint" ) } @ click = $ { ( ) => ( this . _timeDrag = null , this . _timeOfDay = t === null ? i ( ) : null ) } > ☀ $ { t === null ? e ( "time_of_day" ) : r ( t ) } < / b u t t o n >
$ { t !== null ? p ` <label class="nf-chip nf-time-slider"
> < input type = "range" min = "0" max = "23.75" step = "0.25" . value = $ { String ( t ) } aria - label = $ { e ( "time_of_day" ) } @ input = $ { o => this . _timeDrag = Number ( o . target . value ) }
@ change = $ { o => ( this . _timeDrag = null , this . _timeOfDay = Number ( o . target . value ) ) }
/ > < / l a b e l > ` : f } ` } t = ( e , t ) = > $ ( t h i s . h a s s , e , t ) ; s e t P r e f ( e , t ) { t h i s . _ p r e f s = { . . . t h i s . _ p r e f s , [ e ] : t } , t h i s . s t o r e . s a v e ( e , t ) } w i l l U p d a t e ( e ) { t h i s . t o g g l e A t t r i b u t e ( " r e a d a b l e " , ! ! t h i s . _ p r e f s ? . r e a d a b l e ) , e . h a s ( " h a s s " ) & & t h i s . h a s s & & ( t h i s . s t y l e . c o l o r S c h e m e = F r ( t h i s . h a s s ) , t h i s . d a t a . s e t H a s s ( t h i s . h a s s ) ) ; l e t t = t h i s . d a t a . b u i l d i n g ; t & & t h i s . _ f l o o r I d & & ! t . f l o o r s . s o m e ( r = > r . i d = = = t h i s . _ f l o o r I d ) & & ( t h i s . _ f l o o r I d = n u l l , t h i s . _ r o o m I d = n u l l ) } g e t i s A d m i n ( ) { r e t u r n t h i s . h a s s ? . u s e r ? . i s _ a d m i n ? ? ! 1 } s e t M o d e ( e ) { e ! = = t h i s . _ m o d e & & ( e = = = " v i e w " & & t h i s . d a t a . f l u s h ( ) , t h i s . _ m o d e = e ) } o p e n F l o o r ( e ) { t h i s . _ f l o o r I d = e , t h i s . _ r o o m I d = n u l l , t h i s . _ o u t s i d e = ! 1 } o u t s i d e I d s ( e ) { l e t t = t h i s . o u t s i d e M e m o ; i f ( t & & t . b u i l d i n g = = = e & & t . e n t i t i e s = = = t h i s . h a s s . e n t i t i e s ) r e t u r n t . i d s ; l e t r = _ n ( t h i s . h a s s , e . f l o o r s , e . s e t t i n g s . o u t s i d e _ h i d d e n ) ; r e t u r n t h i s . o u t s i d e M e m o = { b u i l d i n g : e , e n t i t i e s : t h i s . h a s s . e n t i t i e s , i d s : r } , r } o p e n O u t s i d e ( ) { l e t e = ! t h i s . _ o u t s i d e ; t h i s . o p e n F l o o r ( n u l l ) , t h i s . _ o u t s i d e = e } o n R o o m T a p ( e ) { l e t { f l o o r I d : t , r o o m I d : r } = e . d e t a i l ; i f ( r = = = " n f - o u t s i d e " ) r e t u r n t h i s . o p e n O u t s i d e ( ) ; i f ( ( t h i s . d a t a . b u i l d i n g ? . f l o o r s . l e n g t h ? ? 0 ) > 1 & & t & & t h i s . _ f l o o r I d ! = = t ) r e t u r n t h i s . o p e n F l o o r ( t ) ; r & & ( t h i s . _ r o o m I d = r = = = t h i s . _ r o o m I d ? n u l l : r , t h i s . _ o u t s i d e = ! 1 ) } f u r n i s h H o s t = { h a s s : v o i d 0 , b u i l d i n g : v o i d 0 , t : t h i s . t , e d i t F u r n i t u r e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > d i ( r , e , t ) ) , e d i t D e v i c e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > h i ( r , e , t ) ) , t u r n F u r n i t u r e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > d i ( r , e , i = > i . r o t a t i o n = c s ( i . r o t a t i o n , t ) ) ) , t u r n D e v i c e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > h i ( r , e , i = > i . r o t a t i o n = c s ( i . r o t a t i o n ? ? 0 , t ) ) ) , r e m o v e F u r n i t u r e : e = > { t h i s . a p p l y E d i t ( t = > e d ( t , e ) ) , t h i s . _ s e l F u r n i t u r e = n u l l } , r e m o v e D e v i c e : e = > { t h i s . a p p l y E d i t ( t = > t d ( t , e ) ) , t h i s . _ s e l D e v i c e = n u l l } , f i n i s h : ( ) = > { t h i s . _ f u r n i s h = ! 1 , t h i s . _ s e l F u r n i t u r e = n u l l , t h i s . _ s e l D e v i c e = n u l l } } ; s a v e M o o d s ( e , t ) { t h i s . a p p l y E d i t ( r = > ( { . . . r , f l o o r s : r . f l o o r s . m a p ( i = > ( { . . . i , r o o m s : i . r o o m s . m a p ( o = > o . i d = = = e ? { . . . o , m o o d s : t . l e n g t h ? t : v o i d 0 } : o ) } ) ) } ) ) } a p p l y E d i t ( e ) { l e t t = t h i s . d a t a . b u i l d i n g ; t & & t h i s . d a t a . e d i t ( e ( t ) ) } v i e w 3 d ( ) { r e t u r n t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " n f - v i e w 3 d " ) } b a c k ( ) { t h i s . _ o u t s i d e ? t h i s . _ o u t s i d e = ! 1 : t h i s . _ r o o m I d ? t h i s . _ r o o m I d = n u l l : t h i s . _ f l o o r I d & & ( t h i s . d a t a . b u i l d i n g ? . f l o o r s . l e n g t h ? ? 0 ) > 1 ? t h i s . _ f l o o r I d = n u l l : t h i s . v i e w 3 d ( ) ? . r e s e t V i e w ( ) } o n K e y = e = > { e . k e y ! = = " E s c a p e " | | t h i s . _ m o d e ! = = " v i e w " | | ( t h i s . _ p r e f s . c l e a n ? t h i s . s e t P r e f ( " c l e a n " , ! 1 ) : t h i s . b a c k ( ) ) } ; c o n n e c t e d C a l l b a c k ( ) { s u p e r . c o n n e c t e d C a l l b a c k ( ) , w i n d o w . a d d E v e n t L i s t e n e r ( " k e y d o w n " , t h i s . o n K e y ) } d i s c o n n e c t e d C a l l b a c k ( ) { s u p e r . d i s c o n n e c t e d C a l l b a c k ( ) , w i n d o w . r e m o v e E v e n t L i s t e n e r ( " k e y d o w n " , t h i s . o n K e y ) } r e n d e r ( ) { i f ( t h i s . h a s s & & M r ( t h i s . h a s s , t h i s ) ) r e t u r n f ; l e t e = t h i s . d a t a . b u i l d i n g , t = t h i s . _ p r e f s . c l e a n & & t h i s . _ m o d e = = = " v i e w " , r = f ; r e t u r n e & & ( t h i s . _ m o d e = = = " e d i t o r " & & t h i s . i s A d m i n ? r = t h i s . r e n d e r E d i t o r ( e ) : t h i s . _ m o d e = = = " e x t e n s i o n s " & & t h i s . i s A d m i n ? r = t h i s . r e n d e r E x t e n s i o n s ( ) : r = t h i s . r e n d e r V i e w ( e ) ) , p ` < d i v c l a s s = " n f - a p p $ { t ? " n f - c l e a n " : " " } " s t y l e = $ { t h i s . _ p r e f s . a c c e n t ? ` - - n f - a c c e n t : $ { t h i s . _ p r e f s . a c c e n t } ` : " " } >
/ > < / l a b e l > ` : f } ` } t = ( e , t ) = > M ( t h i s . h a s s , e , t ) ; s e t P r e f ( e , t ) { t h i s . _ p r e f s = { . . . t h i s . _ p r e f s , [ e ] : t } , t h i s . s t o r e . s a v e ( e , t ) } w i l l U p d a t e ( e ) { t h i s . t o g g l e A t t r i b u t e ( " r e a d a b l e " , ! ! t h i s . _ p r e f s ? . r e a d a b l e ) , e . h a s ( " h a s s " ) & & t h i s . h a s s & & ( t h i s . s t y l e . c o l o r S c h e m e = H r ( t h i s . h a s s ) , t h i s . d a t a . s e t H a s s ( t h i s . h a s s ) ) ; l e t t = t h i s . d a t a . b u i l d i n g ; t & & t h i s . _ f l o o r I d & & ! t . f l o o r s . s o m e ( r = > r . i d = = = t h i s . _ f l o o r I d ) & & ( t h i s . _ f l o o r I d = n u l l , t h i s . _ r o o m I d = n u l l ) } g e t i s A d m i n ( ) { r e t u r n t h i s . h a s s ? . u s e r ? . i s _ a d m i n ? ? ! 1 } s e t M o d e ( e ) { e ! = = " v i e w " & & ! t h i s . i s A d m i n | | e ! = = t h i s . _ m o d e & & ( e = = = " v i e w " & & t h i s . d a t a . f l u s h ( ) , t h i s . _ m o d e = e ) } o p e n F l o o r ( e ) { t h i s . _ f l o o r I d = e , t h i s . _ r o o m I d = n u l l , t h i s . _ o u t s i d e = ! 1 } o u t s i d e I d s ( e ) { l e t t = t h i s . o u t s i d e M e m o ; i f ( t & & t . b u i l d i n g = = = e & & t . e n t i t i e s = = = t h i s . h a s s . e n t i t i e s ) r e t u r n t . i d s ; l e t r = y n ( t h i s . h a s s , e . f l o o r s , e . s e t t i n g s . o u t s i d e _ h i d d e n ) ; r e t u r n t h i s . o u t s i d e M e m o = { b u i l d i n g : e , e n t i t i e s : t h i s . h a s s . e n t i t i e s , i d s : r } , r } o p e n O u t s i d e ( ) { l e t e = ! t h i s . _ o u t s i d e ; t h i s . o p e n F l o o r ( n u l l ) , t h i s . _ o u t s i d e = e } o n R o o m T a p ( e ) { l e t { f l o o r I d : t , r o o m I d : r } = e . d e t a i l ; i f ( r = = = " n f - o u t s i d e " ) r e t u r n t h i s . o p e n O u t s i d e ( ) ; i f ( ( t h i s . d a t a . b u i l d i n g ? . f l o o r s . l e n g t h ? ? 0 ) > 1 & & t & & t h i s . _ f l o o r I d ! = = t ) r e t u r n t h i s . o p e n F l o o r ( t ) ; r & & ( t h i s . _ r o o m I d = r = = = t h i s . _ r o o m I d ? n u l l : r , t h i s . _ o u t s i d e = ! 1 ) } f u r n i s h H o s t = { h a s s : v o i d 0 , b u i l d i n g : v o i d 0 , t : t h i s . t , e d i t F u r n i t u r e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > m i ( r , e , t ) ) , e d i t D e v i c e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > p i ( r , e , t ) ) , t u r n F u r n i t u r e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > m i ( r , e , i = > i . r o t a t i o n = h s ( i . r o t a t i o n , t ) ) ) , t u r n D e v i c e : ( e , t ) = > t h i s . a p p l y E d i t ( r = > p i ( r , e , i = > i . r o t a t i o n = h s ( i . r o t a t i o n ? ? 0 , t ) ) ) , r e m o v e F u r n i t u r e : e = > { t h i s . a p p l y E d i t ( t = > r d ( t , e ) ) , t h i s . _ s e l F u r n i t u r e = n u l l } , r e m o v e D e v i c e : e = > { t h i s . a p p l y E d i t ( t = > i d ( t , e ) ) , t h i s . _ s e l D e v i c e = n u l l } , f i n i s h : ( ) = > { t h i s . _ f u r n i s h = ! 1 , t h i s . _ s e l F u r n i t u r e = n u l l , t h i s . _ s e l D e v i c e = n u l l } } ; s a v e M o o d s ( e , t ) { t h i s . a p p l y E d i t ( r = > ( { . . . r , f l o o r s : r . f l o o r s . m a p ( i = > ( { . . . i , r o o m s : i . r o o m s . m a p ( o = > o . i d = = = e ? { . . . o , m o o d s : t . l e n g t h ? t : v o i d 0 } : o ) } ) ) } ) ) } a p p l y E d i t ( e ) { l e t t = t h i s . d a t a . b u i l d i n g ; t & & t h i s . d a t a . e d i t ( e ( t ) ) } v i e w 3 d ( ) { r e t u r n t h i s . r e n d e r R o o t . q u e r y S e l e c t o r ( " n f - v i e w 3 d " ) } b a c k ( ) { t h i s . _ o u t s i d e ? t h i s . _ o u t s i d e = ! 1 : t h i s . _ r o o m I d ? t h i s . _ r o o m I d = n u l l : t h i s . _ f l o o r I d & & ( t h i s . d a t a . b u i l d i n g ? . f l o o r s . l e n g t h ? ? 0 ) > 1 ? t h i s . _ f l o o r I d = n u l l : t h i s . v i e w 3 d ( ) ? . r e s e t V i e w ( ) } o n K e y = e = > { e . k e y ! = = " E s c a p e " | | t h i s . _ m o d e ! = = " v i e w " | | ( t h i s . _ p r e f s . c l e a n ? t h i s . s e t P r e f ( " c l e a n " , ! 1 ) : t h i s . b a c k ( ) ) } ; c o n n e c t e d C a l l b a c k ( ) { s u p e r . c o n n e c t e d C a l l b a c k ( ) , w i n d o w . a d d E v e n t L i s t e n e r ( " k e y d o w n " , t h i s . o n K e y ) } d i s c o n n e c t e d C a l l b a c k ( ) { s u p e r . d i s c o n n e c t e d C a l l b a c k ( ) , w i n d o w . r e m o v e E v e n t L i s t e n e r ( " k e y d o w n " , t h i s . o n K e y ) } r e n d e r ( ) { i f ( t h i s . h a s s & & E r ( t h i s . h a s s , t h i s ) ) r e t u r n f ; l e t e = t h i s . d a t a . b u i l d i n g , t = t h i s . _ p r e f s . c l e a n & & t h i s . _ m o d e = = = " v i e w " , r = f ; r e t u r n e & & ( t h i s . _ m o d e = = = " e d i t o r " & & t h i s . i s A d m i n ? r = t h i s . r e n d e r E d i t o r ( e ) : t h i s . _ m o d e = = = " e x t e n s i o n s " & & t h i s . i s A d m i n ? r = t h i s . r e n d e r E x t e n s i o n s ( ) : r = t h i s . r e n d e r V i e w ( e ) ) , p ` < d i v c l a s s = " n f - a p p $ { t ? " n f - c l e a n " : " " } " s t y l e = $ { t h i s . _ p r e f s . a c c e n t ? ` - - n f - a c c e n t : $ { t h i s . _ p r e f s . a c c e n t } ` : " " } >
$ { t ? f : p ` ${ this . renderHeader ( e ) } ${ this . renderNotices ( ) } ` }
$ { this . data . error && ! e ? p ` <p class="nf-message"> ${ this . t ( "load_error" ) } : ${ this . data . error } </p> ` : f }
$ { ! e && ! this . data . error ? p ` <p class="nf-message"> ${ this . t ( "loading" ) } </p> ` : f }
@@ -3977,7 +3977,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< / l a b e l > ` } r e n d e r V i e w O p t i o n s ( ) { l e t e = t h i s . _ p r e f s ; r e t u r n p ` < b u t t o n c l a s s = " n f - o p t s - b t n " a r i a - e x p a n d e d = $ { t h i s . _ o p t s O p e n } t i t l e = $ { t h i s . t ( " v i e w _ o p t i o n s " ) } a r i a - l a b e l = $ { t h i s . t ( " v i e w _ o p t i o n s " ) } @ c l i c k = $ { ( ) = > t h i s . _ o p t s O p e n = ! t h i s . _ o p t s O p e n } > ⚙ < / b u t t o n >
< div class = "nf-view-opts ${this._optsOpen?" nf - opts - open ":" "}" >
$ { this . choiceRow ( "quality" , [ "auto" , "low" , "high" ] , e . quality , t => this . t ( ` quality_ ${ t } ` ) , t => this . setPref ( "quality" , t ) ) }
$ { this . choiceRow ( "theme" , Qr , e . theme , t => this . t ( ` theme_ ${ t } ` ) , t => this . setPref ( "theme" , t ) , this . accentPicker ( ) ) }
$ { 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 ) ) }
< label class = "nf-seg nf-clock-pick" title = $ { this . t ( "clock" ) }
> 🕒
@@ -3993,7 +3993,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
> $ { this . t ( "glass_walls" ) }
< input type = "range" min = "0" max = "100" step = "5" . value = $ { String ( e . glassWalls ) } aria - label = $ { this . t ( "glass_walls" ) } @ input = $ { t => this . setPref ( "glassWalls" , Number ( t . target . value ) ) } / >
< / l a b e l >
$ { V ( this . hass ) ? f : p ` <details class="nf-seg nf-screen-pick">
$ { B ( this . hass ) ? f : p ` <details class="nf-seg nf-screen-pick">
< summary title = $ { this . t ( e . announceMuted ? "announce_muted" : "announce_on" ) } aria - label = $ { this . t ( e . announceMuted ? "announce_muted" : "announce_on" ) } > $ { e . announceMuted ? "\u{1F507}" : "\u{1F4E2}" } < / s u m m a r y >
< div class = "nf-screen-menu" >
< label class = "nf-check" > < input type = "checkbox" . checked = $ { ! e . announceMuted } @ change = $ { t => this . setPref ( "announceMuted" , ! t . target . checked ) } / > $ { this . t ( "announce_on" ) } < / l a b e l >
@@ -4016,7 +4016,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< / d i v >
< / d i v > ` } a s y n c r e l o a d V a r i a b l e s ( ) { i f ( ! ( t h i s . _ v a r i a b l e s L o a d i n g | | ! t h i s . h a s s . s y m c o n R e f r e s h ) ) { t h i s . _ v a r i a b l e s L o a d i n g = ! 0 , t h i s . _ v a r i a b l e s N o t i c e = " " , t h i s . _ v a r i a b l e s E r r o r = ! 1 ; t r y { a w a i t t h i s . h a s s . s y m c o n R e f r e s h ( ) , t h i s . _ v a r i a b l e s N o t i c e = t h i s . t ( " s y m c o n _ v a r i a b l e s _ l o a d e d " ) } c a t c h ( e ) { t h i s . _ v a r i a b l e s E r r o r = ! 0 , t h i s . _ v a r i a b l e s N o t i c e = t h i s . t ( " s y m c o n _ v a r i a b l e s _ e r r o r " , { e r r o r : e i n s t a n c e o f E r r o r ? e . m e s s a g e : S t r i n g ( e ) } ) } f i n a l l y { t h i s . _ v a r i a b l e s L o a d i n g = ! 1 } } } r e n d e r H e a d e r ( e ) { l e t t = t h i s . h a s s ? . s y m c o n T i t l e ? . t r i m ( ) | | " N e x t F l o o r " , r = t h i s . d a t a . s a v e S t a t e , i = ( s , a , l = " " ) = > p ` < b u t t o n r o l e = " t a b " c l a s s = $ { l } a r i a - p r e s s e d = $ { t h i s . _ m o d e = = = s } @ c l i c k = $ { ( ) = > t h i s . s e t M o d e ( s ) } > $ { a } < / b u t t o n > ` , o = r = = = " s a v i n g " ? " s a v i n g " : r = = = " s a v e d " ? " s a v e d " : " s a v e _ e r r o r " ; r e t u r n p ` < h e a d e r c l a s s = " n f - h e a d e r " >
< ha - menu - button . hass = $ { this . hass } . narrow = $ { this . narrow } > < / h a - m e n u - b u t t o n >
< h1 title = $ { t } > $ { ld } < span class = "nf-view-title" > $ { t } < / s p a n > < / h 1 >
< h1 title = $ { t } > $ { dd } < span class = "nf-view-title" > $ { t } < / s p a n > < / h 1 >
$ { this . isAdmin ? p ` <div class="nf-seg" role="tablist"> ${ i ( "view" , this . t ( "view" ) ) } ${ i ( "editor" , this . t ( "editor" ) ) } ${ i ( "extensions" , ` \u 2726 ${ this . t ( "ext_tab" ) } ` , "nf-tab-ext" ) } </div> ` : f }
< span class = "nf-grow" > < / s p a n >
$ { this . _mode === "view" && e ? . floors . some ( s => s . rooms . length ) ? p ` <button class="nf-chip nf-room-names-toggle" aria-pressed= ${ this . _prefs . roomNames } title= ${ this . t ( "room_names_toggle_hint" ) } @click= ${ ( ) => this . setPref ( "roomNames" , ! this . _prefs . roomNames ) } > ${ this . t ( "room_names_short" ) } </button> ` : f }
@@ -4031,7 +4031,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< span > $ { this . t ( "draft_found" , { time : r } ) } < / s p a n >
< button class = "nf-btn nf-primary" @ click = $ { ( ) => e . restoreDraft ( ) } > $ { this . t ( "draft_restore" ) } < / b u t t o n >
< button class = "nf-btn" @ click = $ { ( ) => e . discardDraft ( ) } > $ { this . t ( "draft_discard" ) } < / b u t t o n >
< / d i v > ` ) } r e t u r n t . l e n g t h > 0 ? p ` < d i v c l a s s = " n f - n o t i c e s " > $ { t } < / d i v > ` : f } w h e n E d i t o r L o a d e d ( e ) { r e t u r n t h i s . _ e d i t o r R e a d y ? e ( ) : ( Y u ( ) . t h e n ( ( ) = > t h i s . _ e d i t o r R e a d y = ! 0 , t = > t h i s . d a t a . e r r o r = S t r i n g ( t ) ) , p ` < d i v c l a s s = " n f - e m p t y " > < p > $ { t h i s . t ( " l o a d i n g " ) } < / p > < / d i v > ` ) } r e n d e r E x t e n s i o n s ( ) { r e t u r n t h i s . w h e n E d i t o r L o a d e d ( ( ) = > p ` < n f - e x t e n s i o n s c l a s s = " n f - b o d y " . h a s s = $ { t h i s . h a s s } . p a c k s = $ { t h i s . d a t a . p a c k s } . p l u g i n s = $ { t h i s . d a t a . b u i l d i n g ? . s e t t i n g s . p l u g i n s ? ? [ ] }
< / d i v > ` ) } r e t u r n t . l e n g t h > 0 ? p ` < d i v c l a s s = " n f - n o t i c e s " > $ { t } < / d i v > ` : f } w h e n E d i t o r L o a d e d ( e ) { r e t u r n t h i s . _ e d i t o r R e a d y ? e ( ) : ( X u ( ) . t h e n ( ( ) = > t h i s . _ e d i t o r R e a d y = ! 0 , t = > t h i s . d a t a . e r r o r = S t r i n g ( t ) ) , p ` < d i v c l a s s = " n f - e m p t y " > < p > $ { t h i s . t ( " l o a d i n g " ) } < / p > < / d i v > ` ) } r e n d e r E x t e n s i o n s ( ) { r e t u r n t h i s . w h e n E d i t o r L o a d e d ( ( ) = > p ` < n f - e x t e n s i o n s c l a s s = " n f - b o d y " . h a s s = $ { t h i s . h a s s } . p a c k s = $ { t h i s . d a t a . p a c k s } . p l u g i n s = $ { t h i s . d a t a . b u i l d i n g ? . s e t t i n g s . p l u g i n s ? ? [ ] }
@ packs - changed = $ { ( ) => { this . data . reloadPacks ( ) } }
@ plugins - changed = $ { e => this . applyEdit ( t => ( { ... t , settings : { ... t . settings , plugins : e . detail } } ) ) } > < / n f - e x t e n s i o n s > ` ) } r e n d e r E d i t o r ( e ) { r e t u r n t h i s . w h e n E d i t o r L o a d e d ( ( ) = > p ` < n f - e d i t o r
class = "nf-body"
@@ -4041,10 +4041,10 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. roomLabels = $ { this . _prefs . roomNames }
@ room - names - change = $ { t => this . setPref ( "roomNames" , t . detail . value ) }
. packs = $ { this . data . packs }
. loadCardEditor = $ { Jn }
. loadCardEditor = $ { Xn }
@ packs - changed = $ { ( ) => { this . data . reloadPacks ( ) } }
@ building - changed = $ { t => this . data . edit ( t . detail . building ) }
> < / n f - e d i t o r > ` ) } o n N a v W h e e l = e = > { i f ( t h i s . _ p r e f s . n a v W r a p | | ! e . d e l t a Y | | e . d e l t a X ) r e t u r n ; l e t t = e . c u r r e n t T a r g e t ; t . s c r o l l W i d t h < = t . c l i e n t W i d t h | | ( t . s c r o l l L e f t + = e . d e l t a Y , e . p r e v e n t D e f a u l t ( ) ) } ; a l l O f f C h i p ( e ) { l e t t = t h i s . _ f l o o r I d ? e . f l o o r s . f i n d ( i = > i . i d = = = t h i s . _ f l o o r I d ) : e . f l o o r s . l e n g t h = = = 1 ? e . f l o o r s [ 0 ] : v o i d 0 ; i f ( ! t | | ! t h i s . h a s s ) r e t u r n f ; i f ( t h i s . _ f l o o r U n d o ) { l e t i = t h i s . _ f l o o r U n d o ; r e t u r n p ` < b u t t o n c l a s s = " n f - c h i p " a r i a - p r e s s e d = " t r u e " @ c l i c k = $ { ( ) = > { f o r ( l e t o o f i ) t h i s . h a s s . c a l l S e r v i c e ( o . d o m a i n , o . s e r v i c e , o . d a t a ) ; t h i s . _ f l o o r U n d o = n u l l , c l e a r T i m e o u t ( t h i s . f l o o r U n d o T i m e r ) } } > ↶ $ { t h i s . t ( " a l l _ o f f _ u n d o " ) } < / b u t t o n > ` } l e t r = E n ( m c ( t ) . m a p ( i = > t h i s . h a s s . s t a t e s [ i ] ) ) ; r e t u r n r . c o u n t < 2 ? f : p ` < b u t t o n c l a s s = " n f - c h i p " t i t l e = $ { t h i s . t ( " a l l _ o f f _ f l o o r " , { f l o o r : t . n a m e , n : r . c o u n t } ) } @ c l i c k = $ { ( ) = > { f o r ( l e t i o f r . o f f ) t h i s . h a s s . c a l l S e r v i c e ( i . d o m a i n , i . s e r v i c e , i . d a t a ) ; t h i s . _ f l o o r U n d o = r . u n d o , c l e a r T i m e o u t ( t h i s . f l o o r U n d o T i m e r ) , t h i s . f l o o r U n d o T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ f l o o r U n d o = n u l l , 1 e 4 ) } } > ⏻ $ { r . c o u n t } < / b u t t o n > ` } r e n d e r N a v ( e ) { l e t t = e . f l o o r s . f i l t e r ( c = > ! t h i s . _ f l o o r I d | | c . i d = = = t h i s . _ f l o o r I d ) , r = e . f l o o r s . l e n g t h > 1 , i = t h i s . _ p r e f s . n a v W r a p , o = t h i s . o u t s i d e I d s ( e ) . l e n g t h ? p ` < b u t t o n c l a s s = " n f - c h i p " a r i a - p r e s s e d = $ { t h i s . _ o u t s i d e } t i t l e = $ { t h i s . t ( " o u t s i d e _ a r e a _ h i n t " ) } @ c l i c k = $ { ( ) = > t h i s . o p e n O u t s i d e ( ) } > 🌳 $ { t h i s . t ( " o u t s i d e _ a r e a " ) } < / b u t t o n > ` : f , s = r ? p ` < b u t t o n c l a s s = " n f - c h i p " a r i a - p r e s s e d = $ { t h i s . _ f l o o r I d = = = n u l l } @ c l i c k = $ { ( ) = > t h i s . o p e n F l o o r ( n u l l ) } > $ { t h i s . t ( " a l l _ f l o o r s " ) } < / b u t t o n >
> < / n f - e d i t o r > ` ) } o n N a v W h e e l = e = > { i f ( t h i s . _ p r e f s . n a v W r a p | | ! e . d e l t a Y | | e . d e l t a X ) r e t u r n ; l e t t = e . c u r r e n t T a r g e t ; t . s c r o l l W i d t h < = t . c l i e n t W i d t h | | ( t . s c r o l l L e f t + = e . d e l t a Y , e . p r e v e n t D e f a u l t ( ) ) } ; a l l O f f C h i p ( e ) { l e t t = t h i s . _ f l o o r I d ? e . f l o o r s . f i n d ( i = > i . i d = = = t h i s . _ f l o o r I d ) : e . f l o o r s . l e n g t h = = = 1 ? e . f l o o r s [ 0 ] : v o i d 0 ; i f ( ! t | | ! t h i s . h a s s ) r e t u r n f ; i f ( t h i s . _ f l o o r U n d o ) { l e t i = t h i s . _ f l o o r U n d o ; r e t u r n p ` < b u t t o n c l a s s = " n f - c h i p " a r i a - p r e s s e d = " t r u e " @ c l i c k = $ { ( ) = > { f o r ( l e t o o f i ) t h i s . h a s s . c a l l S e r v i c e ( o . d o m a i n , o . s e r v i c e , o . d a t a ) ; t h i s . _ f l o o r U n d o = n u l l , c l e a r T i m e o u t ( t h i s . f l o o r U n d o T i m e r ) } } > ↶ $ { t h i s . t ( " a l l _ o f f _ u n d o " ) } < / b u t t o n > ` } l e t r = T n ( g c ( t ) . m a p ( i = > t h i s . h a s s . s t a t e s [ i ] ) ) ; r e t u r n r . c o u n t < 2 ? f : p ` < b u t t o n c l a s s = " n f - c h i p " t i t l e = $ { t h i s . t ( " a l l _ o f f _ f l o o r " , { f l o o r : t . n a m e , n : r . c o u n t } ) } @ c l i c k = $ { ( ) = > { f o r ( l e t i o f r . o f f ) t h i s . h a s s . c a l l S e r v i c e ( i . d o m a i n , i . s e r v i c e , i . d a t a ) ; t h i s . _ f l o o r U n d o = r . u n d o , c l e a r T i m e o u t ( t h i s . f l o o r U n d o T i m e r ) , t h i s . f l o o r U n d o T i m e r = s e t T i m e o u t ( ( ) = > t h i s . _ f l o o r U n d o = n u l l , 1 e 4 ) } } > ⏻ $ { r . c o u n t } < / b u t t o n > ` } r e n d e r N a v ( e ) { l e t t = e . f l o o r s . f i l t e r ( c = > ! t h i s . _ f l o o r I d | | c . i d = = = t h i s . _ f l o o r I d ) , r = e . f l o o r s . l e n g t h > 1 , i = t h i s . _ p r e f s . n a v W r a p , o = t h i s . o u t s i d e I d s ( e ) . l e n g t h ? p ` < b u t t o n c l a s s = " n f - c h i p " a r i a - p r e s s e d = $ { t h i s . _ o u t s i d e } t i t l e = $ { t h i s . t ( " o u t s i d e _ a r e a _ h i n t " ) } @ c l i c k = $ { ( ) = > t h i s . o p e n O u t s i d e ( ) } > 🌳 $ { t h i s . t ( " o u t s i d e _ a r e a " ) } < / b u t t o n > ` : f , s = r ? p ` < b u t t o n c l a s s = " n f - c h i p " a r i a - p r e s s e d = $ { t h i s . _ f l o o r I d = = = n u l l } @ c l i c k = $ { ( ) = > t h i s . o p e n F l o o r ( n u l l ) } > $ { t h i s . t ( " a l l _ f l o o r s " ) } < / b u t t o n >
$ { [ ... e . floors ] . reverse ( ) . map ( c => p ` <button class="nf-chip" aria-pressed= ${ c . id === this . _floorId } @click= ${ ( ) => this . openFloor ( c . id ) } > ${ c . name } </button> ` ) }
$ { o } $ { this . allOffChip ( e ) }
< span class = "nf-sep" > < / s p a n > ` : p ` $ { o } $ { t h i s . a l l O f f C h i p ( e ) } ` , a = t . f l a t M a p ( c = > [ t . l e n g t h > 1 & & c . r o o m s . l e n g t h ? p ` < s p a n c l a s s = " n f - n a v - f l o o r " > $ { c . n a m e } < / s p a n > ` : f , . . . c . r o o m s . m a p ( u = > p ` < b u t t o n
@@ -4085,7 +4085,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
< div class = "nf-stage-wrap ${this._roomId?" nf - room - open ":" "}" >
< nf - view3d
class = "nf-body"
. hass = $ { ui ( St ( this . hass , e . floors ) , e . settings ) }
. hass = $ { hi ( $t ( this . hass , e . floors ) , e . settings ) }
. building = $ { e }
. packs = $ { this . data . packs }
. floorStack = $ { t . floorStack }
@@ -4104,10 +4104,10 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. keepRoof = $ { t . keepRoof }
. markerMode = $ { t . markers }
. heatMode = $ { t . heat }
. theme = $ { Xr ( t . theme , this . sunState ( ) ) }
. theme = $ { ti ( t . theme , this . sunState ( ) ) }
. timeOfDay = $ { this . _timeOfDay }
. clock = $ { t . clock === "none" ? null : t . clock }
. announcements = $ { ! V ( this . hass ) && ! t . announceMuted }
. announcements = $ { ! B ( this . hass ) && ! t . announceMuted }
. glassWalls = $ { t . glassWalls }
. screenName = $ { t . screenName || null }
. lockButton = $ { ! 0 }
@@ -4123,9 +4123,9 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
? furnish = $ { this . _furnish }
. selectedFurniture = $ { this . _selFurniture }
@ furniture - select = $ { i => this . _selFurniture = i . detail . id }
@ furniture - move = $ { i => this . applyEdit ( o => rd ( o , i . detail . id , i . detail . x , i . detail . z ) ) }
@ 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 => nd ( o , i . detail . id , i . detail . x , i . detail . z ) ) }
@ 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 }
@@ -4135,10 +4135,10 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
$ { r ? p ` <nf-room-panel
. building = $ { this . data . building ? ? null }
class = "nf-room-panel"
. hass = $ { St ( this . hass , e . floors ) }
. hass = $ { $t ( this . hass , e . floors ) }
. room = $ { r }
. floor = $ { e . floors . find ( i => i . rooms . some ( o => o . id === this . _roomId ) ) ? ? null }
. confirmEntities = $ { bt ( this . hass , e . floors ) }
. confirmEntities = $ { yt ( 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 ) }
@@ -4146,17 +4146,17 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
> < / n f - r o o m - p a n e l > ` : t h i s . _ o u t s i d e ? p ` < n f - r o o m - p a n e l
. building = $ { this . data . building ? ? null }
class = "nf-room-panel"
. hass = $ { St ( this . hass , e . floors ) }
. hass = $ { $t ( this . hass , e . floors ) }
. room = $ { null }
. outside = $ { this . outsideIds ( e ) }
. confirmEntities = $ { bt ( this . hass , e . floors ) }
. confirmEntities = $ { yt ( this . hass , e . floors ) }
. phrases = $ { e . settings . announce _phrases ? ? null }
@ close = $ { ( ) => this . _outside = ! 1 }
> < / n f - r o o m - p a n e l > ` : f }
$ { t . clean ? f : this . renderOverlay ( e ) }
$ { this . _furnish ? ad ( this . furnishHost , this . _selFurniture , this . _selDevice ) : f }
$ { this . _furnish ? ud ( this . furnishHost , this . _selFurniture , this . _selDevice ) : f }
< / d i v >
` }static styles=[y e,H e,d d,T r]};customElements.get("nextfloor-panel")||customElements.define("nextfloor-panel",h s);var u g=/^( \d {1,2}):( \d {2}) \s *- \s *( \d {1,2}):( \d {2}) $ /,p d=(n,e)=>Number(n)*60+Number(e);function U n(n,e,t=new Date){if(!n||n==="off")return!1;if(n==="sun")return e?.states["sun.sun"]?.state==="below_horizon";let r=u g.exec(n.trim());if(!r)return!1;let i=p d(r[1],r[2]),o=p d(r[3],r[4]),s=t.getHours()*60+t.getMinutes();return i>o?s>=i||s<o:s>=i&&s<o}var f i=class{host;cleanTimer;idleTimer;nightTimer;constructor(e){this.host=e}armClean(e=!1){clearTimeout(this.cleanTimer);let t=this.host.config()?.controls_hide_after??0;t>0&&(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(U n(this.host.config()?.night,this.host.hass())),6e4)}stop(){clearTimeout(this.cleanTimer),clearTimeout(this.idleTimer),clearInterval(this.nightTimer)}};function f d(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||" \u 2013",floorId:t.id}))})):[]}var g d=J `
` }static styles=[v e,P e,p d,D r]};customElements.get("nextfloor-panel")||customElements.define("nextfloor-panel",f s);var m g=/^( \d {1,2}):( \d {2}) \s *- \s *( \d {1,2}):( \d {2}) $ /,_ d=(n,e)=>Number(n)*60+Number(e);function q n(n,e,t=new Date){if(!n||n==="off")return!1;if(n==="sun")return e?.states["sun.sun"]?.state==="below_horizon";let r=m g.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<o:s>=i&&s<o}var _ i=class{host;cleanTimer;idleTimer;nightTimer;constructor(e){this.host=e}armClean(e=!1){clearTimeout(this.cleanTimer);let t=this.host.config()?.controls_hide_after??0;t>0&&(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(q n(this.host.config()?.night,this.host.hass())),6e4)}stop(){clearTimeout(this.cleanTimer),clearTimeout(this.idleTimer),clearInterval(this.nightTimer)}};function b d(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||" \u 2013",floorId:t.id}))})):[]}var y d=Q `
ha - card {
overflow : hidden ;
background : var ( -- nf - bg ) ;
@@ -4280,26 +4280,26 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
justify - content : flex - end ;
}
}
` ;function m s(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 _ d(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 t n="nf-outside",p s=class extends Q {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 D t(this);kiosk=new f 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 J n(),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=m s(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=U n(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=m s(this._own,t)),this.toggleAttribute("readable",this._config?.readable===!0),e.has("hass")&&(this.style.colorScheme=F r(this.hass)),!e.has("hass")||!this.hass)return;this.data.setHass(this.hass);let r=U n(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:_ d(e,t)}),this.roomsMemo.result}t=e=> $ (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 ` < div class = "nf-seg" role = $ { s ? "group" : f } aria - label = $ { s ? ? f } > $ { a . map ( ( [ l , c , u ] ) => p ` <button aria-pressed= ${ l } @click= ${ c } > ${ u } </button> ` ) } < / d i v > ` ; r e t u r n p ` < d i v c l a s s = " n f - c a r d - c o n t r o l s " >
` ;function g s(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 v d(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 r n="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 P t(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 X n(),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=g s(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=q n(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=g s(this._own,t)),this.toggleAttribute("readable",this._config?.readable===!0),e.has("hass")&&(this.style.colorScheme=H r(this.hass)),!e.has("hass")||!this.hass)return;this.data.setHass(this.hass);let r=q n(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:v d(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 ` < div class = "nf-seg" role = $ { s ? "group" : f } aria - label = $ { s ? ? f } > $ { a . map ( ( [ l , c , u ] ) => p ` <button aria-pressed= ${ l } @click= ${ c } > ${ u } </button> ` ) } < / d i v > ` ; r e t u r n p ` < d i v c l a s s = " n f - c a r d - c o n t r o l s " >
$ { e . canGoBack ? p ` <button class="nf-chip" @click= ${ ( ) => this . back ( ) } > ${ r ( "back" ) } </button> ` : 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 }
< / d i v > ` } r e n d e r R o o m B u t t o n s ( e ) { l e t t = t h i s . p l a n ( ) ; i f ( ! t h i s . _ c o n f i g ? . r o o m _ b u t t o n s | | ! t | | t h i s . _ c l e a n ) r e t u r n f ; l e t r = f d ( t , e . f l o o r I d ) ; i f ( ! r . l e n g t h ) r e t u r n f ; l e t i = r . l e n g t h > 1 , o = ( l , c ) = > { t h i s . c a n S w i t c h & & l ! = = e . f l o o r I d & & ( t h i s . _ f l o o r I d = l ) , t h i s . _ r o o m I d = c = = = t h i s . _ r o o m I d ? n u l l : c } , s = _ n ( t h i s . h a s s , t . f l o o r s ) . l e n g t h > 0 , a = ( ) = > { t h i s . c a n S w i t c h & & ( t h i s . _ f l o o r I d = n u l l ) , t h i s . _ r o o m I d = t h i s . _ r o o m I d = = = t n ? n u l l : t n } ; r e t u r n p ` < d i v c l a s s = " n f - c a r d - r o o m s $ { t h i s . _ r o o m I d & & t h i s . _ c o n f i g ? . r o o m _ p a n e l ! = = ! 1 ? " n f - c a r d - r o o m s - b e s i d e " : " " } " r o l e = " g r o u p " a r i a - l a b e l = $ { t h i s . t ( " c a r d _ r o o m _ b u t t o n s " ) } >
< / d i v > ` } r e n d e r R o o m B u t t o n s ( e ) { l e t t = t h i s . p l a n ( ) ; i f ( ! t h i s . _ c o n f i g ? . r o o m _ b u t t o n s | | ! t | | t h i s . _ c l e a n ) r e t u r n f ; l e t r = b d ( t , e . f l o o r I d ) ; i f ( ! r . l e n g t h ) r e t u r n f ; l e t i = r . l e n g t h > 1 , o = ( l , c ) = > { t h i s . c a n S w i t c h & & l ! = = e . f l o o r I d & & ( t h i s . _ f l o o r I d = l ) , t h i s . _ r o o m I d = c = = = t h i s . _ r o o m I d ? n u l l : c } , s = y n ( t h i s . h a s s , t . f l o o r s ) . l e n g t h > 0 , a = ( ) = > { t h i s . c a n S w i t c h & & ( t h i s . _ f l o o r I d = n u l l ) , t h i s . _ r o o m I d = t h i s . _ r o o m I d = = = r n ? n u l l : r n } ; r e t u r n p ` < d i v c l a s s = " n f - c a r d - r o o m s $ { t h i s . _ r o o m I d & & t h i s . _ c o n f i g ? . r o o m _ p a n e l ! = = ! 1 ? " n f - c a r d - r o o m s - b e s i d e " : " " } " r o l e = " g r o u p " a r i a - l a b e l = $ { t h i s . t ( " c a r d _ r o o m _ b u t t o n s " ) } >
$ { r . map ( l => p ` ${ i ? p ` <span class="nf-card-rooms-floor"> ${ l . floorName } </span> ` : f } ${ l . rooms . map ( c => p ` <button class="nf-chip" aria-pressed= ${ c . id === this . _roomId } @click= ${ ( ) => o ( l . floorId , c . id ) } > ${ c . name } </button> ` ) } ` ) }
$ { s ? p ` <button class="nf-chip" aria-pressed= ${ this . _roomId === tn } title= ${ this . t ( "outside_area_hint" ) } @click= ${ a } >🌳 ${ this . t ( "outside_area" ) } </button> ` : f }
$ { s ? p ` <button class="nf-chip" aria-pressed= ${ this . _roomId === rn } title= ${ this . t ( "outside_area_hint" ) } @click= ${ a } >🌳 ${ this . t ( "outside_area" ) } </button> ` : f }
< / d i v > ` } r e n d e r C o r n e r s ( ) { l e t e = t h i s . _ c o n f i g , t = t h i s . t , r = t h i s . _ c l e a n | | ! ! t h i s . _ r o o m I d & & e ? . r o o m _ p a n e l ! = = ! 1 ; r e t u r n p ` $ { e ? . f u l l s c r e e n _ b u t t o n & & ! r ? p ` < b u t t o n c l a s s = " n f - c a r d - f u l l " t i t l e = $ { t ( t h i s . _ f u l l s c r e e n ? " f u l l s c r e e n _ e x i t " : " f u l l s c r e e n " ) } a r i a - l a b e l = $ { t ( t h i s . _ f u l l s c r e e n ? " f u l l s c r e e n _ e x i t " : " f u l l s c r e e n " ) } @ c l i c k = $ { ( ) = > t h i s . t o g g l e F u l l s c r e e n ( ) } >
$ { this . _fullscreen ? "\u2715" : "\u26F6" }
< / b u t t o n > ` : f }
$ { e ? . dashboard && ! r ? p ` <button class="nf-card-full nf-card-dash ${ e . fullscreen _button ? "nf-card-dash-2" : "" } " title= ${ e . dashboard _label || e . dashboard } aria-label= ${ e . dashboard _label || e . dashboard } @click= ${ ( ) => this . openDashboard ( e . dashboard ) } >
$ { e . dashboard _label ? p ` <span> ${ e . dashboard _label } </span> ` : "\u2302" }
< / b u t t o n > ` : f } ` } r e n d e r S t a g e ( e ) { l e t t = t h i s . p l a n ( ) , r = t h i s . _ c o n f i g , i = ( ) = > { t h i s . _ c l e a n = ! t h i s . _ c l e a n , t h i s . _ c l e a n ? t h i s . k i o s k . s t o p C l e a n ( ) : t h i s . k i o s k . a r m C l e a n ( ) } , o = r ? . c o n t r o l s _ h i d d e n ! = = v o i d 0 | | ( r ? . c o n t r o l s _ h i d e _ a f t e r ? ? 0 ) > 0 ; r e t u r n p ` < n f - v i e w 3 d
. hass = $ { ui ( St ( this . hass , t . floors ) , t . settings ) }
. hass = $ { hi ( $t ( this . hass , t . floors ) , t . settings ) }
. building = $ { t }
. packs = $ { this . data . packs }
. floorId = $ { e . floorId }
. roomId = $ { this . _roomId === tn ? null : this . _roomId }
. outsideOpen = $ { this . _roomId === tn }
. roomId = $ { this . _roomId === rn ? null : this . _roomId }
. outsideOpen = $ { this . _roomId === rn }
. wallMode = $ { e . walls }
. solidWalls = $ { r ? . solid _walls === ! 0 }
. explode = $ { e . explode }
@@ -4322,7 +4322,7 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. zoom = $ { typeof r ? . zoom == "number" ? r . zoom : 1 }
. buttons = $ { r ? . buttons ? . map ( ( s , a ) => ( { id : ` card_ ${ a } ` , ... s } ) ) ? ? null }
. heatMode = $ { e . heat }
. theme = $ { Xr ( r ? . theme , this . hass ? . states [ "sun.sun" ] ? . state ) }
. 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 }
@@ -4340,10 +4340,10 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
. panelOpen = $ { ! ! this . _roomId && r ? . room _panel !== ! 1 }
. alerts = $ { r ? . alerts !== ! 1 }
. alertJump = $ { ! ! r ? . alert _jump }
. announcements = $ { ! V ( this . hass ) && r ? . announcements !== ! 1 && ! ud ( ) }
. 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 ? ? cd ( ) }
. screenName = $ { r ? . screen _name ? ? hd ( ) }
. scenes = $ { r ? . scenes !== ! 1 }
. clean = $ { this . _clean }
. cleanButton = $ { o }
@@ -4361,22 +4361,22 @@ ${t.sources.map(r=>this.hass.states[r]?.attributes.symcon_path||this.hass.states
> < / n f - v i e w 3 d > ` } r e n d e r R o o m P a n e l ( ) { l e t e = t h i s . p l a n ( ) ; r e t u r n p ` < n f - r o o m - p a n e l
. building = $ { this . plan ( ) ? ? null }
class = "nf-card-panel"
. hass = $ { St ( this . hass , e . floors ) }
. hass = $ { $t ( this . hass , e . floors ) }
. room = $ { e . floors . flatMap ( t => 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 === tn ? _n ( this . hass , e . floors ) : null }
. confirmEntities = $ { bt ( this . hass , e . floors ) }
. outside = $ { this . _roomId === rn ? yn ( this . hass , e . floors ) : null }
. confirmEntities = $ { yt ( this . hass , e . floors ) }
. phrases = $ { e . settings . announce _phrases ? ? null }
@ close = $ { ( ) => this . _roomId = null }
> < /nf-room-panel>`}render(){if(this.hass&&M r(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 - 9 a - f ] { 6 } $ / i . test ( t ? . accent ? ? "" ) ? t . accent : null , s = ( ) => this . kiosk . touched ( ) ; return p ` <ha-card class= ${ this . _night ? "nf-night" : "" } style= ${ o ? ` --nf-accent: ${ o } ` : "" } @pointerdown= ${ s } @keydown= ${ s } @wheel= ${ s } >
> < /nf-room-panel>`}render(){if(this.hass&&E r(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 - 9 a - f ] { 6 } $ / i . test ( t ? . accent ? ? "" ) ? t . accent : null , s = ( ) => this . kiosk . touched ( ) ; return p ` <ha-card class= ${ this . _night ? "nf-night" : "" } style= ${ o ? ` --nf-accent: ${ o } ` : "" } @pointerdown= ${ s } @keydown= ${ s } @wheel= ${ s } >
< div class = "nf-card-body" style = "height:${i}" >
$ { e && e . floors . some ( a => a . rooms . length ) ? this . renderStage ( r ) : p ` <p class="nf-card-msg"> ${ this . data . error ? ? ( e ? $ ( this . hass , "no_building" ) : $ ( this . hass , "loading" ) ) } </p> ` }
$ { e && e . floors . some ( a => a . rooms . length ) ? this . renderStage ( r ) : p ` <p class="nf-card-msg"> ${ this . data . error ? ? ( e ? M ( this . hass , "no_building" ) : M ( this . hass , "loading" ) ) } </p> ` }
$ { this . _roomId && e && t ? . room _panel !== ! 1 ? this . renderRoomPanel ( ) : f }
$ { this . renderRoomButtons ( r ) }
$ { r . showBar && e ? this . renderBar ( r ) : f }
$ { this . renderCorners ( ) }
< / d i v >
< / h a - c a r d > ` } s t a t i c s t y l e s = [ y e , H e , g d , T r ] } ; i f ( ! c u s t o m E l e m e n t s . g e t ( " n e x t f l o o r - c a r d " ) ) { c u s t o m E l e m e n t s . d e f i n e ( " n e x t f l o o r - c a r d " , p s ) ; l e t n = w i n d o w ; n . c u s t o m C a r d s = n . c u s t o m C a r d s ? ? [ ] , n . c u s t o m C a r d s . p u s h ( { t y p e : " n e x t f l o o r - c a r d " , n a m e : $ ( v o i d 0 , " c a r d _ n a m e " ) , d e s c r i p t i o n : $ ( v o i d 0 , " c a r d _ d e s c r i p t i o n " ) , p r e v i e w : ! 1 } ) } P i ( ) ; v a r d g = " n e x t f l o o r - c h u n k s - v 1 " ; a s y n c f u n c t i o n f s ( n , e , t ) { l e t r = a w a i t f e t c h ( ` $ { n . e n d p o i n t } / a p i ? t o k e n = $ { e n c o d e U R I C o m p o n e n t ( n . t o k e n ) } ` , { m e t h o d : " P O S T " , h e a d e r s : { " C o n t e n t - T y p e " : " a p p l i c a t i o n / j s o n " , A c c e p t : " a p p l i c a t i o n / j s o n " } , c r e d e n t i a l s : " s a m e - o r i g i n " , b o d y : J S O N . s t r i n g i f y ( { . . . t , a c t i o n : e , t r a n s p o r t : d g } ) } ) , i = a w a i t r . t e x t ( ) , o ; t r y { o = J S O N . p a r s e ( i ) } c a t c h { t h r o w / O u t p u t - B u f f e r e x c e e d s L i m i t / i . t e s t ( i ) ? n e w E r r o r ( " S y m c o n h a t d i e A n t w o r t w e g e n s e i n e r A u s g a b e b e g r e n z u n g a b g e b r o c h e n . B i t t e d a s N e x t F l o o r - M o d u l a k t u a l i s i e r e n u n d d e n D e s i g n e r n e u l a d e n . " ) : n e w E r r o r ( ` S y m c o n l i e f e r t $ { i . t r i m ( ) ? " k e i n g \ x F C l t i g e s J S O N " : " e i n e l e e r e A n t w o r t " } f \ x F C r \ u 2 0 1 E $ { e } \ u 2 0 1 C ( H T T P $ { r . s t a t u s } ) . ` ) } i f ( ! r . o k | | ! o | | t y p e o f o ! = " o b j e c t " | | " e r r o r " i n o ) { l e t s = o & & t y p e o f o = = " o b j e c t " & & " e r r o r " i n o ? o . e r r o r : ` H T T P $ { r . s t a t u s } ` ; t h r o w n e w E r r o r ( S t r i n g ( s ) ) } r e t u r n o } a s y n c f u n c t i o n n n ( n , e , t = { } ) { l e t r = a w a i t f s ( n , e , t ) ; i f ( ! ( " _ n e x t f l o o r _ t r a n s f e r " i n r ) ) r e t u r n r ; l e t i = r . _ n e x t f l o o r _ t r a n s f e r ; i f ( ! i | | ! / ^ [ a - f 0 - 9 ] { 3 2 } $ / . t e s t ( i . i d ) | | ! N u m b e r . i s S a f e I n t e g e r ( i . b y t e s ) | | i . b y t e s < = 0 | | i . b y t e s > 6 7 1 0 8 8 6 4 | | ! N u m b e r . i s S a f e I n t e g e r ( i . c h u n k _ b y t e s ) | | i . c h u n k _ b y t e s < = 0 | | i . c h u n k _ b y t e s > 1 2 8 * 1 0 2 4 | | i . c h u n k s ! = = M a t h . c e i l ( i . b y t e s / i . c h u n k _ b y t e s ) | | i . c h u n k s > 5 1 2 ) t h r o w n e w E r r o r ( " S y m c o n h a t e i n e u n g \ x F C l t i g e D a t e n \ x F C b e r t r a g u n g a n g e k \ x F C n d i g t . " ) ; t r y { l e t o = n e w T e x t D e c o d e r ( " u t f - 8 " , { f a t a l : ! 0 } ) , s = [ ] ; f o r ( l e t a = 0 ; a < i . c h u n k s ; a + + ) { l e t l = a w a i t f s ( n , " t r a n s p o r t / r e a d " , { t r a n s f e r _ i d : i . i d , i n d e x : a } ) ; i f ( l . i n d e x ! = = a | | t y p e o f l . d a t a ! = " s t r i n g " ) t h r o w n e w E r r o r ( " E i n S y m c o n - D a t e n p a k e t f e h l t o d e r i s t u n g \ x F C l t i g . " ) ; l e t c = U i n t 8 A r r a y . f r o m ( a t o b ( l . d a t a ) , u = > u . c h a r C o d e A t ( 0 ) ) ; i f ( c . l e n g t h ! = = M a t h . m i n ( i . c h u n k _ b y t e s , i . b y t e s - a * i . c h u n k _ b y t e s ) ) t h r o w n e w E r r o r ( " E i n S y m c o n - D a t e n p a k e t w u r d e u n v o l l s t \ x E 4 n d i g \ x F C b e r t r a g e n . " ) ; s . p u s h ( o . d e c o d e ( c , { s t r e a m : ! 0 } ) ) } r e t u r n s . p u s h ( o . d e c o d e ( ) ) , J S O N . p a r s e ( s . j o i n ( " " ) ) } f i n a l l y { a w a i t f s ( n , " t r a n s p o r t / r e l e a s e " , { t r a n s f e r _ i d : i . i d } ) . c a t c h ( ( ) = > { } ) } } f u n c t i o n h g ( ) { l e t n = w i n d o w . _ _ N E X T F L O O R _ S Y M C O N _ _ ; i f ( ! n ? . e n d p o i n t | | ! n . t o k e n ) t h r o w n e w E r r o r ( " N e x t F l o o r S y m c o n h o s t c o n f i g u r a t i o n i s m i s s i n g " ) ; r e t u r n n } v a r g i = c l a s s { s e t t i n g s = h g ( ) ; c h a n g e L i s t e n e r s = n e w S e t ; b u i l d i n g L i s t e n e r s = n e w S e t ; t i m e r ; s t a t e R e v i s i o n = - 1 ; b u i l d i n g R e v i s i o n = - 1 ; o b j e c t s S i g n a t u r e = " " ; r e f r e s h T a s k ; s t a t e s = { } ; e n t i t i e s = { } ; a r e a s = { } ; f a c a d e = { l a n g u a g e : t h i s . s e t t i n g s . l a n g u a g e | | n a v i g a t o r . l a n g u a g e | | " d e " , u s e r : { i s _ a d m i n : ! 0 , n a m e : t h i s . s e t t i n g s . t i t l e | | " I P - S y m c o n " } , s t a t e s : t h i s . s t a t e s , e n t i t i e s : t h i s . e n t i t i e s , a r e a s : t h i s . a r e a s , s y m c o n O b j e c t s : [ ] , s y m c o n T i t l e : t h i s . s e t t i n g s . t i t l e ? . t r i m ( ) | | " N e x t F l o o r " , s y m c o n R e f r e s h : ( ) = > t h i s . r e f r e s h ( ! 0 ) , c o n f i g : { u n i t _ s y s t e m : { t e m p e r a t u r e : " \ x B 0 C " } } , t h e m e s : { d a r k M o d e : w i n d o w . m a t c h M e d i a ? . ( " ( p r e f e r s - c o l o r - s c h e m e : d a r k ) " ) . m a t c h e s ? ? ! 0 } , s e r v i c e s : { } , c o n n e c t i o n : { s u b s c r i b e M e s s a g e : a s y n c ( e , t ) = > { i f ( t . t y p e = = = " n e x t f l o o r / b u i l d i n g / s u b s c r i b e " ) { l e t r = i = > e ( { r e v i s i o n : i } ) ; r e t u r n t h i s . b u i l d i n g L i s t e n e r s . a d d ( r ) , a s y n c ( ) = > { t h i s . b u i l d i n g L i s t e n e r s . d e l e t e ( r ) } } r e t u r n a s y n c ( ) = > { } } } , c a l l W S : e = > t h i s . c a l l W S ( e ) , c a l l S e r v i c e : ( e , t , r ) = > t h i s . c a l l S e r v i c e ( e , t , r ) , f e t c h W i t h A u t h : ( e , t ) = > t h i s . f e t c h W i t h T o k e n ( e , t ) , h a s s U r l : ( e = " " ) = > n e w U R L ( e , w i n d o w . l o c a t i o n . o r i g i n ) . h r e f } ; a s y n c s t a r t ( ) { l e t e = a w a i t n n ( t h i s . s e t t i n g s , " b o o t s t r a p " ) ; r e t u r n t h i s . a p p l y ( e ) , t h i s . s t a t e R e v i s i o n = e . s t a t e _ r e v i s i o n , t h i s . b u i l d i n g R e v i s i o n = e . b u i l d i n g _ r e v i s i o n , t h i s . t i m e r = s e t I n t e r v a l ( ( ) = > { t h i s . r e f r e s h ( ) . c a t c h ( ( ) = > { } ) } , 8 0 0 ) , t h i s . s n a p s h o t ( ) } s t o p ( ) { t h i s . t i m e r & & c l e a r I n t e r v a l ( t h i s . t i m e r ) , t h i s . t i m e r = v o i d 0 } o n C h a n g e ( e ) { r e t u r n t h i s . c h a n g e L i s t e n e r s . a d d ( e ) , ( ) = > t h i s . c h a n g e L i s t e n e r s . d e l e t e ( e ) } s n a p s h o t ( ) { r e t u r n { . . . t h i s . f a c a d e , s t a t e s : { . . . t h i s . s t a t e s } , e n t i t i e s : { . . . t h i s . e n t i t i e s } , a r e a s : { . . . t h i s . a r e a s } } } r e f r e s h ( e = ! 1 ) { i f ( t h i s . r e f r e s h T a s k ) r e t u r n e ? t h i s . r e f r e s h T a s k . c a t c h ( ( ) = > { } ) . t h e n ( ( ) = > t h i s . r e f r e s h ( ! 0 ) ) : t h i s . r e f r e s h T a s k ; l e t t = t h i s . l o a d S n a p s h o t ( e ) . f i n a l l y ( ( ) = > { t h i s . r e f r e s h T a s k = = = t & & ( t h i s . r e f r e s h T a s k = v o i d 0 ) } ) ; r e t u r n t h i s . r e f r e s h T a s k = t , t } a s y n c l o a d S n a p s h o t ( e ) { l e t t = e ? a w a i t n n ( t h i s . s e t t i n g s , " b o o t s t r a p " ) : a w a i t n n ( t h i s . s e t t i n g s , " v a r i a b l e s / s n a p s h o t " , { r e v i s i o n : t h i s . s t a t e R e v i s i o n } ) ; i f ( ( e | | t . s t a t e _ r e v i s i o n ! = = t h i s . s t a t e R e v i s i o n ) & & t . v a r i a b l e s ) { t h i s . s t a t e R e v i s i o n = t . s t a t e _ r e v i s i o n , t h i s . a p p l y ( { v a r i a b l e s : t . v a r i a b l e s , a r e a s : t . a r e a s , o b j e c t s : t . o b j e c t s } ) ; f o r ( l e t r o f t h i s . c h a n g e L i s t e n e r s ) r ( ) } i f ( t . b u i l d i n g _ r e v i s i o n ! = = t h i s . b u i l d i n g R e v i s i o n ) { t h i s . b u i l d i n g R e v i s i o n = t . b u i l d i n g _ r e v i s i o n ; f o r ( l e t r o f t h i s . b u i l d i n g L i s t e n e r s ) r ( t . b u i l d i n g _ r e v i s i o n ) } } a p p l y ( e ) { t h i s . s t a t e s = O b j e c t . f r o m E n t r i e s ( e . v a r i a b l e s . m a p ( t = > [ t . e n t i t y _ i d , { e n t i t y _ i d : t . e n t i t y _ i d , s t a t e : t . s t a t e , a t t r i b u t e s : { . . . t . a t t r i b u t e s , f r i e n d l y _ n a m e : t . n a m e , s y m c o n _ p a t h : t . p a t h } } ] ) ) , t h i s . e n t i t i e s = O b j e c t . f r o m E n t r i e s ( e . v a r i a b l e s . m a p ( t = > [ t . e n t i t y _ i d , { e n t i t y _ i d : t . e n t i t y _ i d , n a m e : t . n a m e , a r e a _ i d : t . a r e a _ i d ? ? n u l l , d e v i c e _ i d : t . d e v i c e _ i d ? ? n u l l } ] ) ) ; f o r ( l e t t o f O b j e c t . v a l u e s ( t h i s . s t a t e s ) ) f o r ( l e t r o f [ " l i g h t " , " c o v e r " ] ) { l e t i = k a ( t , r ) ; ! i | | i . e n t i t y _ i d = = = t . e n t i t y _ i d | | t h i s . s t a t e s [ i . e n t i t y _ i d ] | | ( t h i s . s t a Line truncated
< / h a - c a r d > ` } s t a t i c s t y l e s = [ v e , P e , y d , D r ] } ; i f ( ! c u s t o m E l e m e n t s . g e t ( " n e x t f l o o r - c a r d " ) ) { c u s t o m E l e m e n t s . d e f i n e ( " n e x t f l o o r - c a r d " , _ s ) ; l e t n = w i n d o w ; n . c u s t o m C a r d s = n . c u s t o m C a r d s ? ? [ ] , n . c u s t o m C a r d s . p u s h ( { t y p e : " n e x t f l o o r - c a r d " , n a m e : M ( v o i d 0 , " c a r d _ n a m e " ) , d e s c r i p t i o n : M ( v o i d 0 , " c a r d _ d e s c r i p t i o n " ) , p r e v i e w : ! 1 } ) } N i ( ) ; v a r M t = c l a s s e x t e n d s E r r o r { } , p g = " n e x t f l o o r - c h u n k s - v 1 " , f g = 6 4 * 1 0 2 4 * 1 0 2 4 ; a s y n c f u n c t i o n b s ( n , e , t ) { l e t r = a w a i t f e t c h ( ` $ { n . e n d p o i n t } / a p i $ { n . c s r f ? " " : n . t o k e n ? ` ? t o k e n = $ { e n c o d e U R I C o m p o n e n t ( n . t o k e n ) } ` : " " } ` , { m e t h o d : " P O S T " , h e a d e r s : { " C o n t e n t - T y p e " : " a p p l i c a t i o n / j s o n " , A c c e p t : " a p p l i c a t i o n / j s o n " , . . . n . c s r f ? { " X - N e x t F l o o r - C S R F " : n . c s r f } : { } } , c r e d e n t i a l s : " s a m e - o r i g i n " , b o d y : J S O N . s t r i n g i f y ( { . . . t , a c t i o n : e , t r a n s p o r t : p g } ) } ) , i = a w a i t r . t e x t ( ) ; i f ( r . s t a t u s = = = 4 0 1 ) t h r o w n e w M t ( " D i e A n m e l d u n g i s t a b g e l a u f e n . B i t t e e r n e u t a n m e l d e n . " ) ; l e t o ; t r y { o = J S O N . p a r s e ( i ) } c a t c h { t h r o w / O u t p u t - B u f f e r e x c e e d s L i m i t / i . t e s t ( i ) ? n e w E r r o r ( " S y m c o n h a t d i e A n t w o r t w e g e n s e i n e r A u s g a b e b e g r e n z u n g a b g e b r o c h e n . B i t t e d a s N e x t F l o o r - M o d u l a k t u a l i s i e r e n u n d d e n D e s i g n e r n e u l a d e n . " ) : n e w E r r o r ( ` S y m c o n l i e f e r t $ { i . t r i m ( ) ? " k e i n g \ x F C l t i g e s J S O N " : " e i n e l e e r e A n t w o r t " } f \ x F C r \ u 2 0 1 E $ { e } \ u 2 0 1 C ( H T T P $ { r . s t a t u s } ) . ` ) } i f ( ! r . o k | | ! o | | t y p e o f o ! = " o b j e c t " | | " e r r o r " i n o ) { l e t s = o & & t y p e o f o = = " o b j e c t " & & " e r r o r " i n o ? o . e r r o r : ` H T T P $ { r . s t a t u s } ` ; t h r o w n e w E r r o r ( S t r i n g ( s ) ) } r e t u r n o } a s y n c f u n c t i o n o n ( n , e , t = { } ) { l e t r = a w a i t b s ( n , e , t ) ; i f ( ! ( " _ n e x t f l o o r _ t r a n s f e r " i n r ) ) r e t u r n r ; l e t i = r . _ n e x t f l o o r _ t r a n s f e r ; i f ( ! i | | ! / ^ [ a - f 0 - 9 ] { 3 2 } $ / . t e s t ( i . i d ) | | ! N u m b e r . i s S a f e I n t e g e r ( i . b y t e s ) | | i . b y t e s < = 0 | | i . b y t e s > f g | | ! N u m b e r . i s S a f e I n t e g e r ( i . c h u n k _ b y t e s ) | | i . c h u n k _ b y t e s < = 0 | | i . c h u n k _ b y t e s > 1 2 8 * 1 0 2 4 | | i . c h u n k s ! = = M a t h . c e i l ( i . b y t e s / i . c h u n k _ b y t e s ) | | i . c h u n k s > 5 1 2 ) t h r o w n e w E r r o r ( " S y m c o n h a t e i n e u n g \ x F C l t i g e D a t e n \ x F C b e r t r a g u n g a n g e k \ x F C n d i g t . " ) ; t r y { l e t o = n e w T e x t D e c o d e r ( " u t f - 8 " , { f a t a l : ! 0 } ) , s = [ ] ; f o r ( l e t a = 0 ; a < i . c h u n k s ; a + + ) { l e t l = a w a i t b s ( n , " t r a n s p o r t / r e a d " , { t r a n s f e r _ i d : i . i d , i n d e x : a } ) ; i f ( l . i n d e x ! = = a | | t y p e o f l . d a t a ! = " s t r i n g " ) t h r o w n e w E r r o r ( " E i n S y m c o n - D a t e n p a k e t f e h l t o d e r i s t u n g \ x F C l t i g . " ) ; l e t c = U i n t 8 A r r a y . f r o m ( a t o b ( l . d a t a ) , u = > u . c h a r C o d e A t ( 0 ) ) ; i f ( c . l e n g t h ! = = M a t h . m i n ( i . c h u n k _ b y t e s , i . b y t e s - a * i . c h u n k _ b y t e s ) ) t h r o w n e w E r r o r ( " E i n S y m c o n - D a t e n p a k e t w u r d e u n v o l l s t \ x E 4 n d i g \ x F C b e r t r a g e n . " ) ; s . p u s h ( o . d e c o d e ( c , { s t r e a m : ! 0 } ) ) } r e t u r n s . p u s h ( o . d e c o d e ( ) ) , J S O N . p a r s e ( s . j o i n ( " " ) ) } f i n a l l y { a w a i t b s ( n , " t r a n s p o r t / r e l e a s e " , { t r a n s f e r _ i d : i . i d } ) . c a t c h ( ( ) = > { } ) } } f u n c t i o n g g ( ) { l e t n = w i n d o w . _ _ N E X T F L O O R _ S Y M C O N _ _ ; i f ( ! n ? . e n d p o i n t | | ! n . c s r f & & ! n . t o k e n ) t h r o w n e w E r r o r ( " N e x t F l o o r S y m c o n h o s t c o n f i g u r a t i o n i s m i s s i n g " ) ; r e t u r n n } v a r b i = c l a s s { o n E x p i r e d ; s e t t i n g s = g g ( ) ; c h a n g e L i s t e n e r s = n e w S e t ; b u i l d i n g L i s t e n e r s = n e w S e t ; t i m e r ; s t a t e R e v i s i o n = - 1 ; b u i l d i n g R e v i s i o n = - 1 ; o b j e c t s S i g n a t u r e = " " ; r e f r e s h T a s k ; s t a t e s = { } ; e n t i t i e s = { } ; a r e a s = { } ; f a c a d e = { l a n g u a g e : t h i s . s e t t i n g s . l a n g u a g e | | n a v i g a t o r . l a n g u a g e | | " d e " , u s e r : t h i s . s e t t i n g s . u s e r ? ? { i s _ a d m i n : ! 1 , n a m e : " I P - S y m c o n " } , s t a t e s : t h i s . s t a t e s , e n t i t i e s : t h i s . e n t i t i e s , a r e a s : t h i s . a r e a s , s y m c o n O b j e c t s : [ ] , s y m c o n T i t l e : t h i s . s e t t i n g s . t i t l e ? . t r i m ( ) | | " N e x t F l o o r " , s y m c o n R e f r e s h : ( ) = > t h i s . r e f r e s h ( ! 0 ) , c o n f i g : { u n i t _ s y s t e m : { t e m p e r a t u r e : " \ x B 0 C " } } , t h e m e s : { d a r k M o d e : w i n d o w . m a t c h M e d i a ? . ( " ( p r e f e r s - c o l o r - s c h e m e : d a r k ) " ) . m a t c h e s ? ? ! 0 } , s e r v i c e s : { } , c o n n e c t i o n : { s u b s c r i b e M e s s a g e : a s y n c ( e , t ) = > { i f ( t . t y p e = = = " n e x t f l o o r / b u i l d i n g / s u b s c r i b e " ) { l e t r = i = > e ( { r e v i s i o n : i } ) ; r e t u r n t h i s . b u i l d i n g L i s t e n e r s . a d d ( r ) , a s y n c ( ) = > { t h i s . b u i l d i n g L i s t e n e r s . d e l e t e ( r ) } } r e t u r n a s y n c ( ) = > { } } } , c a l l W S : e = > t h i s . c a l l W S ( e ) , c a l l S e r v i c e : ( e , t , r ) = > t h i s . c a l l S e r v i c e ( e , t , r ) , f e t c h W i t h A u t h : ( e , t ) = > t h i s . f e t c h W i t h T o k e n ( e , t ) , h a s s U r l : ( e = " " ) = > n e w U R L ( e , w i n d o w . l o c a t i o n . o r i g i n ) . h r e f } ; a s y n c s t a r t ( ) { l e t e = a w a i t o n ( t h i s . s e t t i n g s , " b o o t s t r a p " ) ; r e t u r n e . a c c e s s & & ( t h i s . f a c a d e . u s e r = e . a c c e s s ) , t h i s . a p p l y ( e ) , t h i s . s t a t e R e v i s i o n = e . s t a t e _ r e v i s i o n , t h i s . b u i l d i n g R e v i s i o n = e . b u i l d i n g _ r e v i s i o n , t h i s . t i m e r = s e t I n t e r v a l ( ( ) = > { t h i s . r e f r e s h ( ) . c a t c h ( t = > { t i n s t a n c e o f M t & & ( t h i s . s t o p ( ) , t h i s . s t a t e s = { } , t h i s . e n t i t i e s = { } , t h i s . o n E x p i r e d ? . ( ) ) } ) } , 8 0 0 ) , t h i s . s n a p s h o t ( ) } s t o p ( ) { t h i s . t i m e r & & c l e a r I n t e r v a l ( t h i s . t i m e r ) , t h i s . t i m e r = v o i d 0 } o n C h a n g e ( e ) { r e t u r n t h i s . c h a n g e L i s t e n e r s . a d d ( e ) , ( ) = > t h i s . c h a n g e L i s t e n e r s . d e l e t e ( e ) } s n a p s h o t ( ) { r e t u r n { . . . t h i s . f a c a d e , s t a t e s : { . . . t h i s . s t a t e s } , e n t i t i e s : { . . . t h i s . e n t i t i e s } , a r e a s : { . . . t h i s . a r e a s } } } r e f r e s h ( e = ! 1 ) { i f ( t h i s . r e f r e s h T a s k ) r e t u r n e ? t h i s . r e f r e s h T a s k . c a t c h ( ( ) = > { } ) . t h e n ( ( ) = > t h i s . r e f r e s h ( ! 0 ) ) : t h i s . r e f r e s h T a s k ; l e t t = t h i s . l o a d S n a p s h o t ( e ) . f i n a l l y ( ( ) = > { t h i s . r e f r e s h T a s k = = = t & & ( t h i s . r e f r e s h T a s k = v o i d 0 ) } ) ; r e t u r n t h i s . r e f r e s h T a s k = t , t } a s y n c l o a d S n a p s h o t ( e ) { l e t t = e ? a w a i t o n ( t h i s . s e t t i n g s , " b o o t s t r a p " ) : a w a i t o n ( t h i s . s e t t i n g s , " v a r i a b l e s / s n a p s h o t " , { r e v i s i o n : t h i s . s t a t e R e v i s i o n } ) ; i f ( ( e | | t . s t a t e _ r e v i s i o n ! = = t h i s . s t a t e R e v i s i o n ) & & t . v a r i a b l e s ) { t h i s . s t a t e R e v i s i o n = t . s t a t e _ r e v i s i o n , t h i s . a p p l y ( { v a r i a b l e s : t . v a r i a b l e s , a r e a s : t . a r e a s , o b j e c t s : t . o b j e c t s } ) ; f o r ( l e t r o f t h i s . c h a n g e L i s t e n e r s ) r ( ) } i f ( t . b u i l d i n g _ r e v i s i o n ! = = t h i s . b u i l d i n g R e v i s i o n ) { t h i s . b u i l d i n g R e v i s i o n = t . b u i l d i n g _ r e v i s i o n ; f o r ( l e t r o f t h i s . b u i l d i n g L i s t e n e r s ) r ( t . b u i l d i n g _ r e v i s i o n ) } } a p p l y ( e ) { t h i s . s t a t e s = O b j e c t . f r o m E n t r i e s ( e . v a r i a b l e s . m a p ( t = > [ t . e n t i t y _ i d , { e n t i t y _ i d : t . e n t i t y _ i d , s t a t e : t . s t a t e , a t t r i b u t e s : { . . . t . a t t r i b u t e s , f r i e n d l y _ n a m e : t . n a m e , s y Line truncated
/ * ! B u n d l e d l i c e n s e i n f o r m a t i o n :
@ lit / reactive - element / css - tag . js :