custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.97k stars 242 forks source link

Add vibration when push like other buttons on mobile app. #607

Open janfajessen opened 2 years ago

janfajessen commented 2 years ago

It Will be very helpful for me if the button have a vibration like the other normal buttons in the home assistant UI. In my case I do a RC car camera and with the vibration I know better if I push a button. Thanks in advance

Wombosvideo commented 2 years ago

Please read the documentation before opening an issue. Button vibration is already supported with the haptic property of actions, see https://github.com/custom-cards/button-card#action. To achieve the default button behaviour the following card config is needed:

type: custom:button-card
entity: <your-entity-id>
tap_action:
  action: toggle
  haptic: selection
hold_action:
  action: more-info