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.
Thanks!