Stop automations when baby sleeps
Nothing is worse than putting the baby to sleep, just for the automated lights to come on and wake her up. There are ways we can detect if the baby is asleep and then disable any automation from disturbing her.
Use cases
Baby & Nursery
- Nap Time - Disable nursery automations during sleep
- Nighttime Sleep - Keep room dark and quiet all night
- Smart Quiet Mode - House knows baby is sleeping
Adults & Others
- Afternoon Nap - Disable bedroom automations during rest
- Work From Home - Quiet mode for important calls
- Guest Sleeping - Respect guest room quiet time
Products needed
Essential Equipment
The device acts as the "sleep indicator"
Detects when sleep device is running
Plug the white noise machine or baby monitor into the smart plug. When the baby goes down for sleep, turn on the white noise or monitor. This will draw power, which you monitor using the smart plug. When power consumption rises, you know baby is sleeping.
Basic automation setup
Step 1: Detect Sleep Start
Triggers
- Plug's power consumption rises above 5 watts
Conditions
- None
Actions
- Flip virtual switch "Baby Sleeping" to on
- OR Set variable "baby_sleeping" to true
Step 2: Detect Sleep End
Triggers
- Plug's power consumption drops below 2 watts for 2 minutes
Conditions
- "Baby Sleeping" is currently on
Actions
- Turn off "Baby Sleeping" virtual switch
- OR Set variable "baby_sleeping" to false
Step 3: Use in Other Automations
Add a condition to your nursery automations:
- Condition: "Baby Sleeping" is OFF
- This prevents the automation from running when baby is asleep
Platform-specific examples
Home Assistant
SmartThings
Hubitat
Apple HomeKit
Alexa
Google Home
Advanced features
Room-specific quiet mode
Expand beyond just the nursery:
Affected Automations:
- Motion lights in nursery (disabled)
- Motion lights in adjacent hallway (dimmed to 10%)
- Doorbell chime volume (reduced)
- Smart speaker volume (lowered)
Logic: When “Baby Sleeping” is on:
- Nursery motion lights: Disabled completely
- Hallway lights: 10% if triggered
- Whole-house speaker volume: 30%
Time-based expectations
Combine with time for smarter behavior:
Nighttime Sleep (7 PM - 7 AM):
- Longer expected sleep duration
- More aggressive quiet mode
- No automations in nursery
Naptime (10 AM - 5 PM):
- Shorter expected duration
- Modified quiet mode
- Some automations may proceed quietly
Wake detection
Detect when baby wakes up before you turn off the monitor:
Sound Detection:
- Use smart speaker with sound detection
- Crying sound triggers “baby awake” even before monitor off
Motion Detection:
- Camera or sensor in nursery
- Motion during expected sleep time = possible wake
Dashboard integration
Visual status for caregivers:
Dashboard Tile:
- Green: Baby awake, normal automation
- Red: Baby sleeping, quiet mode active
- Shows time sleeping started
- Manual override button
Multi-child support
Track multiple children:
Setup:
- Separate monitor/plug for each child
- Separate virtual switch for each
- Combined “Any Child Sleeping” switch for house-wide rules
Logic:
- Individual room rules per child
- Global quiet mode if ANY child sleeping
- Different automation rules per room
Troubleshooting
Issue: False “sleeping” detection
Causes:
- Power threshold too low
- Device has standby power draw
- Interference from other devices
Solutions: ✅ Measure actual power consumption of device ✅ Increase power threshold slightly ✅ Add time requirement (power > 5W for 1 minute) ✅ Verify only sleep device is on plug
Issue: Automations still trigger during sleep
Causes:
- Condition not added to automation
- Condition logic incorrect
- Virtual switch not updating
Solutions: ✅ Verify condition is added to each affected automation ✅ Check condition logic (should be “Baby Sleeping is OFF”) ✅ Test virtual switch manually ✅ Review automation logs
Issue: Sleep mode doesn’t end when monitor turned off
Causes:
- Power threshold too low for “off” detection
- Monitor has standby power
- Delay too short
Solutions: ✅ Lower the “off” power threshold (try 1W) ✅ Increase delay before declaring sleep over ✅ Check if monitor has true standby power draw ✅ Add manual override option
Issue: Variable/switch state gets stuck
Causes:
- Power monitoring glitch
- Automation error
- Network connectivity issue
Solutions: ✅ Add auto-reset after max time (8 hours for night, 3 hours for nap) ✅ Create manual reset button on dashboard ✅ Check plug connectivity ✅ Add backup time-based reset
Best practices
Choose the right indicator device
Good Choices: ✅ White noise machine (clear on/off power difference) ✅ Baby video monitor (consistent power draw when on) ✅ Dedicated nursery lamp (turn on for sleep time)
Avoid: ❌ Devices with variable power (brightness dimming) ❌ Devices with high standby power ❌ Devices that cycle on/off during use
Calibrate power thresholds
Process:
- Plug device into power monitoring plug
- Record power when device is OFF (standby)
- Record power when device is ON (running)
- Set “on” threshold above standby but below running
- Set “off” threshold below “on” threshold
Example:
- Standby: 0.5W
- Running: 8W
- On threshold: 5W
- Off threshold: 2W
Gradual quiet mode
Smooth Transitions:
- Don’t abruptly cut all sound
- Lower volumes gradually
- Allow some quiet activities
Priority Levels:
- Nursery: Complete quiet mode
- Adjacent rooms: Reduced volume/brightness
- Rest of house: Normal with volume limits
Related automations: