I was looking two add a button to my dashboard that if pressed has two actions happen.
The first action is to navigate to a different view. I know this can be done via the ‘tap_action: navigate’.
The second action is to turn on a switch.
I only can do either within the button-card.
I looked into creating a script but I havent found a action type.
If anybody of you can help me out, I would really appreciate it!
Are you looking for the action type to change the page or to turn on the switch.
I don’t think that’s possible with out-of-the-box HA, but if you create a script that’s invoked by the button, you can navigate the UI with browser_mod while also performing other actions. Note that I haven’t used it, so I can’t give you a complete example.
I am looking to do both. When I press the button I want a switch to turn on and to navigate to a different page.
The action type for turning on a switch is
call_service and the service to call is
You might be interested in custom button card. It allows to define actions for tap, double-tap, hold. BTW its features are far beyond this.
custom button card is not needed for the functionality described.