Ubiquiti Doorbell chime with Sonos

Happy new year.

I am a newbie into this and I need your help!

I have the following error when i execute my automation for the doorbell.

"Stopped because an error was encountered at January 10, 2023 at 10:36:29 AM (runtime: 1.08 seconds)

must contain at least one of entity_id, device_id, area_id."

My YAML codes are follows.

'alias: Doorbell1
description: “”
trigger:

  • platform: state
    entity_id:
    • binary_sensor.g4_doorbell_doorbell
      to: “on”
      condition: []
      action:
  • service: sonos.snapshot
    data:
    entity_id: all
  • service: media_player.volume_set
    data:
    volume_level: 0.7
  • service: media_player.play_media
    target:
    entity_id:
    - media_player.basement
    - media_player.sonos_move
    - media_player.media_room
    - media_player.front_foyer
    data:
    media_content_type: music
    media_content_id: >-
    media-source://media_source/local/media/sounds_sounds_ring_button_Chime.mp3
  • delay:
    hours: 0
    minutes: 0
    seconds: 4
    milliseconds: 0
  • service: sonos.restore
    data:
    entity_id: all
    mode: single’

Is there something wrong with my coding?

Thank you in advance!

Perhaps it’s reporting that the service call to media_player.volume_set doesn’t specify any media players. According to the documentation, entity: all specifies all media_players. If you don’t want all of them, then you need to specify which ones.


NOTE

Please format your automation. Its current appearance makes it difficult to read and to check for syntax errors.