iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 2.67 kB
JavaScript
export const __webpack_ids__=["81407"];export const __webpack_modules__={12173:function(t,e,s){s.d(e,{b:()=>i});const i=s(57243).iv`:host{display:flex;flex-direction:column;flex:1;justify-content:space-between}.controls{display:flex;flex-direction:column;align-items:center}.controls:not(:last-child){margin-bottom:24px}.controls>:not(:last-child){margin-bottom:24px}.buttons{display:flex;align-items:center;justify-content:center;margin-bottom:12px}.buttons>*{margin:8px}ha-attributes{display:block;width:100%}ha-more-info-control-select-container+ha-attributes:not([empty]){margin-top:16px}`},96771:function(t,e,s){s.a(t,(async function(t,i){try{s.r(e);var a=s(44249),n=(s(9359),s(56475),s(1331),s(70104),s(57243)),o=s(15093),r=s(29567),d=s(3582),c=s(11057),h=s(12173),l=s(88991),u=t([c,l]);[c,l]=u.then?(await u)():u;let b=(0,a.Z)(null,(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"stateObj",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_groupDomainStateObj",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_moreInfoType",value:void 0},{kind:"method",key:"updated",value:function(t){if(!this.hass||!this.stateObj||!t.has("hass")&&!t.has("stateObj"))return;const e=this.stateObj.attributes.entity_id.map((t=>this.hass.states[t])).filter((t=>t));if(!e.length)return this._groupDomainStateObj=void 0,void(this._moreInfoType=void 0);const s=e.find((t=>t.state===this.stateObj.state))||e[0],i=(0,d.W)(this.stateObj);if(i&&"group"!==i){this._groupDomainStateObj={...s,entity_id:this.stateObj.entity_id,last_updated:this.stateObj.last_updated,last_changed:this.stateObj.last_changed,attributes:{...s.attributes,friendly_name:this.stateObj.attributes.friendly_name,entity_id:this.stateObj.attributes.entity_id}};const t=(0,l.n3)(i);(0,l.ST)(t),this._moreInfoType="hidden"===t?void 0:`more-info-${t}`}else this._groupDomainStateObj=void 0,this._moreInfoType=void 0}},{kind:"method",key:"render",value:function(){return this.hass&&this.stateObj?n.dy`${this._moreInfoType?(0,r.h)(this._moreInfoType,{hass:this.hass,stateObj:this._groupDomainStateObj}):""} ${this.stateObj.attributes.entity_id.map((t=>{const e=this.hass.states[t];return e?n.dy` <state-card-content .stateObj="${e}" .hass="${this.hass}"></state-card-content> `:""}))}`:n.Ld}},{kind:"get",static:!0,key:"styles",value:function(){return[h.b,n.iv`state-card-content{display:block;margin-top:8px}`]}}]}}),n.oi);customElements.define("more-info-group",b),i()}catch(t){i(t)}}))}};
//# sourceMappingURL=81407.e40e781d23cd56fd.js.map