Bubble Button to run Automation to Stream Radio on Sonos

Hello, I’m trying to make a button via Bubble Card which simply runs an automation to stream a radio station on my Sonos speakers.

The Bubble Card button is Card type: Button. Button Type: State. Entity: < the automation name >

Can the automation I created exist with only ‘Then Do’ and nothing else populated? I’m thinking maybe that’s what is going wrong. The button gets pressed and it appears to run, but maybe the Automation itself won’t work.

Any thoughts would be appreciated. I’m very new at HA and don’t know much about yaml/coding at all, so I’m relying on the UI entirely.

Buttons toggle, automations don’t toggle. You need to add a Tap action, that Tap action should be Perform action, and the action it performs should be Automation: Trigger. You can then specify the target, click Choose Entity and select your automation.

1 Like

Thanks for responding. What you said makes sense.
I added Tap Action on the button, configured it as you listed. I can see in the log that the automation is triggered, but for some reason it goes to idle and then paused.

I got it to work once I’d removed the 2nd part of the automation, which was to join two different Sonos speakers together!

Reversing the order of my automation fixed it. Sonos joins the speakers together, then the radio is played. Thank you so much for your help!!!

No problem, glad you got it working.

1 Like