Has Motion Lighting changed?

It's late and I'm tired...and I had an automation that used motion lightening and rule machine to do the following
So when motion is detected and it's within those parameters of modes, then turn lights on, but then I had a section to say if the TV is on then disable turning off and also a switch to turn off lights.

I then had a rule machine to turn off the virtual switch when the lamps (side lights) turn on.

for whatever reason I deleted my groups (by mistake) and it messed up some rules, so I recreated them from screenshots I'd taken and it no longer works. Lounge Lights turn on and stay on if TV is on (which is good), but when the lamps turn on the lounge lights stay on...Now if I remove the 'Disable off turning off' option it works again, but I had it exactly he same as before.

Edit: I used to have this as a single rule in rule machine, but I kept wanting to mess with it, so moved it to motion.

These rules are confusing the hell out of me. :slight_smile:

What is your goal? Lamps turn on disable motion lighting, and turn it off?

Just set it to not turn on or off if side lights are on and use a rule machine to turn the lounge light off or on.

Trigger side lights change

If side lights turn on and lunge Light is on,
Turn off lounge lights
Else if side lights are off and lounge light is off
Turn on lounge light

Thanks @mik3 I will explain what I am trying to do. I don't think it's complex I think I am over thinking it.

  1. Motion starts within a certain mode then turn on Lounge Lights
  2. Turn off lounge lights after a certain time when motion stops
  3. Turn off lounge lights and disable motion
    2a Unless Lounge TV is on, then don't turn lights off
    2b Unless turned on manually with voice assistant
  4. Turn off Lounge Lights when Lounge Lamps (side lights) turn on and disable the ability for lounge lights to turn on
  5. Turn on lounge lights when Lounge Lamps turn off (and motion is active and Lounge Lights have not been turned off manually)
  6. If TV turns off off then enable the ability for motion lighting again (so follows normal rules in 1 and 2)
  7. If TV is off and motion is not active then turn off lights (delayed by 5 minutes) unless motion becomes active again.

I think that's it for now

I think this would be best built out using RM rules.

Something like this...

Rule 1

Trigger:

Motion Sensor Change

Action:

IF Motion Active and Mode is Day, Evening, Night, and Lounge Lights are Off THEN
Turn On Lounge Lights

Else IF Motion is Inactive and Mode is Day, Evening, Night, and Lounge Lights are ON and TV Virtual Switch is Off THEN
Turn Off Lounge Lights Delay 5 minutes (Cancelable)

Else

Cancel Delayed Actions

END IF


RULE 2

Trigger:

Lamp Lights change

Action:

If Lamps turn ON and Lounge Lights are ON THEN
Turn Off Lounge Lights
Else
Turn On Lounge Lights
End IF

Rule 3

Trigger:

If Power switch TV Changes

Action:

If power switch >= 10 THEN
Turn on TV Virtual Switch
Else
Turn Off TV Virtual Switch
End If

1 Like

Should the first rule, be "if lounge lamps are off, then on lounge lights?" I'll have a go later.

Correct it, add to it, remove stuff. But something like this should land at your target need.

1 Like