diff --git a/info.md b/info.md index a901004..33ddf83 100644 --- a/info.md +++ b/info.md @@ -2,6 +2,10 @@ ### Features +{% if version_installed.replace("v", "").replace(".","") | int < 133 %} +- Fixed `Fix bug show_icon is ignored` +{% endif %} + {% if version_installed.replace("v", "").replace(".","") | int < 132 %} - Fixed `Bug when show_state is set to false and no icon is set` {% endif %} diff --git a/package-lock.json b/package-lock.json index 6c5da9d..6d18a2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "room-card", - "version": "1.3.2", + "version": "1.3.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8462b2e..2f372ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "room-card", - "version": "1.3.2", + "version": "1.3.3", "description": "Show entities in Home Assistant's Lovelace UI", "keywords": [ "home-assistant", diff --git a/room-card.js b/room-card.js index 120a792..3f4d2a1 100644 --- a/room-card.js +++ b/room-card.js @@ -27,7 +27,7 @@ @click="${a}" @dblclick="${s}"> ${0===(null===(o=i.entities)||void 0===o?void 0:o.length)||i.icon?(0,e.renderIcon)(t.stateObj,i,n,"main-icon"):void 0!==t.show_state&&!1===t.show_state?"":(0,e.renderValue)(t,n)} - `},e.renderTitle=(t,i,n,r)=>!0===i.hide_title?"":l.html`
${(0,e.renderMainEntity)(t,i,n,r)} ${i.title}
`,e.renderInfoEntity=(t,i,n)=>{if(void 0===t||!t.stateObj||(0,a.hideIf)(t,i))return null;const r=(0,e.clickHandler)(t.stateObj.entity_id,t.tap_action,i,n);return l.html`
${(0,e.renderValue)(t,i)}
`},e.clickHandler=(t,e,i,n)=>()=>(0,s.handleClick)(n,i,{entity:t,tap_action:e},!1,!1),e.dblClickHandler=(t,e,i,n)=>()=>(0,s.handleClick)(n,i,{entity:t,double_tap_action:e},!1,!0),e.holdHandler=(t,e,i,n)=>()=>(0,s.handleClick)(n,i,{entity:t,hold_action:e},!0,!1)},607:function(t,e,i){var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};Object.defineProperty(e,"__esModule",{value:!0});const r=i(897),o=i(595),a=i(461),s=i(882),l=i(299);console.info("%c ROOM-CARD %c 1.3.2","color: cyan; background: black; font-weight: bold;","color: darkblue; background: white; font-weight: bold;");let u=class extends r.LitElement{constructor(){super(...arguments),this.info_entities=[],this.entities=[],this.rows=[],this._refCards=[]}setConfig(t){(0,a.checkConfig)(t),this.config=Object.assign(Object.assign({},t),{name:!1===t.name?" ":t.name,entityIds:(0,s.getEntityIds)(t)})}shouldUpdate(t){return(0,s.hasConfigOrEntitiesChanged)(this.config,t)}set hass(t){var e,i,n,r,o,a,l;this._hass=t,t&&this.config&&(this.config.entity&&(this.stateObj=t.states[this.config.entity],this.entity=Object.assign(Object.assign({},this.config),{stateObj:this.stateObj})),this.info_entities=null!==(i=null===(e=this.config.info_entities)||void 0===e?void 0:e.map((e=>(0,s.mapStateObject)(e,t))))&&void 0!==i?i:[],this.entities=null!==(r=null===(n=this.config.entities)||void 0===n?void 0:n.map((e=>(0,s.mapStateObject)(e,t))))&&void 0!==r?r:[],this.rows=null!==(a=null===(o=this.config.rows)||void 0===o?void 0:o.map((e=>{var i;return{entities:null===(i=e.entities)||void 0===i?void 0:i.map((e=>(0,s.mapStateObject)(e,t)))}})))&&void 0!==a?a:[],this._refCards=null===(l=this.config.cards)||void 0===l?void 0:l.map((e=>(0,s.createCardElement)(e,t))),this.config.hass=t)}static get styles(){return l.style}render(){return this._hass&&this.config?r.html` + `},e.renderTitle=(t,i,n,r)=>!0===i.hide_title?"":l.html`
${(0,e.renderMainEntity)(t,i,n,r)} ${i.title}
`,e.renderInfoEntity=(t,i,n)=>{if(void 0===t||!t.stateObj||(0,a.hideIf)(t,i))return null;const r=(0,e.clickHandler)(t.stateObj.entity_id,t.tap_action,i,n);return l.html`
${(0,e.renderValue)(t,i)}
`},e.clickHandler=(t,e,i,n)=>()=>(0,s.handleClick)(n,i,{entity:t,tap_action:e},!1,!1),e.dblClickHandler=(t,e,i,n)=>()=>(0,s.handleClick)(n,i,{entity:t,double_tap_action:e},!1,!0),e.holdHandler=(t,e,i,n)=>()=>(0,s.handleClick)(n,i,{entity:t,hold_action:e},!0,!1)},607:function(t,e,i){var n=this&&this.__decorate||function(t,e,i,n){var r,o=arguments.length,a=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,i,a):r(e,i))||a);return o>3&&a&&Object.defineProperty(e,i,a),a};Object.defineProperty(e,"__esModule",{value:!0});const r=i(897),o=i(595),a=i(461),s=i(882),l=i(299);console.info("%c ROOM-CARD %c 1.3.3","color: cyan; background: black; font-weight: bold;","color: darkblue; background: white; font-weight: bold;");let u=class extends r.LitElement{constructor(){super(...arguments),this.info_entities=[],this.entities=[],this.rows=[],this._refCards=[]}setConfig(t){(0,a.checkConfig)(t),this.config=Object.assign(Object.assign({},t),{name:!1===t.name?" ":t.name,entityIds:(0,s.getEntityIds)(t)})}shouldUpdate(t){return(0,s.hasConfigOrEntitiesChanged)(this.config,t)}set hass(t){var e,i,n,r,o,a,l;this._hass=t,t&&this.config&&(this.config.entity&&(this.stateObj=t.states[this.config.entity],this.entity=Object.assign(Object.assign({},this.config),{stateObj:this.stateObj})),this.info_entities=null!==(i=null===(e=this.config.info_entities)||void 0===e?void 0:e.map((e=>(0,s.mapStateObject)(e,t))))&&void 0!==i?i:[],this.entities=null!==(r=null===(n=this.config.entities)||void 0===n?void 0:n.map((e=>(0,s.mapStateObject)(e,t))))&&void 0!==r?r:[],this.rows=null!==(a=null===(o=this.config.rows)||void 0===o?void 0:o.map((e=>{var i;return{entities:null===(i=e.entities)||void 0===i?void 0:i.map((e=>(0,s.mapStateObject)(e,t)))}})))&&void 0!==a?a:[],this._refCards=null===(l=this.config.cards)||void 0===l?void 0:l.map((e=>(0,s.createCardElement)(e,t))),this.config.hass=t)}static get styles(){return l.style}render(){return this._hass&&this.config?r.html`
${(0,a.renderTitle)(this.entity,this.config,this._hass,this)} diff --git a/room-card.js.gz b/room-card.js.gz index 818ac03..6dec32c 100644 Binary files a/room-card.js.gz and b/room-card.js.gz differ diff --git a/src/index.ts b/src/index.ts index 219b4ed..0941970 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,7 +8,7 @@ import { style } from './styles'; import { HomeAssistantEntity, RoomCardConfig, RoomCardEntity, RoomCardRow } from './types/room-card-types'; console.info( - '%c ROOM-CARD %c 1.3.2', + '%c ROOM-CARD %c 1.3.3', 'color: cyan; background: black; font-weight: bold;', 'color: darkblue; background: white; font-weight: bold;' );