Lovelace, 16 button Keypad required

Hi, been using HA for a few years but just about to move to Lovelace, (so Lovelace Newbie)

I have an Stand Alone Alarm panel in my house, and have built an ESPHome interface.

So I have 16 Standard UI slide switches on my (Non Lovelace) screen.

What is the best way to create a compact 16 button keypad in Lovelace so I can assign each switch to each button.

Regards Dave

use a grid card.

example here, only change switch entities.

type: grid
cards:
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
  - type: button
    tap_action:
      action: toggle
    entity: switch.holiday_mode
columns: 4

result:

Thanks from the reply, works well, anyway to change the size of the grid to make it more compact?

Not, that i know, but Iā€™m still a newbie too :wink:

1 Like