Emit color change not reacting to hue or saturation = 0

I am trying to refresh the current Color state of my custom bulb on the hub. But as soon as one of the 2 values hue or saturation hit 0 the color inside the app doesnt update anymore.

Main Cases in which this happenes:

  • Refreshing on Color White (sat=0)
  • Refreshing on Color Red (hue=0)

It gets close to the color if 1 is used instead. I think this is caused by an API Bug.

Anyone else struggeling with this Problem?

Welcome to the SmartThings Community, @BumBumGame!

Can you provide more details, please?

Do you mean you’re sending a command through the API to change the value in Hue and Saturation?

If you select the colors white or red in the app, does it update correctly? Which values are set in the device status?

No. I am emitting an Event for a Hue and Saturation Change, to update the UI values:

device:emit_event(capabilities.colorControl.saturation(sat))
device:emit_event(capabilities.colorControl.hue(hue))

This works fine, until ‘sat’ or ‘hue’ are 0 (for either Color white or red) in which case the UI doesnt refresh at all (it still shows the previous Color) even though the code is being executed. I logged the variables at runtime and their values were correct.

Yes. Selecting the Colors works fine and the correct Values are sent to the device. Important to mention here, is that the UI doesnt update as well if a color with ‘sat’ or ‘hue’ = 0 is chosen. Even though I use the arguments that I get from the handler-Function directly to emit the event without changing them.

I haven’t checked yet. Since the UI still doesnt refresh after an app restart I presume that the device Status doesnt change as well. But I will check it later today.

I have not been struggling with the problem but I did test a virtual device with the Android app. Twice. Yesterday I couldn’t see the problem for looking, probably because I never use coloured lights. Today it was obvious.

What I see is that under the hood everything seems to be working correctly. The app sends the correct colour control command to the driver which emits the correct event and the status is updated correctly.

The app is not so clever though. The coloured stadium/sausage that should show the current colour does not update when the hue or saturation is zero.

So at the moment I have yellow, magenta, red and white in my recently used colours. If I tap on yellow or magenta the current colour is updated. If I tap on red (hue 0) or white (saturation 0) it doesn’t. The actual device status is updated correctly though. So for me this is an app/plugin bug.

“Struggling” was probably a strong word for this. :sweat_smile:

Can confirm. I just checked the device state and there its updated correctly. Thanks for noticing.

Is there are way we can report app Bugs?

Well we can ask @nayelyz if this falls within her territory for making a report. If it doesn’t she will point you at the general support.

Thanks for the extra info, @orangebucket

I was able to replicate the issue only on a device that has Android version 12. It seems in newer Android versions, this tile has some changes, here also colorControl and colorTemperature get combined into a single tile. This doesn’t happen on Android 9 for example.
So, I’ll report this issue to the corresponding team.

I just tried a Galaxy running Android 11. I created a red (hue 0), white (sat 0) and a couple of others. This time the ‘couple of others’ still worked, the red didn’t result in a change and the white changed the colour to blue, the blue having been the colour that was showing before I created the four colours.