Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Door sensor to turn on / off lights #22

Open
gogui63 opened this issue Feb 9, 2020 · 5 comments · May be fixed by #109
Open

[Enhancement] Door sensor to turn on / off lights #22

gogui63 opened this issue Feb 9, 2020 · 5 comments · May be fixed by #109
Assignees
Labels
enhancement New feature or request

Comments

@gogui63
Copy link

gogui63 commented Feb 9, 2020

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

@benleb benleb added the enhancement New feature or request label Feb 9, 2020
@benleb
Copy link
Owner

benleb commented Feb 9, 2020

nice idea :D added to my todo list :)

@accessone67
Copy link

accessone67 commented Oct 29, 2020

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

@benleb benleb self-assigned this Oct 30, 2020
@tomduijf
Copy link

tomduijf commented Dec 7, 2020

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.

@lpt2007
Copy link

lpt2007 commented Mar 20, 2022

+1 vote to this :)

@mycanaletto
Copy link

+1

@evildad evildad linked a pull request Apr 25, 2023 that will close this issue
@evildad evildad linked a pull request Apr 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants