I’ve just started with automation and I’m not able to get this to work -
Switch off a smart plug if no motion is detected for 5 minutes. If the switch is turned on manually, the automation should work again (Meaning if there’s no motion for 5 minutes, switch off the smart plug)
Smart Plug - Tuya
Motion Sensor - Aqara Motion Sensor
Trigger: platform: device type: turned_on device_id: 41952b506d8c400e82a3f65b100378f4 entity_id: switch.bf57555ad780d86beb4h8c domain: switch Condition: type: is_not_occupied condition: device device_id: c202635d1d9544629fa7e2e8afbb565a entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_fc011b03_occupancy domain: binary_sensor for: hours: 0 minutes: 5 seconds: 0 Action: type: turn_off device_id: 41952b506d8c400e82a3f65b100378f4 entity_id: switch.bf57555ad780d86beb4h8c domain: switch
I’ve tried to make it work but HA does not execute it. When I manually execute the automation, the switch turns off.