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 hubA dedicated bridge
that emulates your
$10 - $30
Comms SticksUse Z-wave and Zigbee with your smart hub
$40 - $50
Home Assistant ServerUse Z-wave and Zigbee with your smart hub
- If you are new to Home Assistant, start with Raspberry Pi 3 B+ ($79.99). It will cover your basic needs and easily expand.
- Intel NUC NUC8i3BEK, i3 (8GB Ram + 128GB SSD) (from $43.99) once you understand how cool Home Assistant is, go for NUC. There are dedicated images for NUC which makes it great to use and simple to set up.
$80 - $400
RF hubRF bridge that emulates your Remote
$20 - $30
Shut off valveA valve that will close and open water supply
- Dome Home Automation Water Shut-Off Valve - for Pipes up to 1 1/2", White (DMWV1) ($99.97) is the most affordable option. Easy to install (you do not need a plumber) and operate. Requires Smart Hub
- leakSMART Water Leak Detection Kit ($364.73) is a more expensive option. It has all you need to set you up shut off valve. There are some negative comments on the hub but it works well in general.
- Grohe 22503LN0 (from $14.00) is even more expensive. For the additional price, you have flow sensors capable to detect the pipe bursts without the sensors and better overall build quality. At the same, it has fewer options for integrating with your smart hub.
$99 - $400
Door/Window SensorReports if a door or window is open or closed
$20 - $30
Motion SensorDetects any motion. Ideally combined with luminance sensor.
A relatively simple device, with the price mainly dependent on the protocol you are using:
- Z-wave Motion Sensor: Our favouritez-wave sensor is Dome Motion and Light Sensor ($34.97) for a good battery life, responsiveness and price. It also has luminance sensor built in. For a multisensor we recommend Zoos 4 in 1 multisensor ($36.95) or Aeon 6 in 1 ($59.99).
- Zigbee Motion Sensor: SmartThings sensor ($19.99) is the best for its price and stability.
$25 - $60
MultisensorMeasure 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:
- Z-wave: Our favourite z-wave sensor is Aeon 6 in 1 ($59.99) for its reliability and flexibility in use. It detects motion, humidity, temperature, light lux, UV, vibration sensor and has 2-year battery life
- Zigbee: Samsung SmartThings Multipurpose Sensor ($19.99) give you open/close, vibration, orientation, angle (tilt), and temperature measures for multipurpose functionality
$20 - $60
Water leak detectorA sensor that will trigger the shut-off valve to work
- Samsung Leak Detector ($19.73) is the most affordable and simple solution. At this price, you should cover all the areas in your house. Requires A Smart Hub
- FIBARO Flood Sensor ($54.99) is a very good Z-wave leak detector. It has great battery life, easy to pair and very accurate at alarms. Requires A Smart Hub
$20 - $55
OutletAllows you to remotely switch on and off. Can be retrofitted to any existing devices.
- Wifi outlet: Kasa Smart WiFi Plug (price for 2 - $34.99) is the best for price and local connectivity.
- Zigbee outlet: Sylvania Smart Plug ($18.54) is also a good option for ZigBee outlet
- Z-wave outlet: GE Enbrighten Z-Wave Plus Smart Plug ($34.99) is good practical device that do not take a lot of space and work perfectly
$20 - $35
Plug with Energy MonitoringReports the power consumption
- Wifi outlet: Kasa Smart WiFi Plug ( $35.99) is the best for price and local connectivity.
- Z-wave outlet: HAOZEE Z Wave Plus Mini Smart Power Plug (from $62.99) is a good practical device that does not take a lot of space and work perfectly
$23 - $32
Smart Color Bulb
A colour bulb you can remotely control
- Wifi: Kasa Smart Light Bulb, Multicolor (from $19.99) is best wifi colour LED bulb. We recommend TP-link devices for a great value, easy integration with almost any smart hubs and excellent quality.
- Zigbee: Sengled E11-N1EA Smart LED Multicolor Bulb (from $19.99) is the most practical RGB smart bulb around
$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.
- Zigbee: HOUSEYAS ZigBee Smart Light Switch (from $28.99) is a great device. It does not require neutral wire so will be really easy to install.
- Z-wave: Honeywell Z-Wave Plus On/Off Switch (from $19.99) is a switch that easy to install and operate. Works with all the major hubs and looks great.
- Z-wave Dimmer: GE Enbrighten Z-Wave Plus Smart Dimmer Switch ($42.45) in addition to being a great dimmer can also act as extender.
- Wifi: Wemo Light Switch ($28.98) is really good if you do not have Z-wave of ZigBee and not planning to buy.
$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:
- The most comprehensive: Amazon Alexa ($99.99) has a lot to offer. Zigbee radio means potentially one hub less (although we still recommend getting a dedicated hub). It also has the biggest ecosystem to tap into (including Ring, Phillips Hue, TP-link)
- The most intelligent: Google Home is using the brains behind the biggest search engine in the world to deliver the best answers for your questions. It is definitely more capable compared to Alexa
Smart BlindsMotorised shades that automatically open and close the blinds
- Best DIY Blinds: Rechargeable Wireless by RollerHouse (from $39.99)
- Best Horizontal Blinds: MySmartBlinds Automation Kit Bundle ($159.00)
- Best Vertical Blinds: Somfy Sonesse ST30 ($309.98)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
- Zigbee: SYLVANIA 9 Color Changing and Dimmable LED Spots (from $13.00) is a very convenient way to bring smart lights to your garden. Easy to install and integrate. GLEDOPTO Outdoor Smart LED 9W ($59.99) is also a good option and has more brigness and metal chasis.
- Z-wave: Z-wave is not great with lights, but GE Enbrighten Z-Wave Plus Outdoor Smart Plug Switch ($41.94) would work great to control existing lightning solutions.
$49 - $70
Smart TRVThermo Regulator Valve that can be controlled remotely
- US: tado Smart Radiator Thermostat ($199.00) is part of Tado which is great heating system with local controls
- UK: No products found. () is a decent solution with good installations options.
$60 - $200
Outdoor OutletsProtected plugs for outdoors
- Wifi: Kasa Smart WiFi 2 Outlet Outdoor Plug by TP-Link (from $22.99) is a great outdoor plug and wifi connection would work great for the majority of users
- Z-wave: GE Enbrighten Z-Wave Plus Outdoor Smart Plug Switch ($41.94) is a well functioning outdoor plug with good range.
Outdoor CamerasCameras that would work well outdoors
- Best Overall Outdoor Camera: Amcrest UltraHD 4MP Outdoor POE Camera ($79.98) is a great quality outdoor camera. It has 4k resolution making it perfect for large outdoor areas. It is ONVIF protocol compliant making it easy to connect to almost any NVR
Outdoor SensorsProtected sensors for your garden
HomeSeer HS-FLS100+ Z-Wave Plus Outdoor Floodlight Sensor ($42.95) 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
- Best for most users: HHCC Xiaomi 4 in 1 Plant Flower Care Smart Monitor ($25.88) is a Bluetooth device that can monitor moisture as well as Sunlight, Temperature, and Soil Fertility
Security Alarm SystemSystem to alarm you of any unauthorized entry to your house
- The best for the majority users: SimpliSafe Wireless Home Security System The Knox 2018 ($309.00) has all the main things for a good security system. Great customer service, main sensors included for the most users and good quality hardware.
- More affordable security system: Thustar Home Alarm System Wireless (from $9.99) is a cheaper no-monthly-fee system. It will be more difficult to integrate to your hub but can be done with Sonoff Bridge.
- More affordable security system: LifeShield, an ADT Company - 14-Piece Easy, DIY Smart Home Security System ($229.99) is a middle option. The system has good integration with hubs, no-monthly-fee system, and a well designed mobile application.
$89 - $300
Robot VacuumLittle helper to clean your house
- Best Overall: iRobot Roomba 690 ($274.99) for great value, good quality and connectivity to all major smart hubs
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 ($59.99). 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
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