I want to have short cut buttons to play radio stations on my frontend. Here’s what I did, is this the best way to do it? It works but seems unnecessarily complicated.
Create buttons for each radio station - Kitchen : Play STATION
You likely don’t need an entity for every room/station combo. Instead or an automation use a script then have the button actions pass the desired variables:
square: true
columns: 4
type: grid
cards:
- type: button
tap_action:
action: call-service
service: script.room_radio
data:
room: kitchen
station: disco
name: Disco
- type: button
tap_action:
action: call-service
service: script.room_radio
data:
room: kitchen
station: jazz
name: Jazz
That way you can copy the entire card config into each room’s dashboard and just change the room value.