Chime TTS - Play audio before/after TTS audio lag free

Sorry if this is already answered somewhere but I couldn’t find it. I am using Chimes via the GUI and want to insert entity values into the TTS message. I couldn’t find a way to do it without switching to the YAML editor and using {{ states(‘entity’) }} but that then prevents going back to the GUI interface to tweak other parameters. The error is:

Visual editor is not supported for this configuration

  • Templates not supported in visual editor
    You can still edit your config in YAML.

Is there a way to stay within the GUI editor and still insert variables to be spoken as part of the TTS message? This is an example of what I would like to do except from within the GUI:

service: chime_tts.say
- media_player.multizone_amp
chime_path: mp3_path_placeholder-bells
end_chime_path: mp3_path_placeholder-bells
delay: 450
final_delay: 0
tts_playback_speed: 100
volume_level: 1
message: >-
Excessive Water Use Detected. The pump has run {{
states(‘counter.pump_count’) }} times today.
tts_platform: cloud

The answer is in your post.
Templates not supported in visual editor
It’s not a bug, it’s a feature

Sorry I don’t follow. If templates are not supported then why isn’t there another way insert variables into TTS from the visual editor?

I don’t know if I understand you well, templates are supported, but you don’t use them in the visual editor, but in yaml mode.

My original question was not about templates. It was about how to insert entity values into TTS using the visual editor. If templates are only for YAML then what is the method for using the visual editor to do this?

If you want to use a variable value, you cannot do without a template.
So none.

Hi @Upstatemike. Entity values can only be inserted via the UI when selecting target entities for a service. This is is a limitation of the UI in Home Assistant, not Chime TTS specifically.

1 Like

OK thanks for the explanation. I am not a programmer so it’s hard for me to understand why the visual editor can’t just designate a special character, like a $ for example, and use it to flag a variable in TTS. In other words when the visual editor encounters $entityname in a TTS string it could simply convert it to {{
states(‘entityname’) }} in YAML without forcing you to leave the visual editor or creating an error. (Or maybe there would still be an error due to other aspects of how the visual editor works?)

I can certainly understand why advanced functions might be hard for the visual editor to handle but inserting variable values into TTS strings is pretty basic functionality in Home Automation and it is a strange thing to exclude from visual editor support, especially for new folks coming from other platforms where they are already used to doing it that way.

1 Like

I appreciate the frustration. Home Assistant’s UI editor receives updates and improvements periodically but isn’t perfect.
The goal of Chime TTS is to try to improve the UI experience for TTS notifications, but it’s constrained.
Templating can be tricky and has a learning curve but it might be worth learning as it doesn’t look like it’s going anywhere.

I agree that Chime TTS is awesome. That is the chief reason I have been experimenting with migrating some of my TTS stuff from my other Home Automation platforms to Home Assistant. The fact that I have to use Templating to add variables to my messages is not a big deal really. The concern is that I can’t then go back to the visual editor and take advantage of the easy dropdown menus if I want to make a quick change to other parameters. For now I can pull the Template back out in the YAML view, then tweak what I want in the dropdowns, then reinsert the Template back when I am done.

I am not really looking for the UI folks to change anything about Templating. I just think they should consider if there shouldn’t be a different way to handle variables in TTS that does not rely on Templating at all since it does create constraits that other platforms don’t have to deal with. Until then I will live with the workaround.

Thanks again for your help with this.