I am waiting on items to arrive and am traveling so can’t test properly so would love your thoughts on this plan.
Using Lifx bulbs, I want to have a wall switch that can control both brightness and color temp. separately. For example, set color temp to 5600 and then move through a range of brightness settings. Or, set the brightness where I want it and toggle through a range of color temp settings.
I don’t think you would necessarily need the ABC to control brightness settings; my lighting controller (Use Switches to set Lighting Scenes, Colors, Color Temperature/dimming) can take care of that aspect for you too. It may be a little bit messy because there is a limit of I think 5 scenes per instance of my SmartApp (that limit could be increased, but I wanted to keep the app rather tidy and my poor coding skills mean I have to write a section for each new possible scene).
What I would do is set up two instances of my SmartApp; call one ‘Brightness Control’ and the other ‘Color Temp Control.’ Attach the first instance to the short press switches and set your brightness settings (leave the color temp blank so it doesn’t set it at all) and then attach the second instance to the long press buttons and put in your color temp settings (and leave the brightness blank). That should allow you to control the brightness and color temp independently.
I don’t see any issue with what you’re proposing. Let me know if you have any questions or problems with my app; I can make changes to make it work for your use case if there’s something that isn’t working right.
Thank you for your reply! I was able to do some testing last night:
The device handler for my remote shows it as a button remote and not a switch. So, I was able to modify your code to allow for the selection of a button remote type but it does not see the individual buttons and thus does not respond to the button/ switch being activated.
This may be a silly workaround but I created a simulated switch and then used ABC to associate the appropriate button to toggle on the simulated switch and then in your program use the simulated switch to activate the settings I want. It worked but I did not have time to test more. I think there may be some issues with needing to make sure the other simulated switches get turned off when selecting a different switch (ie going through the brightness ranges would activate all 4 switches).
Hope this makes sense, def. welcome any feedback or advice to make it work better.
So I just went and did a quick-and-dirty recode of my App to accept a button instead of a switch. The main difference is that now it asks ‘Short press?’ as a true/false value when you’re setting it up; if you want a scene to be attached to that button’s short press, leave it true; if you want it attached that button’s long press, set it to false.
I tested it with a simulated button (as I don’t have any buttons on my hub) and my color temp bulbs at home and it worked great on both short and long press, but I only tried with 2 scenes.
Give this version a try and let me know how it goes!
Sorry for the double post. Testing remotely, I realize that there is not a way to assign a specific button on the remote to trigger the scene (ie button #1 for 3200, #2 for 4000, etc.) Am I missing something obvious? (probably am).
The workaround of using advanced button control to trigger a virtual single channel switch/ button is the only thing I can think of to make it work.
Thank you again for your help and sorry if I am overlooking something obvious.
I don’t understand the problem. On the first setup page, set it for four scenes. When it asks you to set up scene 1, choose your first button (short press), and set your brightness level; leave color temp blank. Second scene, choose second button, brightness level, no color temp; etc through to all four buttons. On the last page name it ‘brightness control’ or something like that. Then add the smart app again; set it for four scenes. On the first scene, choose the button, set it for long press, put in the color temp value you want, and leave brightness blank. Scene two, button two, long press, color temp, brightness blank; etc all the way through. On the last page name it ‘color temp control.’ That should cover what you’re trying to do.
Let me know if there’s something that I’m missing.