#Bedroom lighting with PRI sensor at night

1 messages · Page 1 of 1 (latest)

civic otter
#

I'm trying to work out how everyone handles using a PIR/presence sensor in a bedroom to turn the light on but not have it turn them on at night when in bed. Or when someone doesn't want the light on and is happy with the natural light.

Could you do something like this?

Sensor turns on the light and the user then uses a smart light switch/panel to turn off the light when they want to go to sleep. This also then disables the sensor so it doesn't turn the light back on until the user then manually turns them back on with the smart switch/panel. This then enables the sensor to work again.

Is this possible or am i over thinking this?

nimble viper
#

I do something similar in other rooms with a template filter. Basically the mmWave sensor turns the lights on or off with presence, but if someone turns the light on or off manually in HA it disables the mmWave sensor for a set period of time (depends on the room).

So I end up with two automations. One where the mmWave sensor controls on and off and another that disables and reenables the 1st automation when the light is manually controlled.

civic otter
nimble viper
#

I'll share my automation YAML code for you to look at, give me a couple minutes

#

Alright, here you go:

Here is the YAML for the automation that uses the mmWave sensor to turn the lights on/off automatically. You'll notice I have different on actions for different times of the day (brightness and color mostly). https://dpaste.org/gfWX6

Here is the YAML for the automation that disables the 1st automation if the lights are manually turned on or off. https://dpaste.org/veMv8 (ignore anything related to guest room in this automation). The template filter is used in this automation.

civic otter
rough tusk
#

Simple answer would be to put the sensor below the level of the bed.

In my case, this isn't connected to HA, it's just a rechargeable striplight with a built in PIR sensor. So it was easy to move it around and find a place where it only detects me when I am out of bed.

I've done something more complicated in the kitchen, where I need the light to stay on when not moving. The door is usually open. There was no place I could put a presence sensor which would detect me as I walk through the door but not either detect me when I walk past the door, or leave a blind spot where the lights would go out if I stood still.

Solution there was to position the presence sensor so it doesn't cover the door. Then add a cheap PIR behind the door, angled not to beam through the doorway. That is programmed to turn the light on before the presence sensor detects me, but not to turn it off.

civic otter
#

What I think could be a good idea also would be to able to disable the sensor with a command like “Alexa bedtime” where this could do a few things like close the blind, turn off any music and disable any lighting sensors until maybe the “Alexa wake up” or similar is issued. Anyone do anything like this before?

sly stag
#

I have a massive "good night" automation that triggers when I am in bed for 1.5 minutes. I have it set a single input_boolean (input_boolean.good_night_mode) and I use that as conditions in my automations. That way, if it's on, motion automations won't run (or run in an alternate mode).

civic otter
sly stag
#

I have a condition in my automation that only allows it to fire during "night time" and "normal bedtime hours" (which is currently 21:00-:23:50).

#

During the day, that toggles "nap mode" which only affects the bedroom and closes the curtains, sets the fan to high and turns off the motion sensing. Then it starts a timer for 2 hours and at the end of 2 hours it reverts back to "normal" mode.

civic otter
#

the problem is that having set times arent flexible enough.. id still prefer to be able to just disable the sensors firing via a voice command.

sly stag
#

So create an input_boolean helper, expose that to your voice assistant and create a routine there to turn it on/off from there and then use that boolean as a condition in your automations.

#

You also don't need to have set times. You could create something more flexible.

spare garnet
#

In addition to the good suggestions above, I'll share another approach. I have LED lights in the closets that go on when the closet doors are opened. No rocket science there, but the conditions that set their brightness include whether it is past the golden hour (I'm doing this in Node Red) and checking if the main room lights are on. So, if I get home late and my spouse is already asleep, I can still see some in the closets, but they won't be so bright as to wake her up.

#

I realize that's not your specific use case, but perhaps it triggers(pun intended) some ideas for you.
Also use a binary helper as others have described to keep lights on to override automations, and that's controlled easily by voice.