major changes to variables, weather and datalinkage
This commit is contained in:
1 parent
d2c0f5b111
commit
bc375e4c17
8 files changed
+1345
-1087
No files matched your search
@@ -1,28 +1,28 @@
|
|||||||
/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */
|
/*! NextFloor, MIT licence. Includes three.js (MIT) and Lit (BSD-3-Clause); see LICENSE and THIRD_PARTY_NOTICES.md */
|
||||||
var p={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"};var M=globalThis,N=M.ShadowRoot&&(M.ShadyCSS===void 0||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,V=Symbol(),me=new WeakMap,R=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==V)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(N&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=me.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&me.set(t,e))}return e}toString(){return this.cssText}},pe=i=>new R(typeof i=="string"?i:i+"",void 0,V),U=(i,...e)=>{let t=i.length===1?i[0]:e.reduce((n,r,o)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new R(t,i,V)},fe=(i,e)=>{if(N)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let n=document.createElement("style"),r=M.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=t.cssText,i.appendChild(n)}},j=N?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return pe(t)})(i):i;var{is:Ke,defineProperty:Ge,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:Ie,getOwnPropertySymbols:Ze,getPrototypeOf:Ve}=Object,C=globalThis,ge=C.trustedTypes,Ue=ge?ge.emptyScript:"",je=C.reactiveElementPolyfillSupport,F=(i,e)=>i,q={toAttribute(i,e){switch(e){case Boolean:i=i?Ue:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},we=(i,e)=>!Ke(i,e),be={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:we};Symbol.metadata??=Symbol("metadata"),C.litPropertyMetadata??=new WeakMap;var b=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=be){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 n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&Ge(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:o}=Oe(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:r,set(a){let s=r?.call(this);o?.call(this,a),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??be}static _$Ei(){if(this.hasOwnProperty(F("elementProperties")))return;let e=Ve(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(F("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(F("properties"))){let t=this.properties,n=[...Ie(t),...Ze(t)];for(let r of n)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[n,r]of t)this.elementProperties.set(n,r)}this._$Eh=new Map;for(let[t,n]of this.elementProperties){let r=this._$Eu(t,n);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let r of n)t.unshift(j(r))}else e!==void 0&&t.push(j(e));return t}static _$Eu(e,t){let n=t.attribute;return n===!1?void 0:typeof n=="string"?n: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 n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return fe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.Line truncated
|
var m={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"};var M=globalThis,N=M.ShadowRoot&&(M.ShadyCSS===void 0||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,U=Symbol(),pe=new WeakMap,R=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==U)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(N&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=pe.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&pe.set(t,e))}return e}toString(){return this.cssText}},fe=i=>new R(typeof i=="string"?i:i+"",void 0,U),j=(i,...e)=>{let t=i.length===1?i[0]:e.reduce((n,r,o)=>n+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new R(t,i,U)},ge=(i,e)=>{if(N)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let n=document.createElement("style"),r=M.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=t.cssText,i.appendChild(n)}},q=N?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return fe(t)})(i):i;var{is:Ge,defineProperty:Oe,getOwnPropertyDescriptor:Ie,getOwnPropertyNames:Ze,getOwnPropertySymbols:Ve,getPrototypeOf:Ue}=Object,C=globalThis,be=C.trustedTypes,je=be?be.emptyScript:"",qe=C.reactiveElementPolyfillSupport,F=(i,e)=>i,J={toAttribute(i,e){switch(e){case Boolean:i=i?je:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},ke=(i,e)=>!Ge(i,e),we={attribute:!0,type:String,converter:J,reflect:!1,useDefault:!1,hasChanged:ke};Symbol.metadata??=Symbol("metadata"),C.litPropertyMetadata??=new WeakMap;var b=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=we){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 n=Symbol(),r=this.getPropertyDescriptor(e,n,t);r!==void 0&&Oe(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:o}=Ie(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:r,set(a){let s=r?.call(this);o?.call(this,a),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??we}static _$Ei(){if(this.hasOwnProperty(F("elementProperties")))return;let e=Ue(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(F("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(F("properties"))){let t=this.properties,n=[...Ze(t),...Ve(t)];for(let r of n)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[n,r]of t)this.elementProperties.set(n,r)}this._$Eh=new Map;for(let[t,n]of this.elementProperties){let r=this._$Eu(t,n);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let r of n)t.unshift(q(r))}else e!==void 0&&t.push(q(e));return t}static _$Eu(e,t){let n=t.attribute;return n===!1?void 0:typeof n=="string"?n: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 n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ge(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.Line truncated
|
||||||
\f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ye=/-->/g,Se=/>/g,S=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Se=/-->/g,Ae=/>/g,S=RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
|
||||||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ae=/'/g,De=/"/g,Re=/^(?:script|style|textarea|title)$/i,ie=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),l=ie(1),ct=ie(2),ut=ie(3),z=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ze=new WeakMap,A=D.createTreeWalker(D,129);function Fe(i,e){if(!re(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ve!==void 0?ve.createHTML(e):e}var Xe=(i,e)=>{let t=i.length-1,n=[],r,o=e===2?"<svg>":e===3?"<math>":"",a=x;for(let s=0;s<t;s++){let h=i[s],u,m,_=-1,g=0;for(;g<h.length&&(a.lastIndex=g,m=a.exec(h),m!==null);)g=a.lastIndex,a===x?m[1]==="!--"?a=ye:m[1]!==void 0?a=Se:m[2]!==void 0?(Re.test(m[2])&&(r=RegExp("</"+m[2],"g")),a=S):m[3]!==void 0&&(a=S):a===S?m[0]===">"?(a=r??x,_=-1):m[1]===void 0?_=-2:(_=a.lastIndex-m[2].length,u=m[1],a=m[3]===void 0?S:m[3]==='"'?De:Ae):a===De||a===Ae?a=S:a===ye||a===Se?a=x:(a=S,r=void 0);let k=a===S&&i[s+1].startsWith("/>")?" ":"";o+=a===x?h+qe:_>=0?(n.push(u),h.slice(0,_)+Ee+h.slice(_)+v+k):h+v+(_===-2?s:k)}return[Fe(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},B=class i{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let o=0,a=0,s=e.length-1,h=this.parts,[u,m]=Xe(e,t);if(this.el=i.createElement(u,n),A.currentNode=this.el.content,t===2||t===3){let _=this.el.content.firstChild;_.replaceWith(..._.childNodes)}for(;(r=A.nextNode())!==null&&h.length<s;){if(r.nodeType===1){if(r.hasAttributes())for(let _ of r.getAttributeNames())if(_.endsWith(Ee)){let g=m[a++],k=r.getAttribute(_).split(v),L=/([.?@])?(.*)/.exec(g);h.push({type:1,index:o,name:L[2],strings:k,ctor:L[1]==="."?Y:L[1]==="?"?Q:L[1]==="@"?ee:T}),r.removeAttribute(_)}else _.startsWith(v)&&(h.push({type:6,index:o}),r.removeAttribute(_));if(Re.test(r.tagName)){let _=r.textContent.split(v),g=_.length-1;if(g>0){r.textContent=K?K.emptyScript:"";for(let k=0;k<g;k++)r.append(_[k],H()),A.nextNode(),h.push({type:2,index:++o});r.append(_[g],H())}}}else if(r.nodeType===8)if(r.data===Te)h.push({type:2,index:o});else{let _=-1;for(;(_=r.data.indexOf(v,_+1))!==-1;)h.push({type:7,index:o}),_+=v.length-1}o++}}static createElement(e,t){let n=D.createElement("template");return n.innerHTML=e,n}};function E(i,e,t=i,n){if(e===z)return e;let r=n!==void 0?t._$Co?.[n]:t._$Cl,o=W(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,t,n)),n!==void 0?(t._$Co??=[])[n]=r:t._$Cl=r),r!==void 0&&(e=E(i,r._$AS(i,e.values),r,n)),e}var X=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:n}=this._$AD,r=(e?.creationScope??D).importNode(t,!0);A.currentNode=r;let o=A.nextNode(),a=0,s=0,h=n[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new P(o,o.nextSibling,this,e):h.type===1?u=new h.ctor(o,h.name,h.strings,this,e):h.type===6&&(u=new te(o,this,e)),this._$AV.push(u),h=n[++s]}a!==h?.index&&(o=A.nextNode(),a++)}return A.currentNode=D,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},P=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.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=E(this,e,t),W(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==z&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Je(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!==d&&W(this._$AH)?this._$AA.nextSibling.data=e:this.T(D.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=B.createElement(Fe(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let o=new X(r,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=ze.get(e.strings);return t===void 0&&ze.set(e.strings,t=new B(e)),t}k(e){re(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,r=0;for(let o of e)r===t.length?t.push(n=new i(this.O(H()),this.O(H()),this,this.options)):n=t[r],n._$AI(o),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=ke(e).nextSibling;ke(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},T=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):thiLine truncated
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),De=/'/g,ze=/"/g,Fe=/^(?:script|style|textarea|title)$/i,oe=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),l=oe(1),ut=oe(2),mt=oe(3),z=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Ee=new WeakMap,A=D.createTreeWalker(D,129);function He(i,e){if(!ie(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ye!==void 0?ye.createHTML(e):e}var Ye=(i,e)=>{let t=i.length-1,n=[],r,o=e===2?"<svg>":e===3?"<math>":"",a=H;for(let s=0;s<t;s++){let h=i[s],u,p,_=-1,g=0;for(;g<h.length&&(a.lastIndex=g,p=a.exec(h),p!==null);)g=a.lastIndex,a===H?p[1]==="!--"?a=Se:p[1]!==void 0?a=Ae:p[2]!==void 0?(Fe.test(p[2])&&(r=RegExp("</"+p[2],"g")),a=S):p[3]!==void 0&&(a=S):a===S?p[0]===">"?(a=r??H,_=-1):p[1]===void 0?_=-2:(_=a.lastIndex-p[2].length,u=p[1],a=p[3]===void 0?S:p[3]==='"'?ze:De):a===ze||a===De?a=S:a===Se||a===Ae?a=H:(a=S,r=void 0);let k=a===S&&i[s+1].startsWith("/>")?" ":"";o+=a===H?h+Je:_>=0?(n.push(u),h.slice(0,_)+Te+h.slice(_)+v+k):h+v+(_===-2?s:k)}return[He(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},B=class i{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let o=0,a=0,s=e.length-1,h=this.parts,[u,p]=Ye(e,t);if(this.el=i.createElement(u,n),A.currentNode=this.el.content,t===2||t===3){let _=this.el.content.firstChild;_.replaceWith(..._.childNodes)}for(;(r=A.nextNode())!==null&&h.length<s;){if(r.nodeType===1){if(r.hasAttributes())for(let _ of r.getAttributeNames())if(_.endsWith(Te)){let g=p[a++],k=r.getAttribute(_).split(v),L=/([.?@])?(.*)/.exec(g);h.push({type:1,index:o,name:L[2],strings:k,ctor:L[1]==="."?Q:L[1]==="?"?ee:L[1]==="@"?te:T}),r.removeAttribute(_)}else _.startsWith(v)&&(h.push({type:6,index:o}),r.removeAttribute(_));if(Fe.test(r.tagName)){let _=r.textContent.split(v),g=_.length-1;if(g>0){r.textContent=K?K.emptyScript:"";for(let k=0;k<g;k++)r.append(_[k],x()),A.nextNode(),h.push({type:2,index:++o});r.append(_[g],x())}}}else if(r.nodeType===8)if(r.data===Re)h.push({type:2,index:o});else{let _=-1;for(;(_=r.data.indexOf(v,_+1))!==-1;)h.push({type:7,index:o}),_+=v.length-1}o++}}static createElement(e,t){let n=D.createElement("template");return n.innerHTML=e,n}};function E(i,e,t=i,n){if(e===z)return e;let r=n!==void 0?t._$Co?.[n]:t._$Cl,o=W(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,t,n)),n!==void 0?(t._$Co??=[])[n]=r:t._$Cl=r),r!==void 0&&(e=E(i,r._$AS(i,e.values),r,n)),e}var Y=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:n}=this._$AD,r=(e?.creationScope??D).importNode(t,!0);A.currentNode=r;let o=A.nextNode(),a=0,s=0,h=n[0];for(;h!==void 0;){if(a===h.index){let u;h.type===2?u=new P(o,o.nextSibling,this,e):h.type===1?u=new h.ctor(o,h.name,h.strings,this,e):h.type===6&&(u=new ne(o,this,e)),this._$AV.push(u),h=n[++s]}a!==h?.index&&(o=A.nextNode(),a++)}return A.currentNode=D,r}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},P=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.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=E(this,e,t),W(e)?e===d||e==null||e===""?(this._$AH!==d&&this._$AR(),this._$AH=d):e!==this._$AH&&e!==z&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Xe(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!==d&&W(this._$AH)?this._$AA.nextSibling.data=e:this.T(D.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=B.createElement(He(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let o=new Y(r,this),a=o.u(this.options);o.p(t),this.T(a),this._$AH=o}}_$AC(e){let t=Ee.get(e.strings);return t===void 0&&Ee.set(e.strings,t=new B(e)),t}k(e){ie(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,r=0;for(let o of e)r===t.length?t.push(n=new i(this.O(x()),this.O(x()),this,this.options)):n=t[r],n._$AI(o),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=ve(e).nextSibling;ve(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},T=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):thLine truncated
|
||||||
<input type="checkbox" .checked=${e} @change=${o=>r(nt(o))} />
|
<input type="checkbox" .checked=${e} @change=${o=>r(rt(o))} />
|
||||||
<span>${i.t(t)}${n?l`<small>${i.t(n)}</small>`:d}</span>
|
<span>${i.t(t)}${n?l`<small>${i.t(n)}</small>`:d}</span>
|
||||||
</label>`}var c=(i,e,t,n)=>f(i,i.value[e],t,n,r=>i.set(e,r)),se=(i,e,t,n)=>f(i,i.value[e],t,n,r=>i.set(e,r||void 0));function w(i,e,t,n,r){return l`<label class="field"
|
</label>`}var c=(i,e,t,n)=>f(i,i.value[e],t,n,r=>i.set(e,r)),le=(i,e,t,n)=>f(i,i.value[e],t,n,r=>i.set(e,r||void 0));function w(i,e,t,n,r){return l`<label class="field"
|
||||||
>${i.t(t)}
|
>${i.t(t)}
|
||||||
<select @change=${o=>i.set(e,O(o))}>
|
<select @change=${o=>i.set(e,O(o))}>
|
||||||
${n.map(([o,a])=>l`<option value=${o} ?selected=${o===r}>${i.t(a)}</option>`)}
|
${n.map(([o,a])=>l`<option value=${o} ?selected=${o===r}>${i.t(a)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</label>`}function le(i,e,t,n){return l`<label class="field"
|
</label>`}function he(i,e,t,n){return l`<label class="field"
|
||||||
>${i.t(t)}
|
>${i.t(t)}
|
||||||
<select @change=${r=>i.set(e,Number(O(r))||void 0)}>
|
<select @change=${r=>i.set(e,Number(O(r))||void 0)}>
|
||||||
${n.map(r=>l`<option value=${r.value} ?selected=${i.value[e]===r.value}>${r.text}</option>`)}
|
${n.map(r=>l`<option value=${r.value} ?selected=${i.value[e]===r.value}>${r.text}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</label>`}function I(i,e,t,n=""){return l`<label class="field wide"
|
</label>`}function I(i,e,t,n=""){return l`<label class="field wide"
|
||||||
>${i.t(t)}
|
>${i.t(t)}
|
||||||
<input type="text" placeholder=${n} .value=${i.value[e]??""} @change=${r=>i.set(e,tt(r).trim()||void 0)} />
|
<input type="text" placeholder=${n} .value=${i.value[e]??""} @change=${r=>i.set(e,nt(r).trim()||void 0)} />
|
||||||
</label>`}function he(i,e,t,n){let r=n===void 0?"switch":n?"on":"off",o=[["switch","card_flows_switch"],["on","card_flows_on"],["off","card_flows_off"]];return l`<label class="field wide"
|
</label>`}function de(i,e,t,n){let r=n===void 0?"switch":n?"on":"off",o=[["switch","card_flows_switch"],["on","card_flows_on"],["off","card_flows_off"]];return l`<label class="field wide"
|
||||||
>${i.t(t)}
|
>${i.t(t)}
|
||||||
<select @change=${a=>i.set(e,O(a)==="switch"?void 0:O(a)==="on")}>
|
<select @change=${a=>i.set(e,O(a)==="switch"?void 0:O(a)==="on")}>
|
||||||
${o.map(([a,s])=>l`<option value=${a} ?selected=${r===a}>${i.t(s)}</option>`)}
|
${o.map(([a,s])=>l`<option value=${a} ?selected=${r===a}>${i.t(s)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</label>`}var Pe=U`
|
</label>`}var $e=j`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
@@ -115,7 +115,7 @@ var p={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",f
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;var ce=globalThis,de=ce.__nextfloorBuiltin?.de??{},_e=ce.__nextfloorBuiltin?.en??{};ce.__nextfloorBuiltin??={de,en:_e};var $e=()=>typeof p=="object"&&p||{},rt=globalThis,Z=rt.__nextfloorTexts??=new Map;function Le(i){let e=i.toLowerCase().split("-")[0];return e!=="de"&&e!=="en"&&e in $e()?e:void 0}function it(i){let e=Le(i),t=e===void 0?void 0:Z.get(e);return t instanceof Promise?void 0:t}function Me(i,e){let t=Le(i?.language??navigator.language);if(t===void 0)return!1;let n=Z.get(t);return n===void 0&&(n=fetch(new URL(`./lang/${t}.json?v=${$e()[t]}`,import.meta.url)).then(r=>r.ok?r.json():{}).catch(()=>({})).then(r=>{Z.set(t,r&&typeof r=="object"?r:{})}),Z.set(t,n)),n instanceof Promise?(n.then(()=>e.requestUpdate()),!0):!1}function Ne(i,e,t={}){let n=i?.language??navigator.language,r=n.startsWith("de"),o=(r?void 0:it(n)?.[e])??(r?de:_e)[e]??_e[e]??de[e]??e;for(let[a,s]of Object.entries(t))o=o.replace(`{${a}}`,String(s));return o}var ue=class extends y{static properties={hass:{attribute:!1},_config:{state:!0},_floors:{state:!0},_rooms:{state:!0},_templates:{state:!0}};loading=!1;form;constructor(){super(),this._config={type:"custom:nextfloor-card"},this._floors=[],this._rooms=[],this._templates=[];let e=this;this.form={get value(){return{...ae,...e._config}},t:(t,n)=>Ne(e.hass,t,n),set:(t,n)=>e.write(t,n)}}setConfig(e){this._config=e}willUpdate(){this.hass&&!this.loading&&this._floors.length===0&&(this.loading=!0,He(this.hass).then(e=>{this._floors=e.building.floors.map(t=>({id:t.id,name:t.name})),this._templates=Object.keys(e.building.settings.card_templates??{}),this._rooms=e.building.floors.flatMap(t=>t.rooms.map(n=>({id:n.id,name:n.name,floor:t.name})))},()=>{}))}write(e,t){let n={...this._config};t===void 0||t===""||ae[e]===t?delete n[e]:n[e]=t,this.publish(n)}publish(e){this._config=e,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:e},bubbles:!0,composed:!0}))}roomsChoice(){if(this._rooms.length===0)return l``;let e=new Set(this._config.rooms??[]),t=(n,r)=>{let o=this._rooms.map(a=>a.id).filter(a=>a===n?r:e.has(a));this.form.set("rooms",o.length?o:void 0)};return l`<fieldset class="rooms">
|
`;var ue=globalThis,_e=ue.__nextfloorBuiltin?.de??{},ce=ue.__nextfloorBuiltin?.en??{};ue.__nextfloorBuiltin??={de:_e,en:ce};var Le=()=>typeof m=="object"&&m||{},it=globalThis,Z=it.__nextfloorTexts??=new Map;function Me(i){let e=i.toLowerCase().split("-")[0];return e!=="de"&&e!=="en"&&e in Le()?e:void 0}function ot(i){let e=Me(i),t=e===void 0?void 0:Z.get(e);return t instanceof Promise?void 0:t}function Ne(i,e){let t=Me(i?.language??navigator.language);if(t===void 0)return!1;let n=Z.get(t);return n===void 0&&(n=fetch(new URL(`./lang/${t}.json?v=${Le()[t]}`,import.meta.url)).then(r=>r.ok?r.json():{}).catch(()=>({})).then(r=>{Z.set(t,r&&typeof r=="object"?r:{})}),Z.set(t,n)),n instanceof Promise?(n.then(()=>e.requestUpdate()),!0):!1}function Ce(i,e,t={}){let n=i?.language??navigator.language,r=n.startsWith("de"),o=(r?void 0:ot(n)?.[e])??(r?_e:ce)[e]??ce[e]??_e[e]??e;for(let[a,s]of Object.entries(t))o=o.replace(`{${a}}`,String(s));return o}var V=i=>i?.symconObjects!==void 0;var me=class extends y{static properties={hass:{attribute:!1},_config:{state:!0},_floors:{state:!0},_rooms:{state:!0},_templates:{state:!0}};loading=!1;form;constructor(){super(),this._config={type:"custom:nextfloor-card"},this._floors=[],this._rooms=[],this._templates=[];let e=this;this.form={get value(){return{...se,...e._config}},t:(t,n)=>Ce(e.hass,t,n),set:(t,n)=>e.write(t,n)}}setConfig(e){this._config=e}willUpdate(){this.hass&&!this.loading&&this._floors.length===0&&(this.loading=!0,We(this.hass).then(e=>{this._floors=e.building.floors.map(t=>({id:t.id,name:t.name})),this._templates=Object.keys(e.building.settings.card_templates??{}),this._rooms=e.building.floors.flatMap(t=>t.rooms.map(n=>({id:n.id,name:n.name,floor:t.name})))},()=>{}))}write(e,t){let n={...this._config};t===void 0||t===""||se[e]===t?delete n[e]:n[e]=t,this.publish(n)}publish(e){this._config=e,this.dispatchEvent(new CustomEvent("config-changed",{detail:{config:e},bubbles:!0,composed:!0}))}roomsChoice(){if(this._rooms.length===0)return l``;let e=new Set(this._config.rooms??[]),t=(n,r)=>{let o=this._rooms.map(a=>a.id).filter(a=>a===n?r:e.has(a));this.form.set("rooms",o.length?o:void 0)};return l`<fieldset class="rooms">
|
||||||
<legend>${this.form.t("card_rooms")}</legend>
|
<legend>${this.form.t("card_rooms")}</legend>
|
||||||
<small>${this.form.t("card_rooms_hint")}</small>
|
<small>${this.form.t("card_rooms_hint")}</small>
|
||||||
${this._rooms.map(n=>l`<label class="toggle"><input type="checkbox" .checked=${e.has(n.id)} @change=${r=>t(n.id,r.target.checked)} /><span>${this._floors.length>1?`${n.floor} \xB7 `:""}${n.name}</span></label>`)}
|
${this._rooms.map(n=>l`<label class="toggle"><input type="checkbox" .checked=${e.has(n.id)} @change=${r=>t(n.id,r.target.checked)} /><span>${this._floors.length>1?`${n.floor} \xB7 `:""}${n.name}</span></label>`)}
|
||||||
@@ -124,8 +124,8 @@ var p={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",f
|
|||||||
${f(e,e.value.lock_button!==!1,"card_lock_button",void 0,s=>e.set("lock_button",s?void 0:!1))}
|
${f(e,e.value.lock_button!==!1,"card_lock_button",void 0,s=>e.set("lock_button",s?void 0:!1))}
|
||||||
${f(e,e.value.walk_button!==!1,"card_walk_button",void 0,s=>e.set("walk_button",s?void 0:!1))}
|
${f(e,e.value.walk_button!==!1,"card_walk_button",void 0,s=>e.set("walk_button",s?void 0:!1))}
|
||||||
${f(e,e.value.time_travel!==!1,"card_travel_button",void 0,s=>e.set("time_travel",s?void 0:!1))}
|
${f(e,e.value.time_travel!==!1,"card_travel_button",void 0,s=>e.set("time_travel",s?void 0:!1))}
|
||||||
${se(e,"marker_names","card_marker_names","card_marker_names_hint")} ${se(e,"controls_hidden","card_controls_hidden","card_controls_hidden_hint")}
|
${le(e,"marker_names","card_marker_names","card_marker_names_hint")} ${le(e,"controls_hidden","card_controls_hidden","card_controls_hidden_hint")}
|
||||||
${le(e,"controls_hide_after","card_controls_hide_after",a)}
|
${he(e,"controls_hide_after","card_controls_hide_after",a)}
|
||||||
${n?l`<div class="sub">
|
${n?l`<div class="sub">
|
||||||
${$.map(s=>l`<label class="chip">
|
${$.map(s=>l`<label class="chip">
|
||||||
<input
|
<input
|
||||||
@@ -137,7 +137,7 @@ var p={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",f
|
|||||||
</label>`)}
|
</label>`)}
|
||||||
</div>`:d}`}kioskSection(){let e=this.form,{night:t}=e.value,n=t==="off"||t==="sun"?t:"time",r=[0,1,2,5,10].map(a=>({value:a*60,text:a?e.t("card_idle_min",{n:a}):e.t("card_idle_off")})),o=[["off","card_night_off"],["sun","card_night_sun"],["time","card_night_time"]];return l`<h3>${e.t("card_section_kiosk")}</h3>
|
</div>`:d}`}kioskSection(){let e=this.form,{night:t}=e.value,n=t==="off"||t==="sun"?t:"time",r=[0,1,2,5,10].map(a=>({value:a*60,text:a?e.t("card_idle_min",{n:a}):e.t("card_idle_off")})),o=[["off","card_night_off"],["sun","card_night_sun"],["time","card_night_time"]];return l`<h3>${e.t("card_section_kiosk")}</h3>
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
${le(e,"idle_return","card_idle_return",r)}
|
${he(e,"idle_return","card_idle_return",r)}
|
||||||
<label class="field"
|
<label class="field"
|
||||||
>${e.t("card_night")}
|
>${e.t("card_night")}
|
||||||
<select @change=${a=>e.set("night",{off:void 0,sun:"sun",time:"22:00-06:00"}[a.target.value])}>
|
<select @change=${a=>e.set("night",{off:void 0,sun:"sun",time:"22:00-06:00"}[a.target.value])}>
|
||||||
@@ -169,17 +169,17 @@ var p={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",f
|
|||||||
${[.8,1,1.25,1.5,1.75,2,2.5].map(n=>l`<option value=${n} ?selected=${(e.value.zoom??1)===n}>${Math.round(n*100)} %</option>`)}
|
${[.8,1,1.25,1.5,1.75,2,2.5].map(n=>l`<option value=${n} ?selected=${(e.value.zoom??1)===n}>${Math.round(n*100)} %</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
${c(e,"announcements","card_announcements","card_announcements_hint")}
|
${V(this.hass)?d:c(e,"announcements","card_announcements","card_announcements_hint")}
|
||||||
${e.value.announcements!==!1?l`<div class="grid">${I(e,"screen_name","screen_name")}</div>`:d}
|
${!V(this.hass)&&e.value.announcements!==!1?l`<div class="grid">${I(e,"screen_name","screen_name")}</div>`:d}
|
||||||
${c(e,"weather","card_weather","card_weather_hint")}
|
${c(e,"weather","card_weather","card_weather_hint")}
|
||||||
${e.value.weather!==!1?l`<div class="grid">
|
${e.value.weather!==!1?l`<div class="grid">
|
||||||
<label class="field wide"
|
${V(this.hass)?d:l`<label class="field wide"
|
||||||
>${e.t("weather_entity")}
|
>${e.t("weather_entity")}
|
||||||
<select @change=${n=>e.set("weather_entity",n.target.value||void 0)}>
|
<select @change=${n=>e.set("weather_entity",n.target.value||void 0)}>
|
||||||
<option value="" ?selected=${!e.value.weather_entity}>${e.t("card_weather_plan")}</option>
|
<option value="" ?selected=${!e.value.weather_entity}>${e.t("card_weather_plan")}</option>
|
||||||
${t.map(n=>l`<option value=${n} ?selected=${n===e.value.weather_entity}>${String(this.hass?.states[n]?.attributes.friendly_name??n)}</option>`)}
|
${t.map(n=>l`<option value=${n} ?selected=${n===e.value.weather_entity}>${String(this.hass?.states[n]?.attributes.friendly_name??n)}</option>`)}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>`}
|
||||||
<label class="field"
|
<label class="field"
|
||||||
>${e.t("card_weather_density")}
|
>${e.t("card_weather_density")}
|
||||||
<select @change=${n=>e.set("weather_density",Number(n.target.value))}>
|
<select @change=${n=>e.set("weather_density",Number(n.target.value))}>
|
||||||
@@ -190,9 +190,9 @@ var p={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",f
|
|||||||
</div>`:d}
|
</div>`:d}
|
||||||
<p class="hint">${e.t("card_pro_hint")}</p>`}furnitureColors(e){let t=this._config.furniture_colors??{},n=(r,o)=>{let a={...t,[r]:o};o||delete a[r],e.set("furniture_colors",Object.keys(a).length?a:void 0)};return l`<details class="field">
|
<p class="hint">${e.t("card_pro_hint")}</p>`}furnitureColors(e){let t=this._config.furniture_colors??{},n=(r,o)=>{let a={...t,[r]:o};o||delete a[r],e.set("furniture_colors",Object.keys(a).length?a:void 0)};return l`<details class="field">
|
||||||
<summary>${e.t("furn_colors_card")}${Object.keys(t).length?` (${Object.keys(t).length})`:""}</summary>
|
<summary>${e.t("furn_colors_card")}${Object.keys(t).length?` (${Object.keys(t).length})`:""}</summary>
|
||||||
${We.map(r=>l`<label class="field"
|
${Be.map(r=>l`<label class="field"
|
||||||
>${e.t(`furn_color_${r}`)}
|
>${e.t(`furn_color_${r}`)}
|
||||||
<input type="color" .value=${t[r]??Be[r]} @input=${o=>n(r,o.target.value)} />
|
<input type="color" .value=${t[r]??Pe[r]} @input=${o=>n(r,o.target.value)} />
|
||||||
${t[r]?l`<button type="button" class="link" @click=${()=>n(r,null)}>${e.t("furn_color_house")}</button>`:d}
|
${t[r]?l`<button type="button" class="link" @click=${()=>n(r,null)}>${e.t("furn_color_house")}</button>`:d}
|
||||||
</label>`)}
|
</label>`)}
|
||||||
</details>`}viewSection(){let e=this.form,t=e.value;return l`<h3>${e.t("card_section_view")}</h3>
|
</details>`}viewSection(){let e=this.form,t=e.value;return l`<h3>${e.t("card_section_view")}</h3>
|
||||||
@@ -263,11 +263,11 @@ var p={cs:"4be67fcd522e",da:"0fe66a82bf2a",es:"bd89dffd1355",fi:"9a17bc084f56",f
|
|||||||
<div class="grid">
|
<div class="grid">
|
||||||
${w(e,"markers","markers",[["none","markers_none"],["important","markers_important"],["all","markers_all"]],t.markers)}
|
${w(e,"markers","markers",[["none","markers_none"],["important","markers_important"],["all","markers_all"]],t.markers)}
|
||||||
${w(e,"heatmap","heatmap",[["none","heat_off"],["temperature","heat_temperature"],["humidity","heat_humidity"],["co2","heat_co2"],["mould","heat_mould"],["values","heat_values"],["wifi","heat_wifi"]],t.heatmap)}
|
${w(e,"heatmap","heatmap",[["none","heat_off"],["temperature","heat_temperature"],["humidity","heat_humidity"],["co2","heat_co2"],["mould","heat_mould"],["values","heat_values"],["wifi","heat_wifi"]],t.heatmap)}
|
||||||
${he(e,"flows","flows",t.flows)} ${he(e,"holograms","holos",t.holograms)}
|
${de(e,"flows","flows",t.flows)} ${de(e,"holograms","holos",t.holograms)}
|
||||||
</div>
|
</div>
|
||||||
${c(e,"tap_in_room","card_tap_in_room","card_tap_in_room_hint")} ${w(e,"room_double_tap","room_double_tap",[["auto","card_room_double_tap_auto"],["area","room_double_tap_area"],["plan","room_double_tap_plan"],["off","room_double_tap_off"]],t.room_double_tap)} ${this.markersOutside()} ${this.controlsSection()} ${this.floorThumbsToggle()} ${c(e,"room_names","card_room_names")} ${c(e,"energy","card_energy")}
|
${c(e,"tap_in_room","card_tap_in_room","card_tap_in_room_hint")} ${w(e,"room_double_tap","room_double_tap",[["auto","card_room_double_tap_auto"],["area","room_double_tap_area"],["plan","room_double_tap_plan"],["off","room_double_tap_off"]],t.room_double_tap)} ${this.markersOutside()} ${this.controlsSection()} ${this.floorThumbsToggle()} ${c(e,"room_names","card_room_names")} ${c(e,"energy","card_energy")}
|
||||||
${c(e,"room_buttons","card_room_buttons","card_room_buttons_hint")} ${c(e,"room_panel","card_room_panel","card_room_panel_hint")} ${c(e,"fullscreen_button","card_fullscreen_button","card_fullscreen_button_hint")}
|
${c(e,"room_buttons","card_room_buttons","card_room_buttons_hint")} ${c(e,"room_panel","card_room_panel","card_room_panel_hint")} ${c(e,"fullscreen_button","card_fullscreen_button","card_fullscreen_button_hint")}
|
||||||
${c(e,"explode","card_explode")} ${c(e,"roof_fade","card_roof_fade","card_roof_fade_hint")} ${c(e,"stats","card_stats","card_stats_hint")}`}render(){return this.hass&&Me(this.hass,this)?d:l`${this.viewSection()} ${this.showSection()} ${this.featuresSection()} ${this.kioskSection()}`}static styles=Pe};customElements.get("nextfloor-card-editor")||customElements.define("nextfloor-card-editor",ue);export{ue as NextFloorCardEditor};
|
${c(e,"explode","card_explode")} ${c(e,"roof_fade","card_roof_fade","card_roof_fade_hint")} ${c(e,"stats","card_stats","card_stats_hint")}`}render(){return this.hass&&Ne(this.hass,this)?d:l`${this.viewSection()} ${this.showSection()} ${this.featuresSection()} ${this.kioskSection()}`}static styles=$e};customElements.get("nextfloor-card-editor")||customElements.define("nextfloor-card-editor",me);export{me as NextFloorCardEditor};
|
||||||
/*! Bundled license information:
|
/*! Bundled license information:
|
||||||
|
|
||||||
@lit/reactive-element/css-tag.js:
|
@lit/reactive-element/css-tag.js:
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+55
-1
@@ -419,7 +419,9 @@ class NextFloor extends IPSModuleStrict
|
|||||||
'icon' => (string) $object['ObjectIcon']
|
'icon' => (string) $object['ObjectIcon']
|
||||||
];
|
];
|
||||||
if ($type === 1) { // OBJECTTYPE_INSTANCE: the logical console view separates system modules.
|
if ($type === 1) { // OBJECTTYPE_INSTANCE: the logical console view separates system modules.
|
||||||
$node['module_type'] = (int) IPS_GetInstance($objectID)['ModuleInfo']['ModuleType'];
|
$module = IPS_GetInstance($objectID)['ModuleInfo'];
|
||||||
|
$node['module_type'] = (int) $module['ModuleType'];
|
||||||
|
$node['module_id'] = (string) ($module['ModuleID'] ?? '');
|
||||||
}
|
}
|
||||||
if ($type === 0) { // OBJECTTYPE_CATEGORY
|
if ($type === 0) { // OBJECTTYPE_CATEGORY
|
||||||
$nearestCategory = $objectID;
|
$nearestCategory = $objectID;
|
||||||
@@ -430,12 +432,41 @@ class NextFloor extends IPSModuleStrict
|
|||||||
$variables[] = $variable;
|
$variables[] = $variable;
|
||||||
$node['entity_id'] = $variable['entity_id'];
|
$node['entity_id'] = $variable['entity_id'];
|
||||||
}
|
}
|
||||||
|
if ($type === 4 && function_exists('IPS_GetEvent')) {
|
||||||
|
$event = IPS_GetEvent($objectID);
|
||||||
|
if ((int) ($event['EventType'] ?? -1) === 2) {
|
||||||
|
$schedule = $this->describeSchedule($objectID, $name, implode(' / ', $path), $event);
|
||||||
|
$variables[] = $schedule;
|
||||||
|
$node['entity_id'] = $schedule['entity_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
$nodes[] = $node;
|
$nodes[] = $node;
|
||||||
foreach (IPS_GetChildrenIDs($objectID) as $child) {
|
foreach (IPS_GetChildrenIDs($objectID) as $child) {
|
||||||
$this->collectObjects($child, $path, $nearestCategory, $variables, $areas, $nodes);
|
$this->collectObjects($child, $path, $nearestCategory, $variables, $areas, $nodes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function describeSchedule(int $eventID, string $name, string $path, array $event): array
|
||||||
|
{
|
||||||
|
// Export presentation only; action scripts and action parameters stay in Symcon.
|
||||||
|
$actions = array_map(static fn(array $action): array => [
|
||||||
|
'id' => (int) $action['ID'], 'name' => (string) $action['Name'], 'color' => (int) ($action['Color'] ?? 0)
|
||||||
|
], $event['ScheduleActions'] ?? []);
|
||||||
|
$groups = array_map(static fn(array $group): array => [
|
||||||
|
'id' => (int) $group['ID'], 'days' => (int) $group['Days'],
|
||||||
|
'points' => array_map(static fn(array $point): array => [
|
||||||
|
'id' => (int) $point['ID'], 'hour' => (int) $point['Start']['Hour'],
|
||||||
|
'minute' => (int) $point['Start']['Minute'], 'second' => (int) $point['Start']['Second'],
|
||||||
|
'action' => (int) $point['ActionID']
|
||||||
|
], $group['Points'] ?? [])
|
||||||
|
], $event['ScheduleGroups'] ?? []);
|
||||||
|
return ['entity_id' => 'schedule.' . $eventID, 'name' => $name, 'path' => $path,
|
||||||
|
'state' => ($event['EventActive'] ?? false) ? 'on' : 'off',
|
||||||
|
'attributes' => ['symcon_id' => $eventID, 'symcon_schedule' => true,
|
||||||
|
'groups' => $groups, 'actions' => $actions, 'next_run' => (int) ($event['NextRun'] ?? 0),
|
||||||
|
'next_action' => (int) ($event['NextActionID'] ?? 0), 'last_action' => (int) ($event['LastActionID'] ?? 0)]];
|
||||||
|
}
|
||||||
|
|
||||||
private function describeVariable(int $variableID, string $name, string $path, ?int $categoryID): array
|
private function describeVariable(int $variableID, string $name, string $path, ?int $categoryID): array
|
||||||
{
|
{
|
||||||
$variable = IPS_GetVariable($variableID);
|
$variable = IPS_GetVariable($variableID);
|
||||||
@@ -451,6 +482,7 @@ class NextFloor extends IPSModuleStrict
|
|||||||
'symcon_variable_type' => (int) $variable['VariableType'],
|
'symcon_variable_type' => (int) $variable['VariableType'],
|
||||||
'symcon_has_action' => ((int) ($variable['VariableCustomAction'] ?: $variable['VariableAction'])) !== 0,
|
'symcon_has_action' => ((int) ($variable['VariableCustomAction'] ?: $variable['VariableAction'])) !== 0,
|
||||||
'symcon_formatted' => GetValueFormatted($variableID),
|
'symcon_formatted' => GetValueFormatted($variableID),
|
||||||
|
'symcon_value' => $value,
|
||||||
'device_class' => $this->deviceClassFor($profile, $name, $unit)
|
'device_class' => $this->deviceClassFor($profile, $name, $unit)
|
||||||
];
|
];
|
||||||
if ($unit !== '') {
|
if ($unit !== '') {
|
||||||
@@ -814,6 +846,14 @@ class NextFloor extends IPSModuleStrict
|
|||||||
if (!is_string($entityID)) {
|
if (!is_string($entityID)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($domain === 'schedule' && $service === 'set_active') {
|
||||||
|
if (preg_match('/^schedule\.(\d+)$/', $entityID, $match) !== 1 || !IPS_EventExists((int) $match[1])
|
||||||
|
|| (int) IPS_GetEvent((int) $match[1])['EventType'] !== 2 || !is_bool($data['active'] ?? null)) {
|
||||||
|
throw new InvalidArgumentException('invalid_schedule');
|
||||||
|
}
|
||||||
|
if (!IPS_SetEventActive((int) $match[1], $data['active'])) throw new RuntimeException('schedule_update_failed');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$variableID = $this->variableIdForEntity($entityID);
|
$variableID = $this->variableIdForEntity($entityID);
|
||||||
if ($variableID === null || !IPS_VariableExists($variableID)) {
|
if ($variableID === null || !IPS_VariableExists($variableID)) {
|
||||||
continue;
|
continue;
|
||||||
@@ -832,6 +872,20 @@ class NextFloor extends IPSModuleStrict
|
|||||||
{
|
{
|
||||||
$variable = IPS_GetVariable($variableID);
|
$variable = IPS_GetVariable($variableID);
|
||||||
$current = GetValue($variableID);
|
$current = GetValue($variableID);
|
||||||
|
if ($domain === 'symcon' && $service === 'set_value') {
|
||||||
|
if ((int) ($variable['VariableCustomAction'] ?: $variable['VariableAction']) === 0) throw new InvalidArgumentException('variable_readonly');
|
||||||
|
$type = (int) $variable['VariableType'];
|
||||||
|
$value = $data['value'] ?? null;
|
||||||
|
if ($type === 0 && !is_bool($value)) throw new InvalidArgumentException('invalid_boolean');
|
||||||
|
if (in_array($type, [1, 2], true)) {
|
||||||
|
$meta = $this->variableMetadata($variableID, $variable);
|
||||||
|
if (!is_numeric($value) || !is_finite((float) $value) || (float) $value < $meta['min'] || (float) $value > $meta['max']
|
||||||
|
|| ($type === 1 && (float) $value !== floor((float) $value))) throw new InvalidArgumentException('invalid_value');
|
||||||
|
}
|
||||||
|
if ($type === 3 && !is_string($value)) throw new InvalidArgumentException('invalid_string');
|
||||||
|
$this->setVariable($variableID, $variable, $value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ($domain === 'cover' && $service === 'stop_cover') {
|
if ($domain === 'cover' && $service === 'stop_cover') {
|
||||||
throw new InvalidArgumentException('cover_stop_not_supported');
|
throw new InvalidArgumentException('cover_stop_not_supported');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ In **Kerninstanzen → Modules** wird dieses Repository verwendet:
|
|||||||
|
|
||||||
Im Zahnrad des Eintrags den Branch **`symcon`** wählen und auf Aktualisierungen prüfen.
|
Im Zahnrad des Eintrags den Branch **`symcon`** wählen und auf Aktualisierungen prüfen.
|
||||||
`main` enthält die Quellen für die Entwicklung, `symcon` die installierbare Bibliothek.
|
`main` enthält die Quellen für die Entwicklung, `symcon` die installierbare Bibliothek.
|
||||||
Nach der Aktualisierung auf **0.2.12 / Build 15** die Konsole neu laden. Unter
|
Nach der Aktualisierung auf **0.2.15 / Build 18** die Konsole neu laden. Unter
|
||||||
**Instanz hinzufügen → Hersteller NextFloor** erscheint **„NextFloor Designer und 3D-Kachel“**.
|
**Instanz hinzufügen → Hersteller NextFloor** erscheint **„NextFloor Designer und 3D-Kachel“**.
|
||||||
|
|
||||||
### Für die Entwicklung
|
### Für die Entwicklung
|
||||||
@@ -46,6 +46,57 @@ Die Dateien unter `NextFloor/assets/` und `NextFloor/packs/` werden durch
|
|||||||
Der Build prüft anschließend die Modulmetadaten und die installierbare Verzeichnisstruktur.
|
Der Build prüft anschließend die Modulmetadaten und die installierbare Verzeichnisstruktur.
|
||||||
Dieselbe Prüfung lässt sich separat mit `node symcon/tests/validate-package.mjs` ausführen.
|
Dieselbe Prüfung lässt sich separat mit `node symcon/tests/validate-package.mjs` ausführen.
|
||||||
|
|
||||||
|
## Änderungen in 0.2.15
|
||||||
|
|
||||||
|
- Fehlen einzelne Zählerwerte, wird die Summe der verfügbaren Werte mit **Err:**
|
||||||
|
davor angezeigt, zum Beispiel **Err: 1,5 kW**. Das gilt für Raum- und
|
||||||
|
Stockwerksübersichten sowie deren Leistungsanzeigen. Sind alle Quellen
|
||||||
|
ausgefallen, steht dort **Err: –**. Sobald wieder alle Werte verfügbar sind,
|
||||||
|
verschwindet die Kennzeichnung automatisch.
|
||||||
|
|
||||||
|
## Änderungen in 0.2.14
|
||||||
|
|
||||||
|
- Verknüpfte Raum-Bereichskategorien werden einschließlich ausgeblendeter Objekte
|
||||||
|
nach Kategorien und Dummy-Modulen namens **Elektro/Strom, Wasser, Gas, Heizen
|
||||||
|
und Kühlen** durchsucht. Daraus werden **Leistung/Durchfluss** und
|
||||||
|
**Energie/Verbrauch** aus numerischen Variablen gelesen und im Raummenü angezeigt.
|
||||||
|
Passende Einheiten werden umgerechnet; verschiedene Einheiten und Tages-,
|
||||||
|
Monats-, Jahres- und Gesamtverbräuche bleiben getrennt. Ein übergeordneter
|
||||||
|
Zählerstand ersetzt seine Unterzähler; Variablenlinks zählen nicht doppelt.
|
||||||
|
- Der Knopf **Stockwerkszähler** in der 3D-Ansicht zeigt die Raumsummen je Medium.
|
||||||
|
Unter **Stockwerke → Stockwerkszähler** können für jedes Medium eigene
|
||||||
|
Leistungs-/Durchfluss- und Energie-/Verbrauchszähler aus dem Objektbaum gewählt
|
||||||
|
werden. Jeder eigene Zähler ersetzt nur die entsprechende Raumsumme. **×**
|
||||||
|
kehrt zur automatischen Summe zurück; bestehende Stockwerks-Leistungszähler
|
||||||
|
bleiben verknüpft. Unvollständige Teilsummen werden gekennzeichnet.
|
||||||
|
Die Stromleistung wird auch in Raum- und Stockwerksanzeigen genutzt.
|
||||||
|
|
||||||
|
## Änderungen in 0.2.13
|
||||||
|
|
||||||
|
- Im Raum liegt **Fußbodenheizung** unter **Raumklima**. Dort lassen sich auch
|
||||||
|
**Zuluft-VSR, Abluft-VSR, Zulufttemperatur, Ablufttemperatur, NHR (Nachheizregister)**
|
||||||
|
und ein **Raumstatus** verknüpfen. Die Auswahl richtet sich nach dem nativen
|
||||||
|
Variablentyp, unabhängig vom bisher vermuteten Gerätetyp.
|
||||||
|
- Das Raummenü zeigt die gewählten Werte mit den Symcon-Einheiten und formatierten
|
||||||
|
Anzeigen. Der Alias der Integer-Variable **Raumstatus** ersetzt den berechneten
|
||||||
|
Komfortwert. Beschreibbare Heizungs- und Lüftungsvariablen werden über ihre native
|
||||||
|
Aktion bedient; reine Messwerte bleiben Anzeigen.
|
||||||
|
- Eine oder mehrere klassische **Symcon-Schaltuhren (Wochenplan-Ereignisse)** lassen
|
||||||
|
sich aus dem Objektbaum zuordnen. Das Raummenü zeigt Wochentage, Schaltpunkte und
|
||||||
|
Aktionsnamen sowie den nächsten Schaltpunkt. Aktivieren und Deaktivieren erhält
|
||||||
|
den vollständigen Wochenplan; Aktionsskripte bleiben auf dem Symcon-Server.
|
||||||
|
- Unter **Wettervariablen** werden Wetterzustand, Außentemperatur, Luftfeuchte,
|
||||||
|
Luftdruck, Wind, Böen, Windrichtung, Bewölkung, Niederschlag, Helligkeit, UV,
|
||||||
|
Sichtweite, Schnee, Nebel und Gewitter einzeln verknüpft. Der **Regensensor**
|
||||||
|
akzeptiert Boolean- und numerische Variablen auch bei abweichendem Gerätetyp.
|
||||||
|
Die Quellen steuern die Wetterdarstellung und Regenwarnung. Oben in der 3D-Ansicht
|
||||||
|
öffnet **Wetter** die aktuellen verknüpften Werte mit ihren nativen Einheiten.
|
||||||
|
- **Anwesenheit** verwendet beliebige Boolean-Variablen mit eigenem Personennamen:
|
||||||
|
true = anwesend, false = abwesend. Ein Raum für den 3D-Marker ist optional;
|
||||||
|
der Anwesenheitsstatus wird auch ohne Raum in der oberen Leiste angezeigt.
|
||||||
|
- Durchsagen, Lautsprecherauswahl, Ruhezeiten, Durchsagetexte und Bluetooth-Ortung
|
||||||
|
sind aus der Symcon-Oberfläche entfernt.
|
||||||
|
|
||||||
## Änderungen in 0.2.12
|
## Änderungen in 0.2.12
|
||||||
|
|
||||||
- Der konfigurierte **Name der Visualisierung** erscheint oben links statt „NextFloor“,
|
- Der konfigurierte **Name der Visualisierung** erscheint oben links statt „NextFloor“,
|
||||||
|
|||||||
+3
-3
@@ -6,7 +6,7 @@
|
|||||||
"compatibility": {
|
"compatibility": {
|
||||||
"version": "9.0"
|
"version": "9.0"
|
||||||
},
|
},
|
||||||
"version": "0.2.12",
|
"version": "0.2.15",
|
||||||
"build": 15,
|
"build": 18,
|
||||||
"date": 1794297600
|
"date": 1794384000
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
// Native variables and classic weekly schedule events; no live Symcon system is modified.
|
||||||
|
class IPSModuleStrict {}
|
||||||
|
$objects = [
|
||||||
|
10 => ['ParentID' => 0, 'ObjectName' => 'Gebäude', 'ObjectType' => 0],
|
||||||
|
11 => ['ParentID' => 10, 'ObjectName' => 'Heizung Wochenplan', 'ObjectType' => 4],
|
||||||
|
12 => ['ParentID' => 10, 'ObjectName' => 'Zyklischer Timer', 'ObjectType' => 4],
|
||||||
|
13 => ['ParentID' => 10, 'ObjectName' => 'Verknüpfte Schaltuhr', 'ObjectType' => 6],
|
||||||
|
14 => ['ParentID' => 10, 'ObjectName' => 'Heizung', 'ObjectType' => 2],
|
||||||
|
15 => ['ParentID' => 10, 'ObjectName' => 'Raumstatus', 'ObjectType' => 2],
|
||||||
|
];
|
||||||
|
$events = [11 => ['EventType' => 2, 'EventActive' => true, 'NextRun' => 1794387600, 'NextActionID' => 2,
|
||||||
|
'ScheduleActions' => [['ID' => 1, 'Name' => 'Nacht', 'Color' => 255, 'ScriptText' => 'SECRET_SCRIPT', 'ActionParameters' => ['secret' => true]], ['ID' => 2, 'Name' => 'Tag', 'Color' => 16711680]],
|
||||||
|
'ScheduleGroups' => [['ID' => 0, 'Days' => 31, 'Points' => [['ID' => 0, 'Start' => ['Hour' => 6, 'Minute' => 30, 'Second' => 0], 'ActionID' => 2]]]]], 12 => ['EventType' => 1]];
|
||||||
|
$writes = [];
|
||||||
|
function check(bool $value, string $message): void { if (!$value) throw new RuntimeException($message); }
|
||||||
|
function IPS_GetChildrenIDs(int $id): array { global $objects; return array_keys(array_filter($objects, fn($o) => $o['ParentID'] === $id)); }
|
||||||
|
function IPS_ObjectExists(int $id): bool { global $objects; return isset($objects[$id]); }
|
||||||
|
function IPS_GetObject(int $id): array { global $objects; return [...$objects[$id], 'ObjectPosition' => 0, 'ObjectIsHidden' => false, 'ObjectIcon' => '']; }
|
||||||
|
function IPS_GetName(int $id): string { global $objects; return $objects[$id]['ObjectName']; }
|
||||||
|
function IPS_GetLink(int $id): array { return ['TargetID' => 11]; }
|
||||||
|
function IPS_GetEvent(int $id): array { global $events; return $events[$id]; }
|
||||||
|
function IPS_EventExists(int $id): bool { global $events; return isset($events[$id]); }
|
||||||
|
function IPS_SetEventActive(int $id, bool $active): bool { global $events; $events[$id]['EventActive'] = $active; return true; }
|
||||||
|
function IPS_VariableExists(int $id): bool { return in_array($id, [14, 15]); }
|
||||||
|
function IPS_GetVariable(int $id): array { return ['VariableType' => $id === 14 ? 0 : 1, 'VariableProfile' => '', 'VariableCustomProfile' => '', 'VariableAction' => $id === 14 ? 123 : 0, 'VariableCustomAction' => 0]; }
|
||||||
|
function GetValue(int $id): mixed { return $id === 14 ? false : 2; }
|
||||||
|
function GetValueFormatted(int $id): string { return $id === 14 ? 'Aus' : 'Besprechung'; }
|
||||||
|
function IPS_GetVariablePresentation(int $id): array { return []; }
|
||||||
|
function IPS_VariableProfileExists(string $profile): bool { return false; }
|
||||||
|
function RequestAction(int $id, mixed $value): void { global $writes; $writes[] = [$id, $value]; }
|
||||||
|
function SetValue(int $id, mixed $value): void { throw new LogicException('Native controls must never silently write read-only variables'); }
|
||||||
|
|
||||||
|
require __DIR__ . '/../NextFloor/module.php';
|
||||||
|
$module = new NextFloor();
|
||||||
|
$tree = (new ReflectionMethod($module, 'objectTree'))->invoke($module);
|
||||||
|
$states = array_column($tree['variables'], null, 'entity_id');
|
||||||
|
$nodes = array_column($tree['objects'], null, 'object_id');
|
||||||
|
check($nodes[11]['entity_id'] === 'schedule.11' && $nodes[13]['entity_id'] === 'schedule.11', 'Schedule events and their links are selectable in the original object tree');
|
||||||
|
check(!isset($nodes[12]['entity_id']), 'Ordinary timers must not be offered as weekly schedules');
|
||||||
|
check($states['schedule.11']['attributes']['groups'][0]['days'] === 31 && $states['schedule.11']['attributes']['groups'][0]['points'][0]['minute'] === 30, 'Native day masks and switch times must survive export');
|
||||||
|
check(!str_contains(json_encode($tree), 'SECRET_SCRIPT') && !str_contains(json_encode($tree), 'ActionParameters'), 'Action scripts and parameters must not be exported');
|
||||||
|
check($states[$nodes[14]['entity_id']]['attributes']['symcon_value'] === false, 'Native Boolean false is preserved');
|
||||||
|
check($states[$nodes[15]['entity_id']]['attributes']['symcon_formatted'] === 'Besprechung', 'Integer status retains its Symcon alias');
|
||||||
|
$action = new ReflectionMethod($module, 'variableAction');
|
||||||
|
$before = $events[11]['ScheduleGroups'];
|
||||||
|
$action->invoke($module, 'schedule', 'set_active', ['entity_id' => 'schedule.11', 'active' => false]);
|
||||||
|
check($events[11]['EventActive'] === false && $events[11]['ScheduleGroups'] === $before, 'Disabling a linked clock must retain every switch point');
|
||||||
|
$action->invoke($module, 'symcon', 'set_value', ['entity_id' => 'switch.14', 'value' => true]);
|
||||||
|
check($writes === [[14, true]], 'Writable native Boolean uses RequestAction');
|
||||||
|
foreach ([['schedule', 'set_active', ['entity_id' => 'schedule.12', 'active' => true]], ['symcon', 'set_value', ['entity_id' => 'sensor.15', 'value' => 3]], ['symcon', 'set_value', ['entity_id' => 'switch.14', 'value' => 'false']]] as $call) {
|
||||||
|
try { $action->invoke($module, ...$call); throw new LogicException('Invalid native action accepted'); }
|
||||||
|
catch (InvalidArgumentException) {}
|
||||||
|
}
|
||||||
|
echo "OK: selectable native schedules, protected action data, aliases, raw Boolean controls and read-only guards\n";
|
||||||
@@ -25,7 +25,7 @@ $objects = [
|
|||||||
function IPS_GetChildrenIDs(int $id): array { global $objects; return array_keys(array_filter($objects, static fn(array $object): bool => $object['ParentID'] === $id)); }
|
function IPS_GetChildrenIDs(int $id): array { global $objects; return array_keys(array_filter($objects, static fn(array $object): bool => $object['ParentID'] === $id)); }
|
||||||
function IPS_ObjectExists(int $id): bool { global $objects; return isset($objects[$id]); }
|
function IPS_ObjectExists(int $id): bool { global $objects; return isset($objects[$id]); }
|
||||||
function IPS_GetObject(int $id): array { global $objects; return [...$objects[$id], 'ObjectIsHidden' => in_array($id, [10, 12], true), 'ObjectIcon' => 'Temperature']; }
|
function IPS_GetObject(int $id): array { global $objects; return [...$objects[$id], 'ObjectIsHidden' => in_array($id, [10, 12], true), 'ObjectIcon' => 'Temperature']; }
|
||||||
function IPS_GetInstance(int $id): array { return ['ModuleInfo' => ['ModuleType' => [18 => 1, 20 => 0, 21 => 2, 22 => 4, 23 => 5, 24 => 6][$id] ?? 3]]; }
|
function IPS_GetInstance(int $id): array { return ['ModuleInfo' => ['ModuleType' => [18 => 1, 20 => 0, 21 => 2, 22 => 4, 23 => 5, 24 => 6][$id] ?? 3, 'ModuleID' => $id === 11 ? '{485D0419-BE97-4548-AA9C-C083EB82E61E}' : '{OTHER}']]; }
|
||||||
function IPS_GetName(int $id): string { global $objects; return $objects[$id]['ObjectName']; }
|
function IPS_GetName(int $id): string { global $objects; return $objects[$id]['ObjectName']; }
|
||||||
function IPS_GetLink(int $id): array { return ['TargetID' => 12]; }
|
function IPS_GetLink(int $id): array { return ['TargetID' => 12]; }
|
||||||
function IPS_GetVariable(int $id): array { return ['VariableType' => 2, 'VariableProfile' => '', 'VariableCustomProfile' => '', 'VariableCustomAction' => 0, 'VariableAction' => 0]; }
|
function IPS_GetVariable(int $id): array { return ['VariableType' => 2, 'VariableProfile' => '', 'VariableCustomProfile' => '', 'VariableCustomAction' => 0, 'VariableAction' => 0]; }
|
||||||
@@ -48,4 +48,5 @@ check(!isset($nodes[16]['entity_id']), 'Scripts are visible but are not variable
|
|||||||
check($nodes[10]['hidden'] === true && $nodes[11]['parent_id'] === 10, 'Hidden categories and all their children must be exported');
|
check($nodes[10]['hidden'] === true && $nodes[11]['parent_id'] === 10, 'Hidden categories and all their children must be exported');
|
||||||
check(array_column(array_intersect_key($nodes, array_flip([18, 20, 21, 22, 23, 24])), 'module_type') === [1, 0, 2, 4, 5, 6], 'Export real module types for logical system grouping');
|
check(array_column(array_intersect_key($nodes, array_flip([18, 20, 21, 22, 23, 24])), 'module_type') === [1, 0, 2, 4, 5, 6], 'Export real module types for logical system grouping');
|
||||||
check($nodes[11]['module_type'] === 3 && $nodes[19]['parent_id'] === 18, 'Keep devices and system-variable parents unchanged in native export');
|
check($nodes[11]['module_type'] === 3 && $nodes[19]['parent_id'] === 18, 'Keep devices and system-variable parents unchanged in native export');
|
||||||
|
check($nodes[11]['module_id'] === '{485D0419-BE97-4548-AA9C-C083EB82E61E}', 'Export the real module ID so dummy utility containers can be recognized');
|
||||||
echo "OK: full native object hierarchy, positions, hidden nodes and variable links\n";
|
echo "OK: full native object hierarchy, positions, hidden nodes and variable links\n";
|
||||||
Reference in new issue
Block a user