Homeassistant.server - options not valid?

Hi,

follwing action call is working in Developer tools without problems:


action: tts.cloud_say
data:
  cache: "false"
  entity_id: media_player.raspiaudio_muse_luxe_3831a4_raspiaudio_muse_luxe_office
  message: "Das ist ein Test"
  language: "de-AT"
  options:
    voice: "JonasNeural"

but when used in an ESPHome config in voice_assistant:


voice_assistant:
  [....]  
  on_tts_start:
    [...]
    - homeassistant.service:
        service: tts.cloud_say
        data:
          cache: "false"
          entity_id: media_player.raspiaudio_muse_luxe_3831a4_raspiaudio_muse_luxe_office
          message: !lambda 'return x;'
          language: "de-AT"
          options:
            voice: "JonasNeural"

It failed config linting with:

          Must be string, got <class 'esphome.helpers.OrderedDict'>. did you forget putting quotes around the value?.
          options: 
            voice: JonasNeural

Without options.voice its working fine.

Any idea how to add the voice option in there… i really hate the default voice :slight_smile:

TIA

I see homeassistant.service is no longer on the api page. It now only shows homeassistant.action

It also has it’s own integration.

https://esphome.io/components/api.html#actions