Merge pull request #186 from custom-cards/dev

1.11.1
This commit is contained in:
Jérôme W 2019-06-08 16:39:02 +02:00 committed by GitHub
commit 9ef93a2a35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 4 deletions

2
dist/button-card.js vendored
View File

@ -1673,7 +1673,7 @@ window.navigator.userAgent.match("Trident") && (DOMTokenList.prototype.toggle =
p = this._buildStyleGeneric(e, "grid");return a || o.push("no-icon"), r || o.push("no-name"), s || o.push("no-state"), l || u || o.push("no-label"), R`
<div id="container" class=${o.join(" ")} style=${ct(p)}>
${a || ""}
${r ? R`<div id="name" class="ellipsis" style=${ct(c)}>${r}</div>` : ""}
${r ? R`<div id="name" class="ellipsis" style=${ct(c)}>${dt(r)}</div>` : ""}
${s ? R`<div id="state" class="ellipsis" style=${ct(h)}>${s}</div>` : ""}
${l && !u ? R`<div id="label" class="ellipsis" style=${ct(d)}>${dt(l)}</div>` : ""}
${u || ""}

30
info.md Normal file
View File

@ -0,0 +1,30 @@
## Features:
- works with any entity
- 6 available actions on **tap** and/or **hold** and/or **double click**: `none`, `toggle`, `more-info`, `navigate`, `url` and `call-service`
- support for action repeat while holding the button down
- state and label display (optional)
- custom color (optional), or based on light rgb value/temperature
- custom state definition with customizable color, icon and style (optional)
- [custom size of the icon, width and height](#Play-with-width-height-and-icon-size) (optional)
- [aspect ratio support](#aspect-ratio) (optional)
- Support for [templates](#templates) in some fields
- custom icon (optional)
- custom css style (optional)
- multiple [layout](#Layout) support and [custom layout](#advanced-styling-options) support
- units for sensors can be redefined or hidden
- 2 color types
- `icon` : apply color settings to the icon only
- `card` : apply color settings to the card only
- automatic font color if color_type is set to `card`
- blank card and label card (for organization)
- [blink](#blink) animation support
- rotating animation support
- confirmation popup for sensitive items (optional) or [locking mecanism](#lock)
- haptic support for the [Beta IOS App](http://home-assistant.io/ios/beta)
- support for [custom_updater](https://github.com/custom-components/custom_updater) and [hacs](https://github.com/custom-components/hacs)
### Example:
<img src="https://github.com/custom-cards/button-card/raw/master/examples/all.gif?raw=true" width="509px">
### See the <a href="https://github.com/custom-cards/button-card/blob/master/README.md" target="_blank">Readme for installation and configuration</a>.

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "button-card",
"version": "1.11.0",
"version": "1.11.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "button-card",
"version": "1.11.0",
"version": "1.11.1",
"description": "Button card for lovelace",
"main": "dist/button-card.js",
"pre-commit": [

View File

@ -642,7 +642,7 @@ class ButtonCard extends LitElement {
return html`
<div id="container" class=${itemClass.join(' ')} style=${styleMap(gridStyleFromConfig)}>
${iconTemplate ? iconTemplate : ''}
${name ? html`<div id="name" class="ellipsis" style=${styleMap(nameStyleFromConfig)}>${name}</div>` : ''}
${name ? html`<div id="name" class="ellipsis" style=${styleMap(nameStyleFromConfig)}>${unsafeHTML(name)}</div>` : ''}
${stateString ? html`<div id="state" class="ellipsis" style=${styleMap(stateStyleFromConfig)}>${stateString}</div>` : ''}
${label && !lastChangedTemplate ? html`<div id="label" class="ellipsis" style=${styleMap(labelStyleFromConfig)}>${unsafeHTML(label)}</div>` : ''}
${lastChangedTemplate ? lastChangedTemplate : ''}