TTS Notifications with new Version of app

I can’t seem to get it to work.

This is, how I call the service from a script:

                          - service: |
                              notify.warn_{{target}}
                            data:
                              message: "TTS"
                              tts_text: "{{message}}"

This is the actual notify-service:

  - platform: group
    name: warn_sean
    services:
      - service: mobile_app_seanphone
        data:
          data:
            group: hassio
#            channel: Warning
            channel: "alarm_stream"
#            color: "#03A9F4"
            color: "yellow"
            importance: high
            sticky: true
            persistent: false
            alert_once: false
            ttl: 0

This is the error:

home_briefing: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['tts_text']

The format is not correct, refer to the docs for the correct example.

https://companion.home-assistant.io/docs/notifications/notifications-basic/#text-to-speech-notifications

      - service: notify.mobile_app_<your_device_id_here>
        data:
          message: "TTS"
          data:
            tts_text: "Motion has been detected"
2 Likes

I thought I did, but apparently I didn’t. Thank you!

1 Like

Hi, may I ask. Since a while, don’t know when my tts node-red does not work anymore.

I always used:

{
    "message": "TTS",
    "title": "Attention! there is a situation!",
    "data": {
        "ttl": 0,
        "priority": "high",
        "channel": "alarm_stream"
    }
}

But now it only speaks out (translated) set the text to speech to process on my mobile. It is set to google and there is not really more I can change there. Any help is appreciated.

EDIT:
apparently it totally changed…

{
    "message": "TTS",
    "data": {
        "tts_text": "Attention! there is a situation!",
        "media_stream": "alarm_stream_max"
    }
}

Can someone point me in the right direction to find out more about how to use what appears to be some kind of variables e.g.

notify.warn_{{target}}
tts_text: “{{message}}”