Setting Hue and Saturation in Rule Machine

I have a couple of light devices that have, among others, attributes of Hue and Saturation. In the Rule Machine for an routine I am tinkering with, I am trying to set the Hue and Saturation to 100, but I can't figure out where to do that. I seem to be able to set the Dim level and set the Color, but not the Hue or Saturation. What am I missing? Where can I do that?

Hue and saturation are part of color (the other component being level, as it's called here, though it's technically brightness/value in the HSB/HSV color model, not HSL). So, the easiest way is just to set color unless you have a reason to only work with these two attributes individually. Using "Custom HSB Color" will let you set them all, or you can choose a predefined color (results may vary based on bulb--these all are just HSB values from the app, not anything the specific bulb driver "knows" about a color name) or RGB if preferred.

If you really do just want to set each on its own, you'll need a custom action. That's under Set Variable, Mode, or File > Run Custom Action. Choose setSaturation() or setHue() after choosing any capability your device supports (per the UI prompt), then provide a single numeric parameter with the desired value.

Also, not sure what your goal is with this automation, but if it's looping through colors, consider the new Color Animation app.

I will go back to the Rule Machine and try doing what your second paragraph suggest; couldn't see it the first few passes through.

My application is this: I have two Sengled lights (one bulb and one string light) that are installed at the top of my foyer. The foyer includes stairs from the ground floor to the second floor. There are sensors on the ground floor and on the second floor that detect motion when approaching the stairs from either floor. From sunset until 10pm, motion turns on the lights white at 100% intensity. That's one app. A second app operates from 10pm until sunrise. Since red is easier on the night vision, I set the intensity to 30% and the color to red when motion is detected during that time. I have a simple automation rule for each of these, but with the red light one, sometimes the hue and saturation are set to zero and the color comes out white even when color is set to red unless the hue and saturation are set to 100. To fix the problem I have to go to the device itself and manually set the Hue and Saturation. So it's probably just a problem with the Simple Automation Rule. You're probably right that the Rule Machine will work fine without messing with the Hue and Saturation, but I haven't tried it with an extended test yet.

I have finally paid more attention to detail when following your instructions and have now updated my rule to include the Saturation and Hue actions. The use of only Pick Color or Set a predefined color did not consistently work with the proper saturations and hues. I haven't yet done a reliability test over the next few nights, but am going to mark your suggestion as the "Solution."

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.