Best practise regarding rules

You have to balance between two competing needs.

  1. Rules should be short, easy to read and easy to understand.

  2. Rule should run as fast as possible and you should have as few running at the same time as possible (see (OH 1.x and OH 2.x Rules DSL only] Why have my Rules stopped running? Why Thread::sleep is a bad idea)

:+1 Writing Rules is a journey. It’s always worth revisiting Rules when you learn something new.

It depends on the extent of the changes that take place when you come home or leave. If they are completely different I’d probably use two separate Rules. If they are largely the same with the differences being what commands get sent to the same Items, I’d do it in one Rule using Design Pattern: How to Structure a Rule.

If I have more than a couple of states (more than just home/away) and what is done in each state is pretty different, I’d use A simple scene management: finally a good use of scripts.