OK.. for frontdoor you can use conditions parameter with property armed (armed=true or armed=false): Please login or register to see this code. Please replace <devList> and <action> according to your needs.   Now regarding kitchen lights, if I understand correctly you want to turn ON kitchen and pelmet lights for 10 minutes (if no one presents) during one hour before sunset till sunrise. If so, then use : Please login or register to see this code. Please defined ktnMS as kitchen s