UNPKG

iobroker.lovelace

Version:

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

1 lines 2.52 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[27431],{56474:function(t,e,a){a.a(t,async function(t,n){try{a.r(e),a.d(e,{HuiStateLabelElementEditor:function(){return b}});a(62953);var i=a(40445),o=a(5124),l=a(67576),s=a(63533),c=a(1087),r=a(52763),u=a(999),h=a(91408),f=t([r,u]);[r,u]=f.then?(await f)():f;let m,_=t=>t;const d="M10,9A1,1 0 0,1 11,8A1,1 0 0,1 12,9V13.47L13.21,13.6L18.15,15.79C18.68,16.03 19,16.56 19,17.14V21.5C18.97,22.32 18.32,22.97 17.5,23H11C10.62,23 10.26,22.85 10,22.57L5.1,18.37L5.84,17.6C6.03,17.39 6.3,17.28 6.58,17.28H6.8L10,19V9M11,5A4,4 0 0,1 15,9C15,10.5 14.2,11.77 13,12.46V11.24C13.61,10.69 14,9.89 14,9A3,3 0 0,0 11,6A3,3 0 0,0 8,9C8,9.89 8.39,10.69 9,11.24V12.46C7.8,11.77 7,10.5 7,9A4,4 0 0,1 11,5Z",p=(0,s.Ik)({type:(0,s.eu)("state-label"),entity:(0,s.lq)((0,s.Yj)()),attribute:(0,s.lq)((0,s.Yj)()),prefix:(0,s.lq)((0,s.Yj)()),suffix:(0,s.lq)((0,s.Yj)()),style:(0,s.lq)((0,s.bz)()),title:(0,s.lq)((0,s.Yj)()),tap_action:(0,s.lq)(h.kn),hold_action:(0,s.lq)(h.kn),double_tap_action:(0,s.lq)(h.kn)}),C=[{name:"entity",required:!0,selector:{entity:{}}},{name:"attribute",selector:{attribute:{}},context:{filter_entity:"entity"}},{name:"prefix",selector:{text:{}}},{name:"suffix",selector:{text:{}}},{name:"title",selector:{text:{}}},{name:"interactions",type:"expandable",flatten:!0,iconPath:d,schema:[{name:"tap_action",selector:{ui_action:{default_action:"more-info"}},context:u.Tq},{name:"hold_action",selector:{ui_action:{default_action:"more-info"}},context:u.Tq},{name:"",type:"optional_actions",flatten:!0,schema:[{name:"double_tap_action",selector:{ui_action:{default_action:"none"}},context:u.Tq}]}]},{name:"style",selector:{object:{}}}];class b extends o.WF{setConfig(t){(0,s.vA)(t,p),this._config=t}render(){return this.hass&&this._config?(0,o.qy)(m||(m=_` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this.hass,this._config,C,this._computeLabelCallback,this._valueChanged):o.s6}_valueChanged(t){(0,c.r)(this,"config-changed",{config:t.detail.value})}constructor(...t){super(...t),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.lovelace.editor.card.generic.${t.name}`)||this.hass.localize(`ui.panel.lovelace.editor.elements.${t.name}`)||t.name}}(0,i.Cg)([(0,l.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,i.Cg)([(0,l.wk)()],b.prototype,"_config",void 0),b=(0,i.Cg)([(0,l.EM)("hui-state-label-element-editor")],b),n()}catch(m){n(m)}})}}]);