Skip to content

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

@gogui63

Description

@gogui63

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions