Skip to content

Commit

Permalink
Merge pull request #186 from custom-cards/dev
Browse files Browse the repository at this point in the history
1.11.1
  • Loading branch information
RomRider committed Jun 8, 2019
2 parents 1a213fa + d5c6360 commit 9ef93a2
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/button-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || ""}
Expand Down
30 changes: 30 additions & 0 deletions info.md
Original file line number Diff line number Diff line change
@@ -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 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion src/button-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 : ''}
Expand Down

0 comments on commit 9ef93a2

Please sign in to comment.