BREAKING: The script linked below will now use the Google Home Resume script instead of the Google Home Say script. So you need that script instead of the one this topic is about.
For my Lovelace Dashboard I have made a card to easily send a TTS message.
For this I’ve used some helpers.
-
input_text.tts_message
for the text to be sent -
input_boolean.tts_volume
to set if you want to change the volume for the TTS, or use the current volume -
input_number.tts.volume
for the volume setting (value from 0 to 100 using increments of 5) - an
input_boolean
for each Google Cast media player, with the entity_id as the player. So e.g.input_boolean.google_kitchen
formedia_player.google_kitchen
I created a script which uses this input to call the other script from post 1
It will reset the helpers to some defaults settings after the TTS has been sent (volume to 25%, all device toggles to off
etc)
The script allows to set a default selection for de dropdown, a default message text, a default volume and an option to reset the toggles (input_booleans) after the script is sent. If you remove one of these variables, it won’t reset anymore after the script is started.
All required helpers and the script are combined in one package.
I don’t have a very fancy Lovelace dashboard, so I made a simple card to use the above. The volume slider will only be shown in case input_boolean.tts_volume
is set to on
, and the toggles to select multiple entities will only be shown in case input_select.dropdown_google_say
is set to Geavanceerd kiezen
(Advanced selection in English).
The code for the card is available here
This will then look like this (I did not provide a default_selection
here, so the dropdown does not reset automatically):