Google Assistant Integration Setup

@MARZIMA @aart

The “official announcement” post seemed to have a myriad of tangents so I thought I’d start a new post for my specific question.

I saw in the announcement that a dimmer setting is supported. You can request that a light (or volume?) be set at a particular setting (percentage) which will be passed to openHAB for the device to be controlled accordingly.

I have a device with Low/Medium/High/Off settings. Is there a way to set up the integration so that I can ask Google Assistant to set the device to, say, “medium” (or off or low, or high) and that setting is passed to openHAB so my rule can take action based on that value?



Witch type off device do you want to expose to Google Assistant?
Google is only supporting a limited set of devices.
There is on GitHub already a request for the device Fan. Maybe that is what you are looking for?

I have a Sonoff 4Ch with TASMOTA firmware connected to a ceiling fan. I have an openHAB rule that sets the appropriate combination (more than one for some speed selections) of three relay outputs to select Low/Medium/High/Off on the fan. I would like to define one device that I can expose to Google Assistant that I can request one of four settings for the device which will be sent back to openHAB. The returned value would then be used by an openHAB rule to set the relays appropriately.


May I throw in a curve ball?

Could you create a number or dimmer item to expose, then have your rule be guided by the level of the dimmer?

The voice command “turn up the fan” might well work.

{I can confirm that “turn up the lights” works}

Nope, not a curveball at all. These kinds of ideas are what I was hoping for.

  • What does the “command” returning from Google Assistant to openHAB look like in the Dimmer Item?
  • Besides saying turn up/down, can you say a specific value (e.g., 50%)?
  • Can you share your Dimmer/Number Item declaration?




Thanks, it’s nice to know that I’ve got a 1/500 hit rate :slight_smile:

I have no idea, all I can tell you is that after exposing an item to the openHAB cloud, Google (and others) seems to be able to read it’s state and return states.


Specific values, be that a target temperature, blind position or dimmer level.

From an end user perspective, it just looks like you’ve moved a slider or toggled a switch.

That said, I saw this on the original Google Assistant thread :-

Ohhh yes :smile:

I’ve tried all kinds of voice commands, some work better than others, but on the whole, I’d say it’s successful.

“Set bathroom light to 87%”

“Set bathroom colour to Cyan”

“Dim the lounge wall lights a little”

“Turn everything off” - which I didn’t realise included the wake up alarm switch (that reduced the WAF a little)

And my favourite when demonstrating…

“How many things are On?”

Honestly, it’s nothing clever.

I’d use paperUI (mainly because I just find it easier), so all I’d do is create an Item, then add the Lighting tag.