Setup
I have two binary sensors in a room.
Motion Sensor (binary_sensor.motion_sensor)
Camera Motion Sensor (binary_sensor.camera_motion)
What do I want to achieve?
I want a single binary sensor that checks the value of both of the sensors and works as follows -
Motion Sensor (On) + Camera Motion Sensor (ON) = Room Binary Sensor (On)
Motion Sensor (Off) + Camera Motion Sensor (ON) = Room Binary Sensor (Off)
Motion Sensor (On) + Camera Motion Sensor (Off) = Room Binary Sensor (Off)
Also, if Room Binary Sensor is On or Off, I want to set a delay of 5 mins before it changes it’s value.
The goal is to switch off HVAC, Lights, TV if there’s no motion after 5 mins.
A kind gentleman on Reddit helped me create this template
I think there might be some syntax problems including the need to change “state:” to “value_template:”, try something like this (but please note I have not tested it) …