"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["82699"],{28326:function(e,t,a){a.a(e,async function(e,n){try{a.r(t),a.d(t,{HuiSensorCardEditor:function(){return q}});var i,o=a(72153),r=a(44734),l=a(43080),s=a(69683),c=a(6454),u=(a(28706),a(62062),a(69085),a(26099),a(40445)),h=a(96196),m=a(77845),d=a(22786),p=a(63533),f=a(1087),g=(a(52763),a(203)),_=a(84698),v=a(44155),b=a(7382),y=e([g]);g=(y.then?(await y)():y)[0];var k=(0,p.kp)(_.H,(0,p.Ik)({entity:(0,p.lq)((0,p.Yj)()),name:(0,p.lq)(v.q),icon:(0,p.lq)((0,p.Yj)()),graph:(0,p.lq)((0,p.KC)([(0,p.eu)("line"),(0,p.eu)("none")])),unit:(0,p.lq)((0,p.Yj)()),detail:(0,p.lq)((0,p.ai)()),theme:(0,p.lq)((0,p.Yj)()),hours_to_show:(0,p.lq)((0,p.ai)()),limits:(0,p.lq)((0,p.Ik)({min:(0,p.lq)((0,p.ai)()),max:(0,p.lq)((0,p.ai)())}))})),q=function(e){function t(){var e;(0,r.A)(this,t);for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return(e=(0,s.A)(this,t,[].concat(n)))._schema=(0,d.A)(function(e){return[{name:"entity",selector:{entity:{domain:["counter","input_number","number","sensor"]}}},{name:"name",selector:{entity_name:{}},context:{entity:"entity"}},{type:"grid",name:"",schema:[{name:"icon",selector:{icon:{}},context:{icon_entity:"entity"}},{name:"graph",selector:{select:{options:["none","line"].map(function(t){return{value:t,label:e("ui.panel.lovelace.editor.card.sensor.graph_options.".concat(t))}})}}},{name:"unit",selector:{text:{}}},{name:"detail",selector:{boolean:{}}},{name:"theme",selector:{theme:{}}},{name:"hours_to_show",default:g.S,selector:{number:{min:1,mode:"box"}}}]},{type:"grid",name:"limits",schema:[{name:"min",selector:{number:{mode:"box"}}},{name:"max",selector:{number:{mode:"box"}}}]}]}),e._computeLabelCallback=function(t){switch(t.name){case"theme":return"".concat(e.hass.localize("ui.panel.lovelace.editor.card.generic.theme")," (").concat(e.hass.localize("ui.panel.lovelace.editor.card.config.optional"),")");case"detail":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.show_more_detail");case"graph":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.graph_type");case"min":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.limit_min");case"max":return e.hass.localize("ui.panel.lovelace.editor.card.sensor.limit_max");default:return e.hass.localize("ui.panel.lovelace.editor.card.generic.".concat(t.name))}},e}return(0,c.A)(t,e),(0,l.A)(t,[{key:"setConfig",value:function(e){(0,p.vA)(e,k),this._config=e}},{key:"render",value:function(){if(!this.hass||!this._config)return h.s6;var e=Object.assign(Object.assign({graph:"none"},this._config),{},{detail:2===this._config.detail});return(0,h.qy)(i||(i=(0,o.A)([' <ha-form .hass="','" .data="','" .schema="','" .computeLabel="','" @value-changed="','"></ha-form> '])),this.hass,e,this._schema(this.hass.localize),this._computeLabelCallback,this._valueChanged)}},{key:"_valueChanged",value:function(e){var t=e.detail.value;t.detail=t.detail?2:1,(0,f.r)(this,"config-changed",{config:t})}}],[{key:"styles",get:function(){return b.U}}])}(h.WF);(0,u.Cg)([(0,m.MZ)({attribute:!1})],q.prototype,"hass",void 0),(0,u.Cg)([(0,m.wk)()],q.prototype,"_config",void 0),q=(0,u.Cg)([(0,m.EM)("hui-sensor-card-editor")],q),n()}catch(z){n(z)}})},84698:function(e,t,a){a.d(t,{H:function(){return i}});var n=a(63533),i=(0,n.Ik)({type:(0,n.Yj)(),view_layout:(0,n.bz)(),layout_options:(0,n.bz)(),grid_options:(0,n.bz)(),visibility:(0,n.bz)(),disabled:(0,n.lq)((0,n.zM)())})}}]);
//# sourceMappingURL=82699.1887b6c8b526b340.js.map