ended up using the script! this works, thanks
This Toilet Exhaust Fan with time delay blueprint has now been updated so it will work with this blueprint now. Just need to create a toggle helper and enter it into both blueprints. More information can be found in its thread Click Here.
Blacky
Very interested in trying this, do you think it would work using the Sonoff Humidity sensor instead of the one you listed?
You can use other humidity sensor and you don’t have to use the one I use but it must report at least every 60 seconds or on every state change.
I did a quick google search and still not sure what your sensor does. Your humidity sensor must report a value at least every 60 seconds. Some battery sensors report on every change and I think your one reports on 5% of change even when they say it report every 5 seconds. If it is 5% change then no it will not work. The best way it to see what your sensor reports.
i use the aqara Humidity Sensor works great.
I am stumped at selecting the Fan switch
I cannot select it (a Sonoff ZBMINI relay) which works via the Dashboard:
I have scrolled through all the dropdown for device and entity and tried typing Fan, MINI, Bathroom
Replying to my own question LOL
I went and checked the entity for the switch and then copied and pasted - seemed to accept it
@Blacky can I also use the derivative of an absolute humidity sensor? Currently the “rising” and “falling” has the % unit of measurement. If I use absolute humidity, the value will be a change of 200 mg/m3/minute or so, instead of 5%/minute.
Why absolute humidity? Value change is “sharper”; relative humidity value is damp(en)ed due to temperature rise that comes with it when taking a shower. A 5% relative humidity increase combined with a 2 degreeC increase is a 24% increase of absolute humidity (50% to 55%, 20 to 22 degC). See Absolute Humidity Calculator
@Blacky I am testing your blueprint out, and I have a manual binary switch setup in ESPhome called “binary_sensor.bath_sense_fan_10” The setup looks like:
binary_sensor:
- platform: gpio
pin: D0
name: ${display_name} Motion
device_class: motion
- platform: gpio
pin:
number: D3
inverted: true
mode:
input: true
pullup: true
name: ${display_name} "Fan 10"
filters:
- delayed_off: 250ms
on_press:
# Simple
- homeassistant.event:
event: esphome.button_pressed
data:
title: Fan button was pressed
I tried and pressed the temperature-open push button, but the fan did not turn on. Do I need to make the filter delayed_off longer than 250ms?
And do I insert a motion sensor somewhere in the blueprint? I do have a binary sensor in helper to bypass the motion sensor, setup I have is in node-red. In node-red I have disabled my fan on and off nodes.
I think I have to change the ESPhome to toggle switch, and not nomally open. It is a physical nomally open push button.
wonderful blueprint BTW!
Give it a try and see what happens. There are many reasons why we use a Derivative Sensor and to date it just works.
You are close but missing some things. Below is your code and some notes in the code.
# Enter this switch into the automation (manual fan switch) and into a HA dashboard if you like.
switch:
- platform: gpio
pin: GPIO19 # Set any spare pin you like it will do nothing
id: bathroom_manual_control # This ID is the link to the binary sensor
name: "Bathroom Fan - Manual Control" # Call it whatever you like
icon: "mdi:fan-clock"
binary_sensor:
- platform: gpio
pin: D0
name: ${display_name} Motion
device_class: motion
- platform: gpio
pin:
number: D3 # Wire from this pin to the push button on the wall and back to ground on esp32
inverted: true
mode:
input: true
pullup: true
name: ${display_name} "Fan 10"
on_press:
then:
- switch.toggle:
id: bathroom_manual_control # This is the link back to the switch ID above.
filters:
- delayed_on: 10ms # This is for the bounce in the push button, keeps things happy ;)
In automation
This is it in a HA dashboard.
Hope this helps you
Blacky
too bad, does not work:
Message malformed: A value can never be above 200.0 and below 100.0 at the same time. You probably want two different triggers.
O well, try just using the Derivative Sensor, my understanding it is working for you. I will keep this in mind and put it on my list.
Blacky
Post withdrawn
Here is a strange request. I live in Houston which can have a very humid climate. Is there a way to add a bit of logic so that if the humidity after the shower is less than the humidity outdoors, it will not run ? There is no point in exhausting the humidity if it will only get replaced by maybe even more humid air…
I have just been thinking about this since I put in a bathroom fan with a built in humidity sensor years ago, but it has a very short discharge hose that goes only about 1 or 2 feet. I think that the fan senses the outside humidity and just runs for hours. I’d like to prevent this.
Hi Richard,
This is interesting… I would think that is shouldn’t run if set up correctly.
You have a safe guard to stop this but maybe have a look at my set up as it just may help you. If you do have any further questions then please ask. To see my set up Click Here
Blacky
Yes, my bathroom sensor is just above my shower tile, 3’ down from the ceiling and the bathroom fan. I have installed your blueprint and it worked great at detecting my shower. I have not wired the fan, so I have it flipping an input boolean called wet shower.
I am also going to use it to run a towel warmer that I am buying. I can probably set it up using the light function that you have in your blueprint, I may run it for one hour to dry the towels after the shower. What do you think would be the best way to add a timer based towel heater ?
Hi Richard
Nice one
It will only control a light domain. If you are not using the automation link then that has a time delay.