Expected float for dictionary value @ data['volume_level']

I have an error in my logs and I can’t figure out why.
The error is : “Error while executing automation automation.mute_google_off: expected float for dictionary value @ data[‘volume_level’]

The piece of code I think it involves is:

automation:
  # begin Mute Google off #
  - alias: 'Mute Google off'
    initial_state: true
    trigger:
      - platform: state
        entity_id: input_boolean.google_mute
        from: 'off'
        to: 'on'
    action:
      - service: media_player.volume_set
        data:
          volume_level: 0.6
        target:
          entity_id: media_player.google_home
  # end Mute Google off #

Can anyone help me figure it out please?

Did you try volume_level between quotes like this:

        volume_level: '0.6'

Hi,

I really thought I tried that already, but now the error seems to be gone.
I feel so stupid right now :slight_smile:

Thanks !