Set volume for Chromecast?

Is it possible to set volume using Google Cast?

I use my Chromecasts around the house to send TTS notifications. It works really well, but sometimes I have played music to the Chromecasts and lowered the volume. The Chromecast is then set to the lower volume even when sending TTS notifications. Can I set the volume as a configuration variables somehow?

  • alias: Good night!
    initial_state: True
    trigger:
    platform: time
    at: ‘01:00:00’
    condition:
    action:
    • service: automation.trigger
      entity_id: automation.everything_off
    • service: cover.close_cover
    • service: tts.google_say
      entity_id: group.chromecast
      data:
      message: ‘Good night!’

https://github.com/Danielhiversen/home-assistant_config/blob/master/automation/bad.yaml#L12

Aha! So if I add another new action BEFORE the service tts.google_say like this

  - service: media_player.volume_set
    data:
      entity_id: media_player.DEVICENAME
      volume_level: 1.00

it should first set the volume to 100% and then read the TTS?

Yes, that should work