All Projects → custom-cards → button-entity-row

custom-cards / button-entity-row

Licence: other
Adds buttons to call services to entity cards

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to button-entity-row

lovelace-battery-entity-row
Show battery states or attributes with dynamic icon on entity rows in Home Assistant's Lovelace UI
Stars: ✭ 49 (-32.88%)
Mutual labels:  home-assistant, lovelace-ui
numberbox-card
Replace input_number sliders with plus and minus buttons
Stars: ✭ 61 (-16.44%)
Mutual labels:  home-assistant, lovelace-ui
ioBroker.lovelace
Visualization with Lovelace-UI
Stars: ✭ 41 (-43.84%)
Mutual labels:  home-assistant, lovelace-ui
bom-radar-card
A rain radar card using the new tiled images from the Australian BOM
Stars: ✭ 52 (-28.77%)
Mutual labels:  home-assistant, lovelace-ui
light-card
Lovelace light-card for home assistant
Stars: ✭ 18 (-75.34%)
Mutual labels:  home-assistant, lovelace-ui
Home Assistant SkyQ MediaPlayer
Home Assistant SkyQ Media player component
Stars: ✭ 56 (-23.29%)
Mutual labels:  home-assistant
HomeAssistant
My Home Assistant Configuration
Stars: ✭ 71 (-2.74%)
Mutual labels:  home-assistant
citymind water meter
Home Assistant Integration with cp.city-mind.com, an Israeli water meters reading service
Stars: ✭ 15 (-79.45%)
Mutual labels:  home-assistant
ha-watermeter
Data provider for smartmeter watermeter.
Stars: ✭ 20 (-72.6%)
Mutual labels:  home-assistant
meross pair
Android APP that allows pairing Meross Devices with third party MQTT brokers
Stars: ✭ 18 (-75.34%)
Mutual labels:  home-assistant
hass nibe
Home Assistant Nibe Uplink Integration
Stars: ✭ 117 (+60.27%)
Mutual labels:  home-assistant
xboxone-home-assistant
Control your Xbox One from your Home Assistant device.
Stars: ✭ 26 (-64.38%)
Mutual labels:  home-assistant
home-assistant-custom-components-linkplay
LinkPlay based media devices integration for Home Assistant. Fully compatible with Mini Media Player card including speaker group management. Supports snapshot and restore functionality for TTS.
Stars: ✭ 62 (-15.07%)
Mutual labels:  home-assistant
addon-base-python
Docker Python base images (Alpine) - Home Assistant Community Add-ons
Stars: ✭ 12 (-83.56%)
Mutual labels:  home-assistant
Home-Assistant-Main
My Home Assistant Configuration Be sure to ⭐ my repo so you can keep up to date on the daily progress!
Stars: ✭ 54 (-26.03%)
Mutual labels:  home-assistant
home-assistant-custom-components
My custom components for Home Assistant
Stars: ✭ 70 (-4.11%)
Mutual labels:  home-assistant
hassio-addons
Some home assistant addons I manage
Stars: ✭ 16 (-78.08%)
Mutual labels:  home-assistant
streamdeck
Golang API for the Corsair / Elgato StreamDeck
Stars: ✭ 46 (-36.99%)
Mutual labels:  buttons
ical-sensor-homeassistant
an iCal Sensor for Home Assistant
Stars: ✭ 42 (-42.47%)
Mutual labels:  home-assistant
compass-card
A Lovelace card that shows a directional indicator on a compass for Home Assistant
Stars: ✭ 64 (-12.33%)
Mutual labels:  home-assistant

Button Entity Row

hacs_badge

Creates a row of buttons to be placed in an entities card.

example-gif

Options

Name Type Requirement Description
type string Required custom:button-entity-row
buttons string or Button Required List of buttons to display.

Button Object

Name Type Requirement Description
entity string Optional The entity_id of the entity you want to show.
name string Optional Name to use for entity.
icon string Optional Material design icon to display.
state_icons {[state: string]: string} Optional Material icon for each specific state of the entity.
state_styles {[state: string]: string} Optional CSS styles to apply to the button for a specific state.
state_icon_styles {[state: string]: string} Optional CSS styles to apply to the icon for a specific state.
style object Optional CSS styles to apply to the button.
icon_style object Optional CSS styles to apply to the icon.
service string Optional The Home Assistant service to call when the button is clicked.
service_data object Optional Service data to be sent with the service call.

Usage

You can specify directly an entity name or use the Button object.

resources:
  - url: /community_plugin/button-entity-row/button-entity-row.js
    type: module

Basic setup.

example1

type: entities
entities:
  - entity: light.bedroom_light

  - type: "custom:button-entity-row"
    buttons:
      - scene.daylight
      - entity: script.light_colour_flow
        name: Flow
      - scene.evening
      - scene.rave

Using state icons.

example1

type: entities
entities:
  - entity: light.dining_room

  - type: "custom:button-entity-row"
    buttons:
      - entity: script.pause_kitchen_motion
        icon: "mdi:pause"
        name: 1 hour
        style:
          - color: var(--primary-color)
      - entity: input_boolean.kitchen_motion_sensor
        name: Detect motion
        state_icons:
          "off": "mdi:eye-off"
          "on": "mdi:motion-sensor"

Some css styling, icons and icon-name buttons.

example2

type: entities
entities:
  - entity: light.bedroom_light

  - type: "custom:button-entity-row"
    buttons:
      - entity: scene.daylight
        icon: "mdi:brightness-5"
        style:
          - color: white
      - entity: script.light_colour_flow
        icon: "mdi:all-inclusive"
        style:
          - color: white
      - entity: scene.evening
        icon: "mdi:brightness-3"
        style:
          - color: white
      - entity: scene.rave
        icon: "mdi:track-light"
        name: Rave
        style:
          - color: white

Multiple rows of buttons.

example3

type: entities
entities:
  - entity: light.monitor_leds

  - type: "custom:button-entity-row"
    buttons:
      - entity: scene.office_standard
        icon: "mdi:lightbulb-on"
        style:
          - color: var(--primary-color)
      - entity: scene.office_orange
        icon: "mdi:lightbulb-on"
        style:
          - color: "rgb(255,126,0)"

  - type: "custom:button-entity-row"
    buttons:
      - icon: "mdi:lightbulb-off-outline"
        service: homeassistant.turn_off
        service_data:
          entity_id: group.office_lights
        style:
          - color: white

Using custom styles/icons, specific to the state:

example3

type: entities
entities:
  - entity: switch.entrance

  - type: "custom:button-entity-row"
    buttons:
      - entity: input_boolean.alarm
        name: Alarm System
        style:
          background: lightgray
          border-radius: 9999px
        state_icons:
          "off": "mdi:shield-home"
          "on": "mdi:lock-open"
        state_styles:
          "off":
            color: red
            font-weight: bold
          "on":
            color: green

Default Entities Map to Services

Domain Service
automation automation.toggle
cover cover.toggle
fan fan.toggle
input_boolean input_boolean.toggle
light light.toggle
script script.toggle
switch switch.toggle
vacuum vacuum.toggle
media_player media_player.media_play_pause
scene scene.turn_on

If no service is specified for a given button, and there is no default value corresponding to its specific domain (eg.: binary_sensor), the "more-info" modal of the entity will be shown instead (if any).

Full Configuration Examples

resources:
  - url: /community_plugin/button-entity-row/button-entity-row.js
    type: module

views:
  - title: Home
    id: home
    cards:
      - type: entities
        title: Living Room Lights
        show_header_toggle: false
        entities:
          - type: "custom:button-entity-row"
            buttons:
              # full configuration example
              - icon: mdi:lightbulb-on
                style:
                  color: yellow
                name: "On"
                service: scene.turn_on
                service_data:
                  entity_id: scene.lights_up

              # basic entity, uses hass configured icon to display
              - scene.lights_out

              # entity with some overrides
              - icon: mdi:movie
                name: Movie
                entity: scene.movie_lights

You can also specify multiple rows of buttons

resources:
  - url: /community_plugin/button-entity-row/button-entity-row.js
    type: module

views:
  - title: Home
    id: home
    cards:
      - type: entities
        title: Living Room Lights
        show_header_toggle: false
        entities:
          - type: "custom:button-entity-row"
            buttons:
              - - switch.light_1
                - switch.light_2
              - - media_player.roku
                - light.lamp
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].