Remember the days when going on holiday involved setting up lots of timer switches on your lights so the burglars didn't realise you were away?
You can do this faster and better with your SwitchThat One! Let's get started by setting up some Advanced Interactions.
We'll try four different things:
- Having lights switching on and off at random
- Having lights switch on and off at specific times
- Have a light come on in the evening
- Limit random lights to certain times
For this we'll use the Random number generator in the 'If this' section:
and then in the 'Then that' we can just toggle the state of the light:
Pretty simple eh? You may might be experiment with the 'If this' numbers to tune the frequency of changes.
There are a number of ways you may choose to do this, depending on how many times a day you would like your light to change, and how precisely you want it to happen. Here are some suggestions:
For the evening time events we can use the .nighttime? action. To trigger something to happen as it becomes evening we check for nighttime becoming true:
We can also offset the time to make things happen earlier or sooner. Let's say you want to wait until it becomes a little darker:
The 'Then That' part can then turn on the light:
We'll also arrange for the light to turn off again at midnight with another Interaction.
Random On/Off during a time range
One other technique you might find useful is having a light switch on and off randomly during the evening. A rule to randomly switch a light on/off between 7pm and 11pm might look like:
It also makes sense to have another Interaction which ensures the light is switched off at a sensible time, in case it's left switched on by the previous Interaction after 11pm.
As you can see, there are many ways you can tailor the behaviour to fit your requirements perfectly! You might also like to make use of your Sonos to play music at certain times. Of have it play barking sound samples if motion is detected?
It should certainly fool the burglars!