Cant get "synonyms" to work for Google Assistant


i wanted to add some synonyms to my Items wich are exposed for Google Assistant.
GA ist synchronizing well after saving the new entries in the .items file. But i cannot access any of my items with the alternative names. Is there something wrong with my code?

Switch TV_schauen “TV-Wohnzimmer” { synonyms=“Fernseher”, ga=“Outlet”[ roomHint=“Wohnzimmer” ] }

1 Like

I have the exact same problem

Color Licht_ABBett_Farbe "Farbe" <colorpicker> {channel="...", ga="Light" [ name="Bett" , roomHint="Felix"], synonyms="Bad"}

Did you find a solution yet?

Same problem here. Saying “Sofa an” (German for “Sofa on”) isn’t recognized by Google Assistant. I get a list of furniture stores in my area instead. Using the item label works completely fine.

Switch Sofalichterkette "Sofalichterkette" <switch> (Licht, Wohnzimmer, PersistOnChange) {synonyms="Sofa",  ga="Light" [roomHint="Wohnzimmer"]}

A solution would be greatly appreciated!

EDIT: I ended up using {ga="Light" [roomHint="Wohnzimmer", name="Sofa"]} instead. I’m never gonna say the longer name anyway, and the name parameter does work. I’d still love to see this fixed though!

1 Like

Anecdotally, I’m not sure that the synonyms ever worked in the first place. Might have been a bug that was pointed out in a conversation, but never reported in GitHub.

@michikrug, am I wrong about that? It just seems to me that this got mentioned at least once or twice, but I don’t use synonyms so I never looked into it.

Should have been fixed in August :thinking:

Unfortunately, I never know what code is currently running in production for all of you. Only Marziman can propably tell.

I’ll try it out this weekend to see what happens on my system.

Just tested it in my setup and it worked as expected.

Tested it with (sorry, but German):

Switch MyLock "Türschloss" { synonyms="Riegel", ga="Lock" [ pinNeeded="1234" ] }
-> “Schließe Riegel”

Color MyLight "Zimmerlicht" { synonyms="Hupe", ga="Light" }
-> “Hupe an”

So either the changes from August got never released or there is something else broken… :confused:

German Video

I’m not sure if this will help much, but using OH3 and configuring via the UI, I’ve managed to get synonyms to work.

  1. Administration > Settings > Items > Volume (Dimmer):
  2. Under Metadata, click Google Assitant (assuming you’ve already created it).
  3. Click the Code tab
  4. Under config: enter synomyn: <word>
  5. Click Save
  6. On your Google Assistant device, say “OK Google, sync devices” (or drag down from the top of the app)
  7. Test by saying “Ok Google, Set 50 percent”

Here’s an example of my code, where = “pencil”

value: Speaker
  name: Living speaker
  synomyn: pencil
  roomHint: Living Room

(I could say “Ok Google, set pencil volume 50 percent” or “Ok Google, set living speaker volume 50 percent”)


1 Like