#Trigger turns off music

1 messages · Page 1 of 1 (latest)

ionic shell
#

Hello - Very new here so my apologies for the wrong vernacular.

While listening to music on my Sonos Fives, my goal is to have a cabinet open, the voice say “what’re we drinking?” over the same speakers, pausing the music, and having the music start again. Currently the automation stops the music but does not restart it. Thank you in advance.

alias: Sideboard Left Opened
description: ""
triggers:
  - type: opened
    device_id: 5418ad438cae60a630b854f6d2634324
    entity_id: 966ad3fbf88369ded92511ea0fba0bf6
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - metadata: {}
    data:
      message: Whisky Cabinet Opened
      title: "**ALERT**"
    action: notify.mobile_app_adams_iphone
  - target:
      entity_id: media_player.lounge_5s
    data:
      media_content_id: >-
        media-source://tts/tts.google_en_com?message=What%27re+we+drinking%3F&language=en-us
      media_content_type: provider
    metadata:
      title: What're we drinking?
      thumbnail: https://brands.home-assistant.io/_/tts/logo.png
      media_class: app
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://tts
        - media_content_type: provider
          media_content_id: >-
            media-source://tts/tts.google_en_com?message=What%27re+we+drinking%3F&language=en-us
    action: media_player.play_media
    enabled: true
  - action: media_player.volume_set
    metadata: {}
    data:
      volume_level: 1
mode: single
carmine robinBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

ionic shell
#

Thank you! Fixed it.

strong umbra
ionic shell
#

Thank you for your reply. I’ll look into music assistant. This would be used to play the music itself and not the voice action correct?