Lighting Per Mode

Hi,
I currently have a setup in which my living room lights are turned on/off via a switch. Now I'm trying to set my lights to change bulb temperature/level automatically per mode (Day, Night, Evening, Away).

I already set modes via mode manager and now I'm trying to figure out how to incorporate it in my setup. Any tips on where to start?

https://docs.hubitat.com/index.php?title=Motion_and_Mode_Lighting_Apps

Thanks. Question - Is there a way to toggle a button to turn on/off the lights? Cause I don't see that option

In the manual there's a toggle option with "Creating a Motion Lighting App", but I don't see it on "Creating a Mode Lighting App"

I'm not sure what you are trying to do. I understood that you wanted the lights to change by mode. That's what the Mode Lighting App does.

Please explain exactly what you want to do. See also the "Options for Lights On" and "Options for Lights Off" at the end of the Mode Lighting App documentation.

Attached screenshot of the setup

Currently I added button 1 to turn on the light and button 2 to turn them off.
My question is: Is there a way to toggle Button 1 for a turn on/off command so I would free up button 2?

I’ll have to admit that I have only done simple things with Mode Lighting (I usually use Rules), but I can imagine a way to do what you seem to be trying to do. The key is to realize that Mode Lighting doesn’t do any turn on/off unless you put something for turning lights on/off as you have done with the buttons; it otherwise just sets levels and color.

So, augment what you have with a simple rule. Delete the button 1 & 2 for on/off in Mode Lighting.

Then, define a rule:

Trigger: Button 1 pushed

Action: Toggle (your list of lights).

That should be it.

Thanks. This indeed worked but I'm not sure that the mode are working with this solution. I just manually changed the mode from night to day. Afterwards I tried to toggle the lights and they stayed at night light.

I expect this is what you are after. I use it in my motion lighting setup.

image

Also, if it behaves like the Motion Lighting App, which I expect it will, then the same options I have for manual control will probably apply as well. Typing a name in the Google / Alexa box automatically creates a virtual device for you with that name.

1 Like

Amazing! Thanks for your help :slight_smile:

1 Like

So It seems that the lights are turning on automatically when the modes change. Any idea how to stop it?

That's where the options from my screenshot come in. You can define a switch to stop the lights turning on, which you could control either through a rule or manual control.

If your talking about the "Switch to disable on Kitchen..." - This is in the Motion app and I'm in the Mode app. I don't see a same features on the Mode app

here is one of my rules using the standard motion lighting app..

Thanks kahn-hubitat
I'm sorry if I'm slow to understand this issue but my problem is with the mode lightning section and not the Motions section.

In the mode section, I made a rule that the temperature/level of my living room lights will change by mode, but I don't want them to turn on automatically. I set up a button on my Harmony Elite so that I could turn them off/on whenever I like and it works great. My problem now is that the lights are turning on automatically when modes throughout the day change. For example, the lights turned on today at 7AM.

I want to avoid this situation and make it so that the harmony button will be the only one that turns the lights on/off, and for the modes to continue and change (Not Turn on) automatically throughout the day.

Sorry, my bad for not checking that

Then you would just use normal rule machine

Trigger: switch changed

Action

If switch off then light off

Else

If mode = x
Then turn.on light and set color brightness etc
Else if mode y
Then turn on light and set with other color brightness etc

End if
End if

@sgrimbl , you have to tell the Mode lighting app what buttons or switches turn the lights on and off. That’s how it knows what state the lights are in, and also why there is an Alexa dimmer option for using with voice assistants. The other option is to enable “color prestaging” in the device drivers if it’s an option for the devices you are controlling.
The devices are being turned on by the CT and level commands being sent at mode change. Mode lighting will wait for a switch or button command before setting the lights if it thinks the lights are off.
FYI, Motion Lighting works the same way, but isn’t as obvious depending on the setup.

I took my mode lighting a different direction. I set three hub variables for color, level, and duration. I can then apply these to any lighting automations I want. First I set the values based on mode:

image

These values are used in my lighting rules. Here is my current living room controller:

The nice thing is that if I decide to make a change to a value I only have to change it in one place and it gets used throughout the house. For example, the evening color temperature was originally set to 2700. I changed it to 4000 and didn't have to touch any of the individual lighting rules.

The duration is something I'm experimenting with. Some rooms will eventually have some special overrides and I'll be adding some more modes (theater, party).

Finally, individual rooms might not use all of the values.

image

In the master bath the color temperature is always 2700 but the level follows the mode variable. Also the timeout for turning off the light is different. When the mode is bedtime the light will turn off immediately when the motion detector reports no motion. Other times of the day it will turn off 90 seconds after no motion. I still have to add in the contact sensor. When the contact sensor is closed the light won't turn off. It is assumed that somebody is in the bathroom and you don't want the light to go out.

So while it gives me a central location to set the general lighting it is still flexible enough to customize a given room.

There are many ways to accomplish things with HE. :slight_smile: