I’m wanting to have the wall switch (light.entryway) override the motion sensor for a longer period of time, at max brightness. Can someone point me in the right direction? I’m not sure what I need to do to make this happen.
The first node change it to a state trigger node which can be enabled/disabled with input payload. So before that trigger node you will have to put a state change node this time with the light on/off. So goes on disables the motion sensor (you need a change node to set the payload disabled) node., light goes off and enables the motion sensor node.
Thanks for the response! I haven’t yet used the trigger node, so it looks like I’ll be leaning it now.
Did you come up with something that works? I feel like mine is overly complex…
I have not, but I have been looking into it, although I am not having much luck.
I’ve been trying to find an event that fired when the switch is manually triggered, but not having much luck unfortunately.
My dimmer manager… Dimmers start at a set brightness every time they are turned on based on a multihour window. This way if its turned on by switch or motion it starts at a predetermined value. Can’t leave it full bright and get blinded at 3am before you can turn it down. you get about a second of blindness at the most before the system sets it to the appropriate time. Motion activation triggers only work in the evening to early morning hours. There are two timers for turn off. Between 10p and 7am it waits 10 minutes. outside that it waits 25 minutes before turning them off. The Motion Allowed are input bools I created to control whether the motion sensors can do anything to the lights. If you know you’ll be sitting in a room and not moving enough to trigger the sensor you can turn that sensor “off” through the HA interface or voice command. Every morning at 6AM the sensors are turned back “on” unless guest mode is on, then we don’t turn them back on at all. Wouldn’t do to have them turn back on when someone is sleeping in a living room or something. The guests kids get the couch when they all come to visit. Parents get the guest bed.
Note my turn off sequence. You could have the motion sensor flow in through the 10m timer and the switch flow in through the 25. I control the 10 or 25 based on time. Motion events reset the Trigger timer.
Im not sure if you can actually get that to work… as the event can’t tell the difference between a programmatic command to turn on the switch (motion sensor or other sources), or the physical switch actuating it. it just knows the state changed to On, not how. so a motion sensor flow resulting in Turn_On or the switch on being pressed result in the same State Changed to ON result.
Anyone know of a way to tell if there is a distinct programmatic or physical state change detection ability in NR?
Smartthings Webcore had it so the capability should be there for HA and NR to detect. Just has to be programmed for in HA and NR.
Look at the context property of the event object. You can tell what user triggered the event and depending on the device it will show, null
, if it was physically switched.
That’ll help OP with his switch override.
Thanks Kermit.
Op to ensure you get the proper status message use a debug node, set it to complete message object. trigger it both by the HMI and the physical switch. Look for what is different and you can use that to determine if it wsa the local switch and run a longer timer. I can look at it tomorrow but now I crash. I need this myself to clean up my flows so motion and physical switch are looked at differently. currently with mine… motion triggers and turns on the light which then updates the even node for the light going to on and runs again… happens so quick nothign is really an issue but if I ever want to route and monitor commands differemtly I need to fix it up. I don’t really care to differentiate between motion sensor and switch turning on the light for initial brightness or on time. That is based on time of day for me.
Here’s my solution:
I use an input_boolean to be able to disable motion detection lighting in all of my motion zones. This is the one in the green box. If it is off, nothing happens upon detection of motion. Then I’ve added the same boolean as a condition before sending the off command in the red box. The magic is that I’ve set the buttons on the dining room switch to turn this boolean off whenever it’s used to turn on the lights. Thus, none of the auto flows for turning the lights on or off can continue. Finally, the flow in yellow waits for the dining room lights to be turned off to re-enable the motion detection boolean so that it can operate as expected. In order to get this working well with my Google Homes, I’ve added a condition at the very front so that if voice is used to turn on the lights, they don’t get turned off.