export const __rspack_esm_id="56995";export const __rspack_esm_ids=["56995"];export const __webpack_modules__={68971(t,s,e){var i=e(62826),a=e(96196),r=e(97735),h=(e(38279),e(22675));class u extends a.WF{render(){const t=this._computeCurrentStatus();return a.qy`<div class="target"> ${(0,h.g0)(this.stateObj.state)?this._localizeState():a.qy`<span class="state-label"> ${this._localizeState()} ${this.stateObj.attributes.preset_mode&&"none"!==this.stateObj.attributes.preset_mode?a.qy`- ${this.hass.formatEntityAttributeValue(this.stateObj,"preset_mode")}`:a.s6} </span> <div class="unit">${this._computeTarget()}</div>`} </div> ${t&&!(0,h.g0)(this.stateObj.state)?a.qy` <div class="current"> ${this.hass.localize("ui.card.climate.currently")}: <div class="unit">${t}</div> </div> `:a.s6}`}_computeCurrentStatus(){if(this.hass&&this.stateObj)return null!=this.stateObj.attributes.current_temperature&&null!=this.stateObj.attributes.current_humidity?`${this.hass.formatEntityAttributeValue(this.stateObj,"current_temperature")}/\n      ${this.hass.formatEntityAttributeValue(this.stateObj,"current_humidity")}`:null!=this.stateObj.attributes.current_temperature?this.hass.formatEntityAttributeValue(this.stateObj,"current_temperature"):null!=this.stateObj.attributes.current_humidity?this.hass.formatEntityAttributeValue(this.stateObj,"current_humidity"):void 0}_computeTarget(){return this.hass&&this.stateObj?null!=this.stateObj.attributes.target_temp_low&&null!=this.stateObj.attributes.target_temp_high?`${this.hass.formatEntityAttributeValue(this.stateObj,"target_temp_low")}-${this.hass.formatEntityAttributeValue(this.stateObj,"target_temp_high")}`:null!=this.stateObj.attributes.temperature?this.hass.formatEntityAttributeValue(this.stateObj,"temperature"):null!=this.stateObj.attributes.target_humidity_low&&null!=this.stateObj.attributes.target_humidity_high?`${this.hass.formatEntityAttributeValue(this.stateObj,"target_humidity_low")}-${this.hass.formatEntityAttributeValue(this.stateObj,"target_humidity_high")}`:null!=this.stateObj.attributes.humidity?this.hass.formatEntityAttributeValue(this.stateObj,"humidity"):"":""}_localizeState(){if((0,h.g0)(this.stateObj.state))return this.hass.localize(`state.default.${this.stateObj.state}`);const t=this.hass.formatEntityState(this.stateObj);if(this.stateObj.attributes.hvac_action&&this.stateObj.state!==h.KF){return`${this.hass.formatEntityAttributeValue(this.stateObj,"hvac_action")} (${t})`}return t}}u.styles=a.AH`:host{display:flex;flex-direction:column;justify-content:center;white-space:nowrap}.target{color:var(--primary-text-color)}.current{color:var(--secondary-text-color);direction:var(--direction)}.state-label{font-weight:var(--ha-font-weight-bold)}.unit{display:inline-block;direction:ltr}`,(0,i.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,i.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"stateObj",void 0),u=(0,i.Cg)([(0,r.EM)("ha-climate-state")],u)},2798(t,s,e){e.a(t,async function(t,i){try{e.r(s);var a=e(62826),r=e(96196),h=e(97735),u=(e(68971),e(784)),n=e(79757),o=e(85979),l=t([n,o]);[n,o]=l.then?(await l)():l;class c extends r.WF{setConfig(t){if(!t||!t.entity)throw new Error("Entity must be specified");this._config=t}shouldUpdate(t){return(0,u.LX)(this,t)}render(){if(!this.hass||!this._config)return r.s6;const t=this.hass.states[this._config.entity];return t?r.qy` <hui-generic-entity-row .hass="${this.hass}" .config="${this._config}"> <ha-climate-state .hass="${this.hass}" .stateObj="${t}"> </ha-climate-state> </hui-generic-entity-row> `:r.qy` <hui-warning .hass="${this.hass}"> ${(0,o.j)(this.hass,this._config.entity)} </hui-warning> `}}c.styles=r.AH`ha-climate-state{text-align:right}`,(0,a.Cg)([(0,h.MZ)({attribute:!1})],c.prototype,"hass",void 0),(0,a.Cg)([(0,h.wk)()],c.prototype,"_config",void 0),c=(0,a.Cg)([(0,h.EM)("hui-climate-entity-row")],c),i()}catch(t){i(t)}})}};
//# sourceMappingURL=56995.b0a3eac99311fa01.js.map