I have a “good_morning” automation which I previously personalised by adding an announcement “Have a great day” at the end.
I have added an Italian Voice Assistant for my partner, which I left with “Okay Nabu” wakeword; and I use “Hey Mycroft” for English assistant - and this works well (when I remember).
I added “Buongiorno” as a trigger word for the good_morning automation. Now, if I tell Mycroft “Good morning” the reply comes back as expected … but If my partner tells Nabu “Buongiorno”, the announcement makes no sense in either language - I guess it is reading the english words and trying to pronounce them as though they were Italian.
I could set up a separate automation for the Italian version … but this potentially doubles the number of automations.
The logical method is to use an If-then to choose between two Assist Announce actions - but what condition indicates which language (voice assistant) is currently being used ?
Two automations (or one with two IDs for triggers) is a good solution, so there’s no need to worry about it. Built-in commands work on the same principle.
Assist agents do not have entities, so you cannot easily obtain the language value.
If you use esphome, you can transfer the value of the usable wakeword via an event in HA and use it as a basis for your logic. However, there are many more disadvantages than with the first method.
Maybe I didn’t explain clearly enough … I did add “Buongiorno” to the Trigger list … and the result was not intelligible in either language. Sure, I could go “no need to worry about it” … but I prefer to look for a solution.
Are you saying that as a developer of the voice assist who knows; or as a user like myself who has simply not seen any entity which exposes which wakeword / language was used to trigger the current command ?
As for using ESPHome … i am wondering how that would be practical.