diff --git a/README.md b/README.md index f1fee88..645dd9f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ v2 is only compatible from version 2022.3 onwards ```yaml resources: - - url: /local/mini-climate-card-bundle.js?v=2.0.2 + - url: /local/mini-climate-card-bundle.js?v=2.0.3 type: module ``` @@ -35,14 +35,14 @@ v2 is only compatible from version 2022.3 onwards 2. Grab `mini-climate-card-bundle.js` ```console - $ wget https://github.com/artem-sedykh/mini-climate-card/releases/download/v2.0.2/mini-climate-card-bundle.js + $ wget https://github.com/artem-sedykh/mini-climate-card/releases/download/v2.0.3/mini-climate-card-bundle.js ``` 3. Add a reference to `mini-climate-card-bundle.js` inside your `ui-lovelace.yaml`. ```yaml resources: - - url: /local/mini-climate-card-bundle.js?v=2.0.2 + - url: /local/mini-climate-card-bundle.js?v=2.0.3 type: module ``` @@ -55,7 +55,7 @@ v2 is only compatible from version 2022.3 onwards ```yaml resources: - - url: /local/mini-climate-card-bundle.js?v=2.0.2 + - url: /local/mini-climate-card-bundle.js?v=2.0.3 type: module ``` @@ -148,7 +148,7 @@ v2 is only compatible from version 2022.3 onwards | **buttons** | object | optional | v1.0.1 | any buttons, [example](#buttons). | buttons: `name` | object | optional | v1.0.1 | the name of your button see examples | buttons: `name:icon` | string | optional | v1.0.1 | Specify a custom icon from any of the available mdi icons. -| buttons: `name:type` | string | optional | v1.0.1 | `dropdown` or `button` default `bitton` +| buttons: `name:type` | string | optional | v1.0.1 | `dropdown` or `button` default `button` | buttons: `name:order` | number | optional | v1.0.1 | sort order | buttons: `name:location` | string | optional | v1.2.1 | allows you to display buttons on the main panel, types `main, bottom`, default `bottom` | buttons: `name:state` | object | optional | v1.0.1 | config to get button state. diff --git a/package.json b/package.json index 7435e58..cbe4557 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mini-climate-card", - "version": "v2.0.2", + "version": "v2.0.3", "description": "a/c card for Home Assistant Lovelace UI", "keywords": [ "home-assistant", diff --git a/release_notes/v2.0.3.md b/release_notes/v2.0.3.md new file mode 100644 index 0000000..59af21c --- /dev/null +++ b/release_notes/v2.0.3.md @@ -0,0 +1,6 @@ +## v2.0.3 +[![Downloads](https://img.shields.io/github/downloads/artem-sedykh/mini-climate-card/v2.0.3/total.svg)](https://github.com/artem-sedykh/mini-climate-card/releases/tag/v2.0.3) + +### FIXED +- fix #37: 'style' option has no effect by @regevbr + diff --git a/src/components/dropdown-base.js b/src/components/dropdown-base.js index c158166..1dae4a0 100644 --- a/src/components/dropdown-base.js +++ b/src/components/dropdown-base.js @@ -1,4 +1,5 @@ import { LitElement, html, css } from 'lit'; +import { styleMap } from 'lit/directives/style-map'; import { ScopedRegistryHost } from '@lit-labs/scoped-registry-mixin'; import sharedStyle from '../sharedStyle'; @@ -27,9 +28,15 @@ export default class ClimateDropdownBase extends ScopedRegistryHost(LitElement) icon: String, active: Boolean, disabled: Boolean, + iconStyle: { type: Object }, }; } + constructor() { + super(); + this.iconStyle = {}; + } + get selectedId() { return this.items.map(item => item.id).indexOf(this.selected); } @@ -53,7 +60,8 @@ export default class ClimateDropdownBase extends ScopedRegistryHost(LitElement) render() { return html`