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
target:
entity_id:
- media_player.multizone_amp
data:
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
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?
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.
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.
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.
Strangely, when using chime say_url, I get a response with a link, but no MP3 is ever placed in the folder, and so of course, when I go to the URL, there is no file there. Anyone else resolved this?
The issue might be caused by an incorrect folder path in your configuration. Check that the path you have for your chime_tts.say_url is a valid absolute path to a publicly facing folder:
Try removing /root from the start of the folder path and try again.
If you’re still having the issue, I suggest you enable debug logging and share the debug log messages here - maybe there might be something useful there:
EDIT: The issue might instead be related to your permissions. You may need to add the path to the allowlist_external_dirs in your configuration.yaml file:
The next version of Chime TTS includes a media_content_id field in the chime_tts.say_url response object, which will allow you to use it more easily with the media_player.play_media service, for example.
@Nimrod_Dolev Is it possible to include coding to mute the confirmation beep when changing volume levels with Alexa? There are a few articles that explain how to do it but that I found but I am not sure if you know of an easy way to do it yourself?
Reason: If I am watching a movie, I want the volume to increase on my alexa devices to alert me that someone is at the door. I don’t want to hear the BEEP prior to the chime playing, nor after when the volume is decreased.
Something is wrong with your configuration set up. The media_content_id should be the FQN of your HA installation either through NabuCassa, DuckDNS, or your own private domain.