Automate the Near smart lights to switch on when your door opens with the following steps:
Step 1: Tap on the "Smart" icon, then the "Plus" icon on the top right-hand corner of the automation screen.
Step 2: Tap on "When device status change"
Step 3: Tap on "Door Sensor"
Step 4: Tap on "Door Sensor" and Check "Open".
Step 5: After the condition is set, tap on "Run the device".
Step 6: Tap on the Near smart device you'd like to control. In this case, it is the Near smart lighting group.
Step 7: Check the "ON" setting so that when the door opens, your lights get switched on.
Step 8: Finally, Rename this automation, select an appropriate icon colour, effective period and tap on "Save".
And you're set!