ad-automoli icon indicating copy to clipboard operation
ad-automoli copied to clipboard

[Enhancement] Door sensor to turn on / off lights

Open gogui63 opened this issue 5 years ago • 5 comments

Like humidity sensor for "shower time" could you add door sensor to keep light on when door sensor state is close and turn off when door is open ?

My case is for toilets : I go in the toilet, motion detector turn light on if door_sensor is close within 10 seconds => disable motion sensor until I open door and then when door is opened , turn off light because i leave toilets. And finally, activate again motion sensor.

So two cases :

  • Go to the toilet (don't close the door), i'm going to pee, work as usual with motion detector
  • Go to the toilet (turn on light by motion sensor) , close the door, stay here for some time 💩 and turn off light when I leave toilets by opening the door

To achieve it, add two fields :

  • timeout -> time to disable motion sensor, after motion sensor is reactivated
  • door : entity to disable motion sensor and maintain light on

Exemple config :

auto_lights_wc: module: automoli class: AutoMoLi room: wc delay: 180 timeout: 500 daytimes: - { starttime: "00:01", name: night, light: 10 } - { starttime: "05:30", name: morning, light: 45 } - { starttime: "07:30", name: day, light: 255 } - { starttime: "22:30", name: evening, light: 150 } - { starttime: "23:30", name: night, light: 80 } lights: - light.wc motion: - binary_sensor.motion_sensor_wc door: - binary_sensor.door_wc

gogui63 avatar Feb 09 '20 16:02 gogui63

nice idea :D added to my todo list :)

benleb avatar Feb 09 '20 17:02 benleb

I wold also like to request this future. I have PIR sensor in hallway and If I'm coming come and open front door I always have to move to my PIR sensor to activate the light. It wold be really good if I open the door then it wold trigger the light on if the lux level is right..

right now it does not work like this way.. I have tryed this but no success motion: # Hallway PIR - binary_sensor.motion_sensor_158d0002b431d9 # front door - binary_sensor.door_window_sensor_158d00026af02c

accessone67 avatar Oct 29 '20 20:10 accessone67

Hi

Just to give a +1 vote to this :)

Implementation-wise, a separate door-sensor context would work. Another option would be to extend the motion context and allow the motion_state_on/off setting per motion entity.
This way you could add various types of binary sensor.

tomduijf avatar Dec 07 '20 20:12 tomduijf

+1 vote to this :)

lpt2007 avatar Mar 20 '22 16:03 lpt2007

+1

mycanaletto avatar Oct 19 '22 20:10 mycanaletto