Loading...
Loading...
Creates and configures Home Assistant button cards with actions (tap, hold, double-tap), service calls, navigation, and custom button-card (HACS) with templating and state-based styling. Use when asked to "create button card", "add service call button", "configure tap actions", or "customize button appearance".
npx skill4agent add dawiddutoit/custom-claude ha-button-cardstype: button
entity: light.living_room
name: Living Room
show_state: true
icon: mdi:lightbulb
tap_action:
action: toggle
hold_action:
action: more-infotype: button
name: Turn Off All Lights
icon: mdi:lightbulb-off
show_state: false
tap_action:
action: perform-action
perform_action: light.turn_off
data:
entity_id: alltype: button
name: Bedroom
icon: mdi:bed
tap_action:
action: navigate
navigation_path: /lovelace/bedroom| Action | Trigger | Use Case |
|---|---|---|
| Single tap/click | Primary action (toggle, navigate, service call) |
| Press and hold 0.5s+ | Secondary action (more-info, different service) |
| Two quick taps | Tertiary action (navigate, custom service) |
| Action | Description | Example Use |
|---|---|---|
| Do nothing | Disable interaction |
| Toggle entity on/off | Lights, switches |
| Show entity details dialog | View sensor history |
| Go to another view/dashboard | Room navigation |
| Open external URL | Documentation, web apps |
| Execute HA service | Scripts, automations, scenes |
| Trigger voice assistant | Voice commands |
type: button
entity: light.bedroom
name: Bedroom Light
icon: mdi:ceiling-light
show_name: true
show_icon: true
show_state: true
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: nonetype: button
entity: climate.living_room
name: AC
icon: mdi:air-conditioner
show_state: true
tap_action:
action: toggle
hold_action:
action: more-infotype: button
name: Movie Mode
icon: mdi:movie
tap_action:
action: perform-action
perform_action: scene.turn_on
target:
entity_id: scene.movie_modetype: button
name: Good Night
icon: mdi:sleep
tap_action:
action: perform-action
perform_action: script.good_night
hold_action:
action: nonetype: button
name: Router Admin
icon: mdi:router-wireless
tap_action:
action: url
url_path: http://192.168.1.1type: button
name: Voice Assistant
icon: mdi:microphone
tap_action:
action: assisttype: button
name: All Lights Off
icon: mdi:lightbulb-off
tap_action:
action: perform-action
perform_action: light.turn_off
data:
entity_id: alltype: button
name: Set Temp 22°C
icon: mdi:thermostat
tap_action:
action: perform-action
perform_action: climate.set_temperature
target:
entity_id: climate.living_room
data:
temperature: 22type: button
name: Dim Lights
icon: mdi:lightbulb-on-50
tap_action:
action: perform-action
perform_action: light.turn_on
target:
entity_id: light.living_room_dimmer
data:
brightness: 150type: button
name: Trigger Automation
icon: mdi:home-automation
tap_action:
action: perform-action
perform_action: automation.trigger
target:
entity_id: automation.motion_lightstype: button
name: Go to Bedroom
icon: mdi:bed
tap_action:
action: navigate
navigation_path: /lovelace/bedroomtype: grid
columns: 2
cards:
- type: button
name: Living Room
icon: mdi:sofa
tap_action:
action: navigate
navigation_path: /lovelace/living-room
- type: button
name: Bedroom
icon: mdi:bed
tap_action:
action: navigate
navigation_path: /lovelace/bedroom
- type: button
name: Kitchen
icon: mdi:fridge
tap_action:
action: navigate
navigation_path: /lovelace/kitchen
- type: button
name: Outdoors
icon: mdi:tree
tap_action:
action: navigate
navigation_path: /lovelace/outdoorstype: button
name: Home
icon: mdi:home
tap_action:
action: navigate
navigation_path: /lovelace/hometype: custom:button-card
entity: light.bedroom
name: Bedroom Light
show_state: true
icon: mdi:ceiling-light
tap_action:
action: toggle
hold_action:
action: more-infotype: custom:button-card
entity: light.bedroom
name: Bedroom Light
show_state: true
icon: mdi:ceiling-light
color: auto
state:
- value: "on"
color: rgb(255, 200, 100) # Warm white when on
icon: mdi:ceiling-light-on
- value: "off"
color: rgb(100, 100, 100) # Gray when off
icon: mdi:ceiling-light-off
tap_action:
action: toggleperform-actioncall-servicepath: bedroom/lovelace/bedroom