UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

1 lines 6.46 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[86538],{58548:function(t,e,n){n.d(e,{A:function(){return i}});n(16280),n(27495),n(25440);const r=t=>{const e=parseFloat(t);if(isNaN(e))throw new Error(`${t} is not a number`);return e};function i(t){if(!t)return null;try{if(t.endsWith("%"))return{w:100,h:r(t.slice(0,-1))};const e=t.replace(":","x").split("x");return 0===e.length?null:1===e.length?{w:r(e[0]),h:1}:{w:r(e[0]),h:r(e[1])}}catch(e){}return null}},89300:function(t,e,n){n.a(t,async function(t,e){try{n(62953);var r=n(40445),i=n(5124),s=n(67576),o=n(6412),a=n(18350),c=n(65829),h=(n(67094),t([a,c]));[a,c]=h.then?(await h)():h;let l,u,d,p,b,g,f=t=>t;const m="M2.2,16.06L3.88,12L2.2,7.94L6.26,6.26L7.94,2.2L12,3.88L16.06,2.2L17.74,6.26L21.8,7.94L20.12,12L21.8,16.06L17.74,17.74L16.06,21.8L12,20.12L7.94,21.8L6.26,17.74L2.2,16.06M13,17V15H11V17H13M13,13V7H11V13H13Z",v="M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z";class y extends i.WF{render(){const t=this.progress||this._result?"accent":this.appearance;return(0,i.qy)(l||(l=f` <ha-button .appearance="${0}" .disabled="${0}" .loading="${0}" .variant="${0}" class="${0}"> ${0} <slot>${0}</slot> </ha-button> ${0} `),t,this.disabled,this.progress,"success"===this._result?"success":"error"===this._result?"danger":this.variant,(0,o.H)({result:!!this._result,success:"success"===this._result,error:"error"===this._result}),this.iconPath?(0,i.qy)(u||(u=f`<ha-svg-icon .path="${0}" slot="start"></ha-svg-icon>`),this.iconPath):i.s6,this.label,this._result?(0,i.qy)(d||(d=f` <div class="progress"> ${0} </div> `),"success"===this._result?(0,i.qy)(p||(p=f`<ha-svg-icon .path="${0}"></ha-svg-icon>`),v):"error"===this._result?(0,i.qy)(b||(b=f`<ha-svg-icon .path="${0}"></ha-svg-icon>`),m):i.s6):i.s6)}actionSuccess(){this._setResult("success")}actionError(){this._setResult("error")}_setResult(t){this._result=t,setTimeout(()=>{this._result=void 0},2e3)}constructor(...t){super(...t),this.disabled=!1,this.progress=!1,this.appearance="accent",this.variant="brand"}}y.styles=(0,i.AH)(g||(g=f`:host{outline:0;display:inline-block;position:relative}:host([progress]){pointer-events:none}.progress{bottom:0;display:flex;justify-content:center;align-items:center;position:absolute;top:0;width:100%}ha-button{width:100%}ha-button.result::part(caret),ha-button.result::part(end),ha-button.result::part(label),ha-button.result::part(spinner),ha-button.result::part(start){visibility:hidden}:host([appearance=brand]) ha-svg-icon{color:var(--white-color)}`)),(0,r.Cg)([(0,s.MZ)()],y.prototype,"label",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean})],y.prototype,"disabled",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],y.prototype,"progress",void 0),(0,r.Cg)([(0,s.MZ)()],y.prototype,"appearance",void 0),(0,r.Cg)([(0,s.MZ)({attribute:!1})],y.prototype,"iconPath",void 0),(0,r.Cg)([(0,s.MZ)()],y.prototype,"variant",void 0),(0,r.Cg)([(0,s.wk)()],y.prototype,"_result",void 0),y=(0,r.Cg)([(0,s.EM)("ha-progress-button")],y),e()}catch(l){e(l)}})},2928:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{S5:function(){return l},bG:function(){return c},mE:function(){return h}});n(74423),n(3362),n(62953);var i=n(69093),s=n(24673),o=t([s]);s=(o.then?(await o)():o)[0];const a={alarm_control_panel:()=>n.e(67039).then(n.bind(n,8866)),automation:()=>n.e(59454).then(n.bind(n,68845)),camera:()=>n.e(65742).then(n.bind(n,16349)),climate:()=>n.e(99928).then(n.bind(n,14667)),configurator:()=>n.e(74124).then(n.bind(n,34439)),conversation:()=>Promise.all([n.e(28845),n.e(70876)]).then(n.bind(n,32421)),counter:()=>n.e(60069).then(n.bind(n,40932)),cover:()=>Promise.all([n.e(24484),n.e(63608)]).then(n.bind(n,21771)),date:()=>n.e(85659).then(n.bind(n,54358)),datetime:()=>Promise.all([n.e(99194),n.e(24617),n.e(38124)]).then(n.bind(n,58919)),fan:()=>n.e(790).then(n.bind(n,18133)),group:()=>Promise.all([n.e(73065),n.e(68616)]).then(n.bind(n,72315)),humidifier:()=>n.e(92523).then(n.bind(n,75417)),image:()=>n.e(75226).then(n.bind(n,77249)),input_boolean:()=>n.e(64656).then(n.bind(n,62387)),input_datetime:()=>n.e(76203).then(n.bind(n,15366)),lawn_mower:()=>n.e(2302).then(n.bind(n,69389)),light:()=>Promise.all([n.e(24484),n.e(63373)]).then(n.bind(n,9884)),lock:()=>n.e(17910).then(n.bind(n,54101)),media_player:()=>n.e(68507).then(n.bind(n,70294)),person:()=>Promise.all([n.e(66139),n.e(70622),n.e(12122),n.e(76420)]).then(n.bind(n,68047)),remote:()=>n.e(38545).then(n.bind(n,36872)),script:()=>n.e(75598).then(n.bind(n,46557)),siren:()=>n.e(92950).then(n.bind(n,27029)),sun:()=>n.e(39791).then(n.bind(n,4178)),switch:()=>n.e(14239).then(n.bind(n,31618)),time:()=>Promise.all([n.e(21209),n.e(37288)]).then(n.bind(n,80731)),timer:()=>n.e(2202).then(n.bind(n,97889)),update:()=>Promise.all([n.e(79996),n.e(98672)]).then(n.bind(n,1843)),vacuum:()=>n.e(51122).then(n.bind(n,11113)),valve:()=>Promise.all([n.e(24484),n.e(95351)]).then(n.bind(n,5610)),water_heater:()=>n.e(55684).then(n.bind(n,1199)),weather:()=>Promise.all([n.e(66432),n.e(67237)]).then(n.bind(n,84932))},c=t=>{const e=(0,i.t)(t);return h(e)},h=t=>s.gs.includes(t)?t:s.oF.includes(t)?"hidden":"default",l=t=>{t in a&&a[t]()};r()}catch(a){r(a)}})},84043:function(t,e,n){n.a(t,async function(t,r){try{n.d(e,{d:function(){return p}});n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(62953);var i=n(98743),s=(n(16732),n(9578)),o=n(51007),a=n(37696),c=n(10792),h=n(14097),l=n(34128),u=t([i,s,o,a,c,h]);[i,s,o,a,c,h]=u.then?(await u)():u;const d=new Set(["conditional","icon","image","service-button","state-badge","state-icon","state-label"]),p=t=>("action-button"===t.type&&(t=Object.assign(Object.assign({},t),{},{type:"service-button"})),(0,l.Ue)("element",t,d));r()}catch(d){r(d)}})},33963:function(t,e,n){n.a(t,async function(t,r){try{n.r(e),n.d(e,{createBadgeElement:function(){return a.YH},createCardElement:function(){return c.te},createHeaderFooterElement:function(){return h.x},createHuiElement:function(){return l.d},createRowElement:function(){return u.T},importMoreInfoControl:function(){return o.S5},showAlertDialog:function(){return s.showAlertDialog},showConfirmationDialog:function(){return s.dk},showEnterCodeDialog:function(){return i.H},showPromptDialog:function(){return s.an}});var i=n(48927),s=n(65063),o=n(2928),a=n(21018),c=n(8349),h=n(83938),l=n(84043),u=n(94225),d=t([o,a,c,l,u]);[o,a,c,l,u]=d.then?(await d)():d,r()}catch(p){r(p)}})}}]);