Bathroom Fan and Light Automations

If you’ve ever been inside a new build house here in the UK, you’ve probably noticed that the bathrooms tend to be in the centre of the house. And this means 2 things; light and humidity can be a problem.

So how do we solve that in an over engineered way? Automations!

Firstly, let’s shed a little light on what’s going to be needed for this, pun intended.

For this I’m using the Aqara H1 EU Double Rocker, Door and Window Sensor, P1 Motion Sensor, and Temperature and Humidity Sensor. This is then being automated within HomeAssistant, but you can achieve very similar results in the Aqara app or in other eco-systems.

The way the light works is almost like a soft sensor - based on what the sensors are doing, can we determine someone is in the room? When the door opens, the contact sensor flag as being open and this creates a window in which motion from the sensor will trigger the light to turn on.

Example > door open + motion detected = lights on

This then works in reverse when the door closes. But, the caveat we add to this part is timing. The last thing we want is to sit down a little too still on the toilet and be plunged into darkness! So when the door closes, if there is no motion for 5 minutes, the light will turn off.

Now we can see what we’re doing, let’s move onto the humidity issue.

For this, I’ve positioned a sensor directly above the shower so that it picks up the humidity but (unless I’m having a really big shower karaoke session) runs a very small risk of actually getting splashed.

The next part does take a little bit of time to figure out, because every house is different. But you need to work out the room’s baseline humidity. This means charting it over a 24 hour period, and jotting down any time anyone uses the shower or runs a bath. Sorry to your family in advance for that! Once you’ve got this, you should end up with a nice chart that looks a little like this.

Those spikes you see, give you the levels at which you want to trigger the automation. With mine, you can see the humidity sits around 75 - 80% at its baseline. Which means anything above 80% indicates that the shower is on. So that’s when the second switch on the H1 Double Rocker clicks into action.
Then for the off, simply create a second automation that says “when the humidity is below X% for 10 minutes, turn off the switch”. The reason for the delay is simply to accommodate any micro fluctuations in the humidity. We want the fan to have well and truly done its job before turning off!


This whole setup can then be fine tuned to match your activity (e.g. automation only triggers 7am - 11pm, so you aren’t getting blinded on a midnight toilet trip)

What do you think? Would you add something like this to your setup?

17 Likes

Hi, thanks for sharing information about your automation, it is useful for new (and not only new) users. I once made a lesson √6 on using automation in the bathroom. You can also see other examples of using automation 2.0 for your home. Automation 2.0 Tutorial Collection - Lesson 1 report
Automation 2.0, lesson 6, bathroom automation on a working example

Thanks again for expanding your automation.

5 Likes

I love this! It will definitely help tweak my bathroom setup

4 Likes

Hello @Dan_M Thanks for sharing your automation
:oucjnda5i4sry8ki39y3dm_62:

2 Likes

Awesome automation! Tracking the baseline humidity to control the fan is a brilliant idea. I will definitely try adding something similar to my setup.

3 Likes

Well I recently did my bathroom a bit smart to but I just use HomeKit and aqara home app first I have an Aqara Gateway and an motion sensor now the Gateway I only use it as night light so I set in aqara home app when motion is detected during the night hours to turn the light On and turning it off after 5min of no motion is detected.this is an simple way to not need to turn On the lights of the bathroom.then recently I added an Aqara temperature and humidity sensor T1 on my bathroom and with that I made an automations using also Siri Shortcuts as well all who use Apple home app knows that the temperature and humidity if you set it normally as an automation will not trigger well for that Siri’s shortcuts do detect the humidity better and it turns ON my extractor when the humidity is above 65 and it turn it off when humidity drops below 55 this clearly only will be when someone make an shower so simple ways to make your bathroom a bit smart without using to many things or using home assistant ether witch I do not use.the screens shows how I set to turn On/Off my extractor and this I did it because many times my wife forget to turn it ON :rofl::rofl::rofl:


4 Likes

Excellent automation, Dan.

I have something similar using the FP300 multi sensor. This uses mmWave to detect presence as soon as you enter the bathroom and will continue to detect you even if you remain still - in fact, it will detect presence through an opaque shower curtain.

It also handles the temp and humidity. so eliminates the need for Door and window sensor. P1 motion sensor and Temp & Humidity sensor in your automation.

Good work on the baseline humidity!

3 Likes

Good idea @brendanoneill and @Dan_M ! I have my bathroom also running a FP300 also for lights and music with my HomePod !
Best setup for bathroom for setting and controlling :x2fozabcpx9xrbxmdpseb3_61:

4 Likes

@Dan_M , Some nice automation there. I like the idea on the humidity to start a music track.

I’d say use a presence sensor, rather than a motion sensor. If you use an FP2, or anything else that has multi-zones, you know where someone is in the room.

I use a shaving socket to provide power for my HomePod, as that is within the law, and I use a USB cluster to run my FP2, as that’s within the law of placement of electrical outlets and water.

I do use time of day to regulate the brightness of the light in my bathroom as I’m getting older and late night/early morning bathroom trips are becoming more common.

I did add some humour in my previous home, when I had “The Pee Song” by the Toilet Bowl Cleaners playing when someone used the toilet :smiley:

2 Likes

I hadn’t thought of using a shaver socket for this! Thanks for the suggestion.

Well I have an window on the ceiling of my bathroom witch provide me natural light during the day, this way I do not need to automate my lights at all and we only use the lights during the night hours if we shower as for the rest I have an Aqara gataway with the motion sensor that to light the bathroom when we enter during the night.i set it to detect motion between 21:30 to 7:00 and each time turns on to turn off after 5 min if doesn’t detect motion.the other automation is made with the temperature and humidity sensor to turn on the extractor as I mention above.this is all I have on the bathroom simple but effective since I do not like to listen music when I shower :rofl::rofl::rofl:

If you get a shaver socket with both American & European plugs separated, rater than sharing, you can use a US power supply for the HomePod/Speaker and still run your shaver :wink:

Good automations, i use that too :smiley: