Simple option to send TTS message to internal speakers (Google & Sonos)

See below for a small update with the option to save 10 messages to reuse as a TTS message

First I’m not a developer and no specialist, so when my wife asked “create me something that I not only can send predefined messages to the speakers in the house but also something so that I can create easily messages myself” and don’t forget I’m not a technical person and don’t want to be one, so make it simple!!

First request of the wife so I did off course my freaking best :wink:


How I built it…

Create a couple of helpers…

1. TTS: input_text.tts (the text field to put the message in)

2. TTS media players: input_select.tts_media_players (the select option for the media players in your house)

3. TTS Media players text: input_text.tts_media_players_text (I created this because I wanted to use normal names for the speakers in the select list (TTS media players) and not the entity id’s, remember keep it simple :wink:

4. TTS Taal: input_select.tts_taal (select the language for the message tts)

5 TTS Volume choice: (set the volume of the speaker, use the speaker volume service option 0.*)

Set-up your TTS option in your configuration

  1. I use: ReversoTTS-HA (GitHub - rt400/ReversoTTS-HA: ReversoTTS component for HomeAssistant) as my main TTS because it has a Belgium voice and Nabu Casa for now has not (can be easily added true HACS: https://hacs.xyz/)
  2. For the other languages I use the Nabu Casa (Cloud TTS) cloud TTS option

Example reversotts, the Nabu Casa part we handle in the send script

tts:
  - platform: reversotts
    language: "Sofie-Belgian-Dutch"
    pitch: "100"
    bitrate: "128k"

STEP 1: we have to create a simple automation that sets the media player value (TTS Media players text) when you select one from the select list (TTS media players)

alias: 'TTS BLANK: mediaplayer select option'
description: ''
trigger:
  - platform: state
    entity_id: input_select.tts_media_players
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Hub master
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.nest_hub_master
            target:
              entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Hub woonkamer
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.nest_hub_woonkamer
            target:
              entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Mini Bureau
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.nest_mini_bureau
            target:
              entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Michael mini
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.nest_mini_michael
            target:
              entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Mini wasruimte
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.google_mini_wasruimte
            entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Sonos badkamer
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.sonos_badkamer
            entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Sonos Bureau
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.sonos_bureau
            entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Sonos dressing
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.sonos_dressing
            entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Sonos master
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.sonos_master
            entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Sonos Michael
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.sonos_michael
            entity_id: input_text.tts_media_players_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_media_players
            state: Sonos woonkamer
        sequence:
          - service: input_text.set_value
            data:
              value: media_player.sonos_woonkamer
            entity_id: input_text.tts_media_players_text
    default: []
mode: single

STEP 2: the script to clear the text and set some default values to the card

alias: 'SCRIPT TTS NOTIFICATION: blank clear'
sequence:
  - service: input_text.set_value
    data:
      value: ''
    entity_id: input_text.tts
  - service: input_select.select_option
    data:
      option: Kies media player
    entity_id: input_select.tts_media_players
  - service: input_select.select_option
    data:
      option: '0.4'
    target:
      entity_id: input_select.tts_volume_choice
  - service: input_text.set_value
    data:
      value: ''
    entity_id: input_text.tts_media_players_text
  - service: input_select.select_option
    data:
      option: Nederlands
    entity_id: input_select.tts_taal
mode: single

STEP 3: Script to send the message to the speaker

alias: 'SCRIPT TTS NOTIFICATION: send the TTS message'
sequence:
  - service: media_player.volume_set
    data:
      entity_id: '{{ states("input_text.tts_media_players_text" ) }}'
      volume_level: '{{ states("input_select.tts_volume_choice") }}'
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.tts_taal
            state: Nederlands
        sequence:
          - service: tts.reversotts_say
            data:
              cache: false
              entity_id: '{{ states("input_text.tts_media_players_text" ) }}'
              message: '{{ states("input_text.tts") }}'
      - conditions:
          - condition: state
            entity_id: input_select.tts_taal
            state: Engels
        sequence:
          - service: tts.cloud_say
            data:
              entity_id: '{{ states("input_text.tts_media_players_text" ) }}'
              message: '{{ states("input_text.tts") }}'
              language: en-US
              options:
                gender: female
      - conditions:
          - condition: state
            entity_id: input_select.tts_taal
            state: Nederlands cloud vrouw
        sequence:
          - service: tts.cloud_say
            data:
              entity_id: '{{ states("input_text.tts_media_players_text" ) }}'
              message: '{{ states("input_text.tts") }}'
              language: nl-NL
              options:
                gender: female
    default: []
mode: single

STEP 4: Create the Lovelace card

Dutch version:

type: grid
cards:
  - type: entities
    entities:
      - entity: input_select.tts_media_players
      - entity: input_select.tts_taal
      - entity: input_select.tts_volume_choice
        name: Volume media speler
        icon: 'mdi:volume-vibrate'
      - entity: input_text.tts
        name: Wat wil je melden?
        tap_action:
          action: none
        hold_action:
          action: none
        icon: 'mdi:message-text-outline'
    state_color: false
    header:
      type: picture
      image: /local/images/tts.png
      tap_action:
        action: none
      hold_action:
        action: none
    show_header_toggle: false
  - type: markdown
    content: >-
      &nbsp;&nbsp;<ha-icon
      icon="mdi:message-text-outline"></ha-icon>&nbsp;&nbsp;{{
      states("input_text.tts") }}
  - type: entities
    entities:
      - entity: script.1613345332186
        name: Bericht leeg maken
        icon: 'mdi:message-settings-outline'
        tap_action:
          action: none
        hold_action:
          action: none
      - entity: script.1613743070220
        name: Bericht verzenden
        icon: 'mdi:message-arrow-right-outline'
        tap_action:
          action: none
        hold_action:
          action: none
square: false
columns: 1

English version:

type: grid
cards:
  - type: entities
    entities:
      - entity: input_select.tts_media_players
        name: TTS Media player
      - entity: input_select.tts_taal
        name: TTS language
      - entity: input_select.tts_volume_choice
        name: Volume media player
        icon: 'mdi:volume-vibrate'
      - entity: input_text.tts
        name: What's your message?
        tap_action:
          action: none
        hold_action:
          action: none
        icon: 'mdi:message-text-outline'
    state_color: false
    header:
      type: picture
      image: /local/images/tts.png
      tap_action:
        action: none
      hold_action:
        action: none
    show_header_toggle: false
  - type: markdown
    content: >-
      &nbsp;&nbsp;<ha-icon
      icon="mdi:message-text-outline"></ha-icon>&nbsp;&nbsp;{{
      states("input_text.tts") }}
  - type: entities
    entities:
      - entity: script.1613345332186
        name: Clear message
        icon: 'mdi:message-settings-outline'
        tap_action:
          action: none
        hold_action:
          action: none
      - entity: script.1613743070220
        name: Send message
        icon: 'mdi:message-arrow-right-outline'
        tap_action:
          action: none
        hold_action:
          action: none
square: false
columns: 1

Updated version: Create a couple of extra helpers…

TTS Messages chooser: input_select.tts_messages_chooser (select your saved message)

TTS Message 1 to TTS Message 10 (to save the message for future use)

TTS Message text: input_text.tts_message_text (to preview the message and select for use)

STEP 1: automation to preview selected message (input_select.tts_messages_chooser )

alias: 'TTS BLANK: Message selector'
description: ''
trigger:
  - platform: state
    entity_id: input_select.tts_messages_chooser
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 1
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_1") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 2
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_2") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 3
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_3") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 4
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_4") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 5
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_5") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 6
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_6") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 7
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_7") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 8
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_8") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 9
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_9") }}'
            target:
              entity_id: input_text.tts_message_text
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 10
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_10") }}'
            target:
              entity_id: input_text.tts_message_text
    default: []
mode: single

STEP 2: automation select (button) the message and forward it to the TTS message field for reuse (input_text.tts)

alias: 'TTS BLANK: Set message text to tts text'
description: ''
trigger: []
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 1
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 2
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 3
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 4
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 5
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 6
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 7
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 8
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 9
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 10
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts_message_text") }}'
            target:
              entity_id: input_text.tts
    default: []
mode: single

STEP 3: script to save the message to the selected message field TTS Message 1 to TTS Message 10

alias: 'TTS BLANK: save message'
sequence:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 1
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_1
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 1
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 2
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_2
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 2
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 3
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_3
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 3
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 4
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_4
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 4
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 5
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_5
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 5
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 6
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_6
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 6
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 7
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_7
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 7
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 8
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_8
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 8
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 9
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_9
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 9
      - conditions:
          - condition: state
            entity_id: input_select.tts_messages_chooser
            state: Opgeslagen bericht 10
        sequence:
          - service: input_text.set_value
            data:
              value: '{{ states("input_text.tts") }}'
            target:
              entity_id: input_text.tts_message_10
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Kies een opgeslagen bericht...
          - service: input_select.select_option
            target:
              entity_id: input_select.tts_messages_chooser
            data:
              option: Opgeslagen bericht 10
    default: []
mode: single

STEP 4: New script to clear the form with the extra options

alias: 'SCRIPT TTS BLANK: clear form'
sequence:
  - service: input_text.set_value
    data:
      value: ''
    entity_id: input_text.tts
  - service: input_select.select_option
    data:
      option: Kies media player
    entity_id: input_select.tts_media_players
  - service: input_select.select_option
    data:
      option: '0.4'
    target:
      entity_id: input_select.tts_volume_choice
  - service: input_text.set_value
    data:
      value: ''
    entity_id: input_text.tts_media_players_text
  - service: input_select.select_option
    data:
      option: Nederlands
    entity_id: input_select.tts_taal
  - service: input_text.set_value
    data:
      value: ''
    target:
      entity_id: input_text.tts_message_text
  - service: input_select.select_option
    target:
      entity_id: input_select.tts_messages_chooser
    data:
      option: Kies een opgeslagen bericht...
mode: single

New Lovelace cards:

Dutch version:

type: grid
cards:
  - type: entities
    entities:
      - entity: input_select.tts_media_players
        name: TTS Media speler
      - entity: input_select.tts_taal
        name: TTS taal
      - entity: input_select.tts_volume_choice
        name: Volume media speler
        icon: 'mdi:volume-vibrate'
      - entity: input_text.tts
        name: Wat is het bericht?
        tap_action:
          action: none
        hold_action:
          action: none
        icon: 'mdi:message-text-outline'
    state_color: false
    header:
      type: picture
      image: /local/images/tts.png
      tap_action:
        action: none
      hold_action:
        action: none
    show_header_toggle: false
  - type: markdown
    content: >-
      &nbsp;&nbsp;<ha-icon
      icon="mdi:message-text-outline"></ha-icon>&nbsp;&nbsp;{{
      states("input_text.tts") }}
  - type: entities
    entities:
      - entity: input_select.tts_messages_chooser
        name: Selecteer een opgeslagen bericht...
  - type: markdown
    content: >-
      &nbsp;&nbsp;<ha-icon
      icon="mdi:message-text-outline"></ha-icon>&nbsp;&nbsp;{{
      states("input_text.tts_message_text") }}
  - type: grid
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: script.1615819007412
        icon: 'mdi:text-box-search-outline'
        name: Selecteer
      - type: button
        tap_action:
          action: toggle
        entity: script.1615819315672
        icon: 'mdi:content-save-move-outline'
        name: Opslaan
      - type: button
        tap_action:
          action: toggle
        entity: script.1613345332186
        icon: 'mdi:text-box-remove-outline'
        name: Leeg
      - type: button
        tap_action:
          action: toggle
        entity: script.1613743070220
        icon: 'mdi:send'
        name: Verstuur
    square: false
    columns: 4
square: false
columns: 1

English version:

type: grid
cards:
  - type: entities
    entities:
      - entity: input_select.tts_media_players
        name: TTS Media player
      - entity: input_select.tts_taal
        name: TTS language
      - entity: input_select.tts_volume_choice
        name: Volume media player
        icon: 'mdi:volume-vibrate'
      - entity: input_text.tts
        name: What's your message?
        tap_action:
          action: none
        hold_action:
          action: none
        icon: 'mdi:message-text-outline'
    state_color: false
    header:
      type: picture
      image: /local/images/tts.png
      tap_action:
        action: none
      hold_action:
        action: none
    show_header_toggle: false
  - type: markdown
    content: >-
      &nbsp;&nbsp;<ha-icon
      icon="mdi:message-text-outline"></ha-icon>&nbsp;&nbsp;{{
      states("input_text.tts") }}
  - type: entities
    entities:
      - entity: input_select.tts_messages_chooser
        name: Choose a saved message...
  - type: markdown
    content: >-
      &nbsp;&nbsp;<ha-icon
      icon="mdi:message-text-outline"></ha-icon>&nbsp;&nbsp;{{
      states("input_text.tts_message_text") }}
  - type: grid
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: script.1615819007412
        icon: 'mdi:text-box-search-outline'
        name: Select
      - type: button
        tap_action:
          action: toggle
        entity: script.1615819315672
        name: Save
        icon: 'mdi:content-save-move-outline'
      - type: button
        tap_action:
          action: toggle
        entity: script.1613345332186
        icon: 'mdi:text-box-remove-outline'
        name: Empty
      - type: button
        tap_action:
          action: toggle
        entity: script.1613743070220
        icon: 'mdi:send'
        name: Send
    square: false
    columns: 4
square: false
columns: 1

That’s it, can be probably a lot simpler, better but hey it works fine, and most important the wife loves it :wink:

2 Likes

I would add to restore the volume back to what it was.
Otherwise you might get unpleasant surprises.

1 Like

Thanks: I already have a script for this that sets it every night again to a default for all my speakers, and all the options to play music send predefined messages and… already are configured to use that script before sending a message, start the music, but good idea will add the option to start my volume script again after a message is send, better be safe than sorry :wink: thanks!

Also, not sure if it’s already like that or not but I can’t find it, a way to repeat the message.

I have a similar thing done in Node red and I clear the message 15 seconds after the message was finished. That way I can send the message again (and again) if I want.

As long as nobody clears the message you can send it again even if you choose a different speaker, language, volume… I also use a lot of predefined messages that can be initiated from the app, dashboards true the house dinner, walking, sleeping… so for now this works fine, but I like the idea to store for instance the 10 last messages send or something like that, definitely going to look in to that!

I never used Node red, I seen some videos of it, but to be honest I don’t find it always so easy to understand, probably just a learning curve and I will definitely check it out in the future and when I start using it I probably think why didn’t I do this before :wink: but for now I have to say the automation editor in HA is getting every version better and better and does the job for me right now :slight_smile:

New update save 10 messages and easily reuse them again…
Configuration is updated see first message.

Got a friend where the wife had an accident where she lost about 70% of her hearing, so he always had to to set the volume on a unhealthy high percentage, so added a small option to send a notification to an android TV device.

If someone is interested, just add a new action to the send script: SCRIPT TTS BLANK: send the TTS message

service: notify.androidtv_bureau
data:
  message: '{{ states("input_text.tts") }}'
  title: ''
  data:
    position: bottom-right
    transparency: 0%
    interrupt: 1
    duration: 30
    file:
      url: 'http://192.168.1.20:8123/local/images/tts.png'

Hi, is Reverso still working for you? After updating to the latest version I get an error:
Platform error tts.reversotts - No module named ‘pyttsreverso’

Not sure which platform to go to next… was using Microsoft until they dropped then Google and now Reverso…

Ok so I have had confirmation from the HACS team that Reverso is broken, Copied and pasted comment from them:

" They are publishing stuff not reflected in the repo (and you should NOT use that at all!),"

I hope this gets resolved as I really like Reverso…

Hi,

My apologies for the late reply, for me works everything again great after the update that the developer added a couple of days ago, did you already updated to this version?

I have the lastest version in HACS (1.02), I will remove and reinstall and if need be pull it directly from GIT - I’ll report back. Thanks for your answer

No luck, still get the same error:: Platform error tts.reversotts - No module named ‘pyttsreverso’

from both HACS re-install and manual install.

I managed to get the error to go away by downloading the module from here:

and copying it into my reversotts folder under custom_components. It all works now.

Hope this helps someone!?

Strange for me everything is working fine now with the latest version, cache issue?

doubt it… for my config it seems to need the actual py module in the directory…