Beginner's guide for variables for non-coders?

So I just signed up for premium because I’m trying to create rules/automations without my phone, and now I am WAY over my head. :frowning:

I’m tech savvy but not a coder, and all I want to do is make an automation, and ones like it, to turn lights on (Philips Hue specifically):

  1. 30 min before sunset (I got that part down!)
  2. Set to a certain color temperature
  3. Set to a certain dimming level
  4. Turn off an hour after sunrise

When trying to do 2 or 3, my head blows up because I don’t know what to do to create variables or utilize them. Any help would be really appreciated! :slight_smile:

You don’t need variables to do that, when you select your device that you want to control, you can set level for dimming.
To turn off lights an hour after sunset, that’s a trigger and works the same way as how you turned them on.

For setting a color, you may have to flip on the Advanced Toggle and switch the input type to Color if it isn’t selected automatically.

For setting color temperature, you can use the setColorTemperature() command on your bulb or light to set your preferred color temperature (in Kelvin).

Similar to the above options, you can use the setLevel() command to set the dimming level of your devices…

As noted in the informational notice that comes up, you may want to remove the second parameter. Some devices report that they want a second parameter (the duration to dim over), but don’t work when that parameter is included. :thinking::upside_down_face:

You should be able to use the same approach as you discovered in item 1.

Edit: We pushed an update the resolves the two annoyances with setColor and setLevel that were mentioned above. Refresh the page in your browser while viewing a rule and it should pull in the update. The system will not automatically perform the adjustments shown in the video for you (eg. set the type to color and remove the second setLevel parameter)