# Set the volume for Google Home and Google Mini devices when group playback is stopped and update the volume trackers for all group members

- id: group_playback_stop
  alias: "CCA: Group playback (stop)"
  trigger:
  - platform: state
    entity_id: media_player.all_my_speakers, media_player.kitchen_speakers, media_player.main_speakers
    to: 'off'
  condition:
  - condition: template
    value_template: "{{ trigger.from_state.state in ['idle', 'paused', 'playing'] }}"
  action:
  - service: python_script.cca_set_chromecast_volumes
    data:
      entity_id: media_player.kitchen_home
