Aqara button: one click to turn red one light + start Spotify (specific playlist) and play the music over google home mini

hello,

the title seems a mouthful of words… but in summary I am trying to build an automation that:

at “one click” of aqara button

  • Light one turn red
  • Spotify (integrated via integration) select a specific playlist
  • Spotify cast the music to one specific Google home mini (as speaker)

I am new to the automation… please help me in "simple turns :slight_smile:

thank you!

I’d suggest creating individual scripts that perform each of the actions, then using one of the Aqara blueprints (such as ZHA - Aqara Wireless Mini Switch ) to call the scripts in sequence.

For example, below is part of an automation I have using the Aqara button, with a blueprint I created for my variant of the device. It’s used to either turn off or shutdown a variety of devices with a single button press.

- id: 'remote_003'
  alias: Remote003
  use_blueprint:
    path: p4mr/aqara_wxkg11lm.yaml
    input:
      aqara_wxkg11lm: <snip_device_id>
      button_single_press:
      - service: script.sonos_sleep
      - service: script.lifx_off
      - service: script.plug_tv_off
      - service: script.plug_echo_dot_off
      - service: script.plug_mm_off
      - service: script.plug_weather_off
      - service: script.plug_multiplug_off