IF dog is home alone THEN action

Maybe you can use something similar to this?