Is there a better way to manage states, like 'home', 'away', 'school holiday'?

To represent these states I prefer to use Switches which get set to ON when in that state and OFF when not in that state. In rules that care about the state they check the Switches and do the desired behavior. Some rules also get triggered when the Switch changes state.

For an example of how Holidays can be tracked see this example on the wiki for calculating public holidays.

See this posting I made for how I keep track of times of day which you can expand to track types of days.

As for detecting presence there are almost as many approaches as there are people. Some people use OwnTracks andthe Mqttitude binding, some use IFTTT, I use network health and some bluetooth scanning scripts, some rely on the Nest, others use motion sensors.

1 Like