I am looking for an idea how to implement automatic control of bathroom lighting in a TUYA system using a door opening sensor and a motion sensor.
Principles:
1. After opening the door, the light turns on.
2. The door closes - the light is on.
3.
a) If within e.g. 15 seconds after closing the door no one moves, the light goes out.
b) If within the above time someone moves, the light remains on without time limit.
4. Opening the door causes a return to pt. 1.
How does this work? In short: if the motion detector detects movement when the door is closed, it means that for sure until the door is opened someone is there.
Does anyone have an idea how to implement this in TUYA? Is it possible to do this without HA?
Principles:
1. After opening the door, the light turns on.
2. The door closes - the light is on.
3.
a) If within e.g. 15 seconds after closing the door no one moves, the light goes out.
b) If within the above time someone moves, the light remains on without time limit.
4. Opening the door causes a return to pt. 1.
How does this work? In short: if the motion detector detects movement when the door is closed, it means that for sure until the door is opened someone is there.
Does anyone have an idea how to implement this in TUYA? Is it possible to do this without HA?