Is my code good for google home?

I cant seems to get roomhint working and i get switches for color in the google home app. Is that normal? Or do i have to group items?

And connectionChecker shows only a few devices. Is this normal?

I have the lastest openhab stable version.

Afther synce devices in the google home app. I get sometimes names like Color and Brightness. And not the orginal name. When i go to connectionChecker I can see a normal name. Like “Licht schakelaar gang”. How to fix this? it doesn’t happen always.

Switch GF_Hallway_Light_s “Licht schakelaar gang” (GF_Corridor, HallwayLight, gLight) [“Lighting”, “Switchable”] {synonyms=“Light Gang”, ga=“Light”,channel=“yeelight:stripe:1:color” [ name=“Light gang”, roomHint=“Gang” ]}

Dimmer GF_Hallway_Light_db “Licht helderheid gang” (GF_Corridor, HallwayLight, gLight) [“Lighting”, “Dimable”] {synonyms=“Light Gang”, ga=“Light”, channel=“yeelight:stripe:1:color” [ name=“Light helderheid gang”, roomHint=“Gang” ]}

Dimmer GF_Hallway_Light_ct “Licht kleur gang” (GF_Corridor, HallwayLight, gLight) [“Lighting”, “Dimable”] {synonyms=“Light Gang”, ga=“Light”, channel=“yeelight:stripe:1:color” [ name=“Light kleur gang”, roomHint=“Gang” ]}

The examples on Google Assistant | openHAB are not very very clear for me. For example no device channels. So that’s why i need some help.

Have you made any progress with this? I note a few things:

  1. Unless you’re using Alexa as well, you don’t need the [“Lighting”, “Switchable”] tags. This used to be required for GA, but has been replaced by metadata. They shouldn’t cause any harm, but there’s an outside chance that they are.
  2. I don’t think synonyms actually work. I’ve seen people try to use them, but I haven’t heard of anyone succeeding.
  3. Your “name” and “roomHint” are definitely in the wrong place. You’ve bundled them with the channel, but they should be attached to “ga”.

I agree that the documentation could probably use some work, as the functionality has grown significantly this past year.

Here’s what I think your first item should look like with the extra stuff stripped out.

Switch GF_Hallway_Light_s "Licht schakelaar gang" (GF_Corridor, HallwayLight, gLight) { channel="yeelight:stripe:1:color", ga="Light" [ name="Light gang", roomHint="Gang" ] }

On a side note, please use code fences (</>) instead of blockquotes. It’s easier to read the code and doesn’t convert your quotation marks to annoying smart quotes.

Hope this helps!

1 Like
  1. No only google. Thank you! I delete these.
  2. I hope some one else can confirm this.
  3. Thank you! Roomhint works now :slight_smile: