When switch manually set off then light automation does not work

When I switch manually the switch off then light automation does not work presence not recognized. Takes some minutes until motion sensor is starting light again

I have following light autom setting

device setting


motion sensor
Xiaomi Motion Sensor RTCGQ11LM
Aqara site: link 10
Manual: link 9

Maybe i need and automation
light switch then do something with motion sensor?
if yes how to include in above automation?

Hm needed tro create second automation fi switch is off:
Then it works but is this not realizable in one automation?

First automation

In your first Room Lighting, under "use turn off alternative", put the light switch there. This way, if you turn off the switch manually, it will also turn off Room Lighting.


Did you mean to say put the light switch under "Means to Turn Off Lights"?

No. In Turn Off Light Options, there is a setting for "Select Switches that determine all lights are off" which is where the OP should put the light switch being controlled by Room Lighting. If the switch was put as a Means to turn Off, Room Lighting would send an OFF command to the switch in question. It would work, but send an unnecessary command to a switch that we already know is off.

From the documentation (Room Lighting | Hubitat Documentation):

Switches that determine all Lights are off

For some automations, especially those that either don't turn off the lights, or that entail using buttons to Activate and Turn Off the lights (e.g. Lutron systems), it may be necessary to choose those devices that determine that the automation is no longer Activated.

Basically, we are telling Room Lighting that this instance needs to turn off without sending an OFF command. It's primarily designed for scenes or buttons, but also works with manual control.

1 Like

get it working like this

That’s a hack that will only work if the disable command comes before the re-enabled. If for whatever reason, your commands show up in opposite order, Room Lighting won’t work. Just follow the advice given and you won’t need to resort to this.

What do you mean in my screenshot above the disable comes first then re-enable. What should I change?
Sorry I am new to hubitat and the automation game and find it super confusing/complex.

Do you mean like this?

That’s exactly what should be use. With that setting, you’ll automatically turn off Room Lighting any time you manually turn off the switch.

1 Like

No worries on being new. We have all been there. I did want to expand slightly to better help your understanding. The disable and re-enable are designed to prevent Room Lighting from turning off. Think of it this way, say you had guests over and you did not want this light to turn off when the motion sensor went inactive and stayed for 3 minutes. You could flip a virtual switch on to disable the off in Room Lighting while they were there. Once your guests leave, you could turn off the virtual switch, which would allow for the motion inactive to work again. The light could still be controlled manually, but the motion inactivation would no longer work.

With the way you now have it setup, whenever the light turns off manually, you are telling Room Lighting to also turn off. In other words, Room Lighting does not need to worry about Motion inactive since the light is already off. Motion active can still turn the light back on as normal.

1 Like