Go to file
Alexandre Garcia 8ac16fae35 First commit 2018-08-26 11:52:54 -04:00
LICENSE First commit 2018-08-26 11:52:54 -04:00
README.md First commit 2018-08-26 11:52:54 -04:00
button-card.js First commit 2018-08-26 11:52:54 -04:00
icon_button.png First commit 2018-08-26 11:52:54 -04:00
no_icon.png First commit 2018-08-26 11:52:54 -04:00

README.md

Button card

Button card is a simple button card to toggle your entities.

The card toggles on click/tap.

icon-button-card no-icon-button-card

Options

Name Type Default Description
type string Required custom:button-card
entity string Required switch.ac
icon string optional Icon to display in place of the state e.g. mdi:air-conditioner
color string var(--primary-text-color) Color of the icon when state is on. Can be any html color e.g. rgb(28, 128, 199)
size string 40% Size of the icon. Can be percentage or pixel

Examples

Import the card in ui-lovelace.yaml

title: Home
resources:
  - url: /local/button-card.js
    type: module

Show a button for the air conditioner (blue when on):

- type: "custom:button-card"
  entity: switch.ac
  icon: mdi:air-conditioner
  color: rgb(28, 128, 199)

Show an ON/OFF button for the home lights:

- type: "custom:button-card"
  entity: group.home_lights