"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["378"],{24486:function(t,i,s){var e,a,n,r,h,u=s(72153),o=s(44734),c=s(43080),l=s(69683),f=s(6454),y=(s(28706),s(40445)),d=s(96196),b=s(77845),v=s(22675),g=function(t){function i(){return(0,o.A)(this,i),(0,l.A)(this,i,arguments)}return(0,f.A)(i,t),(0,c.A)(i,[{key:"render",value:function(){var t=this._computeCurrentStatus();return(0,d.qy)(e||(e=(0,u.A)(['<div class="target"> '," </div> ",""])),(0,v.g0)(this.stateObj.state)?this._localizeState():(0,d.qy)(a||(a=(0,u.A)(['<span class="state-label"> '," ",' </span> <div class="unit">',"</div>"])),this._localizeState(),this.stateObj.attributes.mode?(0,d.qy)(n||(n=(0,u.A)(["- ",""])),this.hass.formatEntityAttributeValue(this.stateObj,"mode")):"",this._computeTarget()),t&&!(0,v.g0)(this.stateObj.state)?(0,d.qy)(r||(r=(0,u.A)(['<div class="current"> ',': <div class="unit">',"</div> </div>"])),this.hass.localize("ui.card.climate.currently"),t):"")}},{key:"_computeCurrentStatus",value:function(){if(this.hass&&this.stateObj)return null!=this.stateObj.attributes.current_humidity?"".concat(this.hass.formatEntityAttributeValue(this.stateObj,"current_humidity")):void 0}},{key:"_computeTarget",value:function(){return this.hass&&this.stateObj&&null!=this.stateObj.attributes.humidity?"".concat(this.hass.formatEntityAttributeValue(this.stateObj,"humidity")):""}},{key:"_localizeState",value:function(){if((0,v.g0)(this.stateObj.state))return this.hass.localize("state.default.".concat(this.stateObj.state));var t=this.hass.formatEntityState(this.stateObj);if(this.stateObj.attributes.action&&this.stateObj.state!==v.KF){var i=this.hass.formatEntityAttributeValue(this.stateObj,"action");return"".concat(i," (").concat(t,")")}return t}}])}(d.WF);g.styles=(0,d.AH)(h||(h=(0,u.A)([":host{display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.target{color:var(--primary-text-color)}.current{color:var(--secondary-text-color)}.state-label{font-weight:var(--ha-font-weight-bold)}.unit{display:inline-block;direction:ltr}"]))),(0,y.Cg)([(0,b.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,y.Cg)([(0,b.MZ)({attribute:!1})],g.prototype,"stateObj",void 0),g=(0,y.Cg)([(0,b.EM)("ha-humidifier-state")],g)},53537:function(t,i,s){s.a(t,async function(t,e){try{s.r(i);var a,n,r,h=s(72153),u=s(44734),o=s(43080),c=s(69683),l=s(6454),f=(s(16280),s(40445)),y=s(96196),d=s(77845),b=(s(25240),s(24486),s(784)),v=s(79757),g=s(85979),m=t([v]);v=(m.then?(await m)():m)[0];var p=function(t){function i(){return(0,u.A)(this,i),(0,c.A)(this,i,arguments)}return(0,l.A)(i,t),(0,o.A)(i,[{key:"setConfig",value:function(t){if(!t||!t.entity)throw new Error("Entity must be specified");this._config=t}},{key:"shouldUpdate",value:function(t){return(0,b.LX)(this,t)}},{key:"render",value:function(){if(!this.hass||!this._config)return y.s6;var t=this.hass.states[this._config.entity];return t?(0,y.qy)(n||(n=(0,h.A)([' <hui-generic-entity-row .hass="','" .config="','"> <ha-humidifier-state .hass="','" .stateObj="','"> </ha-humidifier-state> </hui-generic-entity-row> '])),this.hass,this._config,this.hass,t):(0,y.qy)(a||(a=(0,h.A)([' <hui-warning .hass="','"> '," </hui-warning> "])),this.hass,(0,g.j)(this.hass,this._config.entity))}}])}(y.WF);p.styles=(0,y.AH)(r||(r=(0,h.A)(["ha-humidifier-state{text-align:right}"]))),(0,f.Cg)([(0,d.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,f.Cg)([(0,d.wk)()],p.prototype,"_config",void 0),p=(0,f.Cg)([(0,d.EM)("hui-humidifier-entity-row")],p),e()}catch(A){e(A)}})}}]);
//# sourceMappingURL=378.bb3ad3bc0ce30c95.js.map