Step 11: Automation

So, you finally have all the building blocks for automation: a sensor to activate a switch or set of switches.

The original initial goal of this blog was to setup a cloud free home automation system, this got extended with the ability to control the lights a house without ever manually having to switch them on or off.

This is starting to be achievable! If you only have the one sensor then you will only be able to control one room, but the principles will be exactly the same.

There are example automation scripts that can do this, but lets build our own simple one. Please bear in mind that the setup described will only work with one actor i.e. one person within the home.

First you’ll need to start a new automation script via the big plus button within the automation configuration section.

Configuration -> Automations -> +

Give it a suitable name like “lounge lights” or whatever is appropriate, and set the motion sensor as a trigger event and then add a condition on the sensors luminance to ensure it is dark enough to warrant triggering the lights.

Then add all the light switches/devices that you want to turn off – such as all the ones outside of the room where the motion sensor for the trigger is – and then also add the lights switches/devices that you want to turn on as actions at the bottom of the automation screen.

Another option here is to call the scene.turn_on service and have a scene setup with the lights you want turning on. Unfortunately with this setup you do not want to simply create an all lights off scene and add that too as every-time motion is detected all the lights will turn off then the ones you want on will turn back on, so you want to set it as described to stop potential light flickering or make a collection of scenes – one for each room to control.

There are tons more automations capable and there will be a couple more covered in this stride, but first you will need to be able to access your system via the mobile app out and about for some real fun…

Next: Step 12: External