UNPKG

iobroker.lovelace

Version:

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

1 lines 1.57 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[87363],{12974:function(e,t,a){a.a(e,async function(e,s){try{a.r(t),a.d(t,{HuiMediaPlayerVolumeSliderCardFeatureEditor:function(){return f}});a(62953);var i=a(40445),o=a(5124),n=a(67576),r=a(22786),h=a(1087),l=a(52763),u=a(82286),c=a(53072),d=e([l]);l=(d.then?(await d)():d)[0];let _,m=e=>e;class f extends o.WF{setConfig(e){this._config=e}render(){var e,t;if(!this.hass||!this._config)return o.s6;const a=null!==(e=this.context)&&void 0!==e&&e.entity_id?this.hass.states[this.context.entity_id]:void 0,s=!!a&&(0,u.$)(a,c.vj.VOLUME_MUTE),i={type:"media-player-volume-slider",show_mute_button:null===(t=this._config.show_mute_button)||void 0===t||t},n=this._schema(s);return(0,o.qy)(_||(_=m` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this.hass,i,n,this._computeLabelCallback,this._valueChanged)}_valueChanged(e){(0,h.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,r.A)(e=>[{name:"show_mute_button",disabled:!e,selector:{boolean:{}}}]),this._computeLabelCallback=e=>this.hass.localize(`ui.panel.lovelace.editor.features.types.media-player-volume-slider.${e.name}`)}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"context",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_config",void 0),f=(0,i.Cg)([(0,n.EM)("hui-media-player-volume-slider-card-feature-editor")],f),s()}catch(_){s(_)}})}}]);