Problems with Google Assistant and a bulb with on/off + dimming

I have an MQTT-controlled bulb configured in OH with both a switch and a dimmer type, like this:

Type switch : lr1            [ stateTopic="tuya/bslr_bulb_1/state",
                               commandTopic="tuya/bslr_bulb_1/command", on="ON", off="OFF"]
Type dimmer : lr1dim         [ stateTopic="tuya/bslr_bulb_1/white_brightness_state",
                               commandTopic="tuya/bslr_bulb_1/white_brightness_command", min=0, max=100, step=1 ]

I am trying to figure out how to expose this to Google Assistant so that there is one device with both a switch (ON/OFF) characteristic and a dimmer (0-100%) characteristic.

Right now I just have the dimmer type exposed in my .items file:

Dimmer Dim_LRBulb1 “Dimmer LR Bulb 1 [%d %%]” (gLights1) [“Lighting”] {channel=“mqtt:topic:gcp:other:lr1dim”, ga=“Light”}

When I tell Google to turn it off, it sends brightness=0 (since there is only a dimmer type exposed).

I’ve tried various things, but every thing I try results in two objects in Google Home: one for the switch type and one for the dimmer type.

I know what I want is possible, because when this bulb is exposed through the SmartLife app to GA, I get the correct behavoir (Telling Google to turn off = a command OFF; telling Google to set 50% = brightness command).

Does anyone have any examples of exposing a single device to GA with both characteristics? If you could post config examples, that would help.


You probably shouldn’t tag an item and have meta data for it.

Here is one of my dimmers


    Thing topic Kitchen_Bench_Light "Bench Light" @ "Kitchen" {
        Type dimmer : dimmer  [ stateTopic ="Kitchen_Bench_Light/stat/DIMMER", transformationPattern ="JSONPATH:$.Dimmer", commandTopic ="Kitchen_Bench_Light/cmnd/Dimmer" ]


Dimmer  Kitchen_Bench
        "Kitchen Bench"
        {ga="Light", channel="mqtt:topic:myMQTTBroker:Kitchen_Bench_Light:dimmer"}

Dimmer item and accept on and off commands it depends on how your device requires these commands to be sent.