You only need lights when it is dark and there somebody in the room to use it. Both conditions are easy to automate. With the price of motion sensors and smart lights, there are no reasons we need to use the switches anymore.
This routine is part of the Automation Bank, a community-driven list of over 50 practical automation ideas for your smart home. Read more about Automation Bank or search ideas by room, by device or by use case. Also, have a look at best home automation ideas as voted by our users.
We believe that light automation is one of the first things you need to do for your house and below is the guide on how to do that.
How Does It Work?
- There are two ways you can smarten your lights.
- Install a smart switch. The benefit of this is that you will save on the bulb costs and nobody will accidentally switch off the dumb lights. Cons is that you cannot control the color/brightness and so on. You also need a neutral line in the box with your switch.
- Install a smart bulb. The cons are that it is usually more expensive and somebody can switch off the smart lights using a dumb switch.
- Another important element is the motion sensor.
- Make sure that you install it in the right spot to cover the whole of the room and also avoid false triggers
- Make sure that your motion sensor will also have a luminance sensor. It will allow you to also detect when it is dark enough in the room to switch on the lights. You can rely on time, but the luminance sensor is a much more reliable approach.
What Do You Need?
| Device | Our Recommendation | Price |
|---|---|---|
|
IR hub |
|
$44.99 |
|
Comms Sticks - give Zwave/Zigbee connectivity to your hub |
|
$60.50 or $35.25 |
|
Home Assistant Server - a smart hub to run your automations |
|
Price not available or $410.00 |
RF hubRF bridge that emulates your Remote |
|
$20 - $30 |
Shut off valveA valve that will close and open water supply
|
|
$99 - $400 |
Door/Window SensorReports if a door or window is open or closed |
|
$20 - $30 |
Motion Sensor Detects any motion. Ideally combined with luminance sensor.
|
A relatively simple device, with the price, mainly depends on the protocol you are using:
|
$25 - $60 |
Multisensor Measure several environmental factors such as temperature, humidity, or light levels
|
This is a more complicated device than a motion sensor and can be used where multiple environmental factors need to be detected:
|
$20 - $60 |
Water leak detectorA sensor that will trigger the shut-off valve to work |
|
$20 - $55 |
Outlet Allows you to remotely switch on and off. Can be retrofitted to any existing devices.
|
|
$20 - $35 |
Plug with Energy MonitoringReports the power consumption
|
|
$23 - $32 |
Smart Color BulbA colour bulb you can remotely control |
|
$24 - $35 |
White BulbPractical bulb that would work for majority of use cases |
|
$10 - $20 |
Switch USSwitch to turn on and off lights. Require neutral wire in the box. |
|
$30 - $45 |
Voice assistant:AI driven device that can respond to voice commands |
There is no right answer which Voice Assistant to choose, but we have the following recommendations:
|
$100 |
Smart BlindsMotorised shades that automatically open and close the blinds |
Read more: Best Motorized Blinds |
$40 - $279 |
Smart ButtonsA convenient way to trigger routines and specific actions |
$8 - $50 | |
Irrigation SystemMake sure your plants are always watered |
$180 - $220 | |
Outdoor LightsLightning for your garden protected from water |
|
$49 - $70 |
Smart TRVThermo Regulator Valve that can be controlled remotely |
$60 - $200 | |
Outdoor OutletsProtected plugs for outdoors |
|
$40 |
Outdoor CamerasCameras that would work well outdoors |
More: Detailed Review of 4 Best Outdoor Cameras |
$70 |
Outdoor SensorsProtected sensors for your garden |
HomeSeer HS-FLS100+ Z-Wave Plus Outdoor Floodlight Sensor (Price not available) is a AC powered motion and lightning sensor. It would work with your smart home but also control floodlights. | $40 |
Moisture SensorReports the level of humidity |
|
$30 |
Security Alarm SystemSystem to alarm you of any unauthorized entry to your house |
|
$89 - $300 |
Robot VacuumLittle helper to clean your house |
$300 |
How to Set Up?
Section below will have step by step instructions how to set this automation routine in the most popular smart hubs like SmartThings, Home Assistant, HomeSeer and Hubitat
Please leave comments below if you have any questions, or interested in the instruction for a specific system. This will help us to better focus our effort.
Setting in this up in Home Assistant
Setting this up consist of three main parts. I am will give you a live example that I run on my smart home setup (See my Github for details).
1. Connect your switch/bulbs and motion sensor to your system
As the example, I have a night lamp in my bedroom that I use as the secondary light. I am using Yeelight which is a color bulb. I decided to pay more for color because I am also using it for notifications (time to sleep and windows downstairs are open)
Yeelight bulbs easy to integrate and they usually auto-detected by Home Assistant. In my case, I decided to hard code it in my configurations.yaml
yeelight:
devices:
192.168.1.17:
name: Bedroom
For a motion sensor I am using Aeon 6 in 1 (Price not available). As with all Z-wave devices, it does not require any config changes.
2. Create automation rule to switch on Lights.
Automation rule is simple – if there is a motion and it is dark, switch on the bulb.
- id: kitchen_lights_on
alias: kitchen lights on
trigger:
- platform: state
entity_id: binary_sensor.aeon_labs_zw100_multisensor_6_sensor
from: 'off'
to: 'on'
- platform: numeric_state
entity_id: sensor.aeon_labs_zw100_multisensor_6_luminance
below: '12'
for:
hours: 0
minutes: 5
seconds: 0
condition:
condition: and
conditions:
- condition: state
entity_id: binary_sensor.aeon_labs_zw100_multisensor_6_sensor
state: 'on'
- condition: numeric_state
entity_id: sensor.aeon_labs_zw100_multisensor_6_luminance
below: '10'
action:
- service: switch.turn_on
entity_id: switch.kitchen_lights
Use Multiple Triggers
Note that I am using multiple triggers. This is to cover situations when you are cooking in the kitchen for a long time. In those situations, the motion sensor will be always on, but once it gets dark you would want your lights on.
3. AUtomation rule to switch off lights
This step is equally important. You need to set up automation to switch off lights as well as switch them on.
- id: kitchen_lights_off
alias: kitchen lights off at night
trigger:
- platform: state
entity_id: binary_sensor.aeon_labs_zw100_multisensor_6_sensor
from: 'on'
to: 'off'
for:
hours: 0
minutes: 10
seconds: 0
- platform: numeric_state
entity_id: sensor.aeon_labs_zw100_multisensor_6_luminance
above: '12'
for:
hours: 0
minutes: 10
seconds: 0
condition:
condition: state
entity_id: switch.kitchen_lights
state: 'on'
action:
- service: switch.turn_off
entity_id: switch.kitchen_lights
Using wait_template
There is a more elegant solution using wait_template. It basically would allow to combine both on and off automations in the single automation. I want to make sure that my condition “there is no motion for 10 minutes” can be implemented as well, but most likely to switch to wait_template soon. See more details here
4. Test and enjoy
Last update on 2022-09-27 / Affiliate links / Images from Amazon Product Advertising API