Good day all! I took the plunge last week. I learned about OpenHAB 2 weeks ago - went a little crazy on Amazon and spent this weekend installing all my new goodies! Glad to be part of the wonderful world of HA (and the stress/frustration/joy of configuring)
I have a bunch of Zwave Dimmers installed as well as a Hue Hub 2 with 3 bulbs. I have a basic setup going really well including individual and group control. What I have been searching for, and I am sure its posted out there I’m just overwhelmed with open tabs and browser windows as references to everything I am doing but I want to do is make an option to setup 3 presets (or scenes as I see it called).
Quite “simply” I want to to have these 3 options/scenes in my App"
Downstairs [ON] [OFF] [MOVIE]
All On = All Zwave Dimmers = 100% and 1 Zwave Outlet = on
All Off = All Zwave Dimmers = 0% and 1 Zwave Outlet = off
(I have 1 and 2 working just fine, somehow!)
the Third option is where I am lost:
Movie = All Zwave Dimmers = 30% and 1 Zwave Outlet = off
My way of doing it would be to create a switch with multiple mappings to your desired states. Then create a rule that reacts to said switch states:
Switch item=SW_Lights label="Light Scenes" mappings=[0="off", 1="on", 2="Movie"]
rule "downstairs lights"
when
Item SW_Lights changed
then
switch SW_Lights.state { //select case statement
case 0 : {
//turn off your lights
}
case 1 : {
//turn on your lights
}
case 2 : {
//turn on lights to 30%
}
}
end
Just put your commands to set the lights at the various states. You could also create a group of the lights and send the command to the group to save code.
Awesome! Thank you - worked like a charm. Here is a sample of how I did it in case anyone wants to see it (I used just a few items - I have a very open layout with other devices that I have not yet included but this get the job done perfectly!)