Skip to content

Instantly share code, notes, and snippets.

@andycb
Created July 4, 2021 17:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andycb/332942c6ce68ba4847c20266cce84c05 to your computer and use it in GitHub Desktop.
Save andycb/332942c6ce68ba4847c20266cce84c05 to your computer and use it in GitHub Desktop.
Smart Bathroom Fan Automations
- id: '1624122675344'
alias: Bathroom Humidity Rising
description: ''
trigger:
- platform: state
entity_id: binary_sensor.bathroom_humity_rising
to: 'on'
from: 'off'
condition: []
action:
- type: turn_on
device_id: 893527488ece2d9f131fcfb3d1b7899e
entity_id: switch.bathroom_fan
domain: switch
- service: input_boolean.turn_on
target:
entity_id: input_boolean.bathroom_fan_was_humidity_activated
mode: single
- id: '1624397476075'
alias: Turn Off Bathroom Fan When Humidity Stable
description: ''
trigger:
- platform: state
entity_id: binary_sensor.bathroom_humity_stable_down
to: 'on'
for: 00:07:00
- platform: state
entity_id: binary_sensor.bathroom_humity_stable_up
to: 'on'
for: 00:07:00
- type: humidity
platform: device
device_id: 8d98e12058f876c84cc0d75002b12e14
entity_id: sensor.bathroom_humidity
domain: sensor
below: 60
for:
hours: 0
minutes: 7
seconds: 0
milliseconds: 0
condition:
- condition: numeric_state
entity_id: sensor.bathroom_humidity
below: '75'
- condition: device
type: is_on
device_id: 893527488ece2d9f131fcfb3d1b7899e
entity_id: switch.bathroom_fan
domain: switch
- condition: state
entity_id: input_boolean.bathroom_fan_was_humidity_activated
state: 'on'
action:
- type: turn_off
device_id: 893527488ece2d9f131fcfb3d1b7899e
entity_id: switch.bathroom_fan
domain: switch
- service: input_boolean.turn_off
target:
entity_id: input_boolean.bathroom_fan_was_humidity_activated
mode: single
- id: '1624785167382'
alias: Turn On Bathroom Fan When Lights On
description: If any bathroom light is on for 10 mins during the day, turn on the
bathroom fan
trigger:
- platform: device
type: turned_on
entity_id: light.bathroom
domain: light
for:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
condition:
- condition: state
entity_id: input_boolean.bathroom_fan_was_humidity_activated
state: 'off'
- condition: time
before: 00:00
after: '7:00'
action:
- type: turn_on
device_id: 893527488ece2d9f131fcfb3d1b7899e
entity_id: switch.bathroom_fan
domain: switch
mode: single
- id: '1624785892813'
alias: Turn Off Bathroom Fan With Lights
description: If the bathroom lights have been off for three mins and teh fan was
not started by a humidity trigger, turn off the fan
trigger:
- platform: state
entity_id: light.bathroom
to: 'off'
for: 0:03:00
condition:
- condition: state
entity_id: input_boolean.bathroom_fan_was_humidity_activated
state: 'off'
- condition: device
type: is_on
device_id: 893527488ece2d9f131fcfb3d1b7899e
entity_id: switch.bathroom_fan
domain: switch
action:
- type: turn_off
device_id: 893527488ece2d9f131fcfb3d1b7899e
entity_id: switch.bathroom_fan
domain: switch
mode: single
binary_sensor:
- platform: trend
sensors:
bathroom_humity_rising:
entity_id: sensor.bathroom_humidity
sample_duration: 600
max_samples: 20
min_gradient: 0.05
device_class: moisture
- platform: trend
sensors:
bathroom_humity_stable_up:
entity_id: sensor.bathroom_humidity
sample_duration: 600
max_samples: 100
min_gradient: 0.00833333333
invert: true
- platform: trend
sensors:
bathroom_humity_stable_down:
entity_id: sensor.bathroom_humidity
sample_duration: 600
max_samples: 100
min_gradient: -0.00833333333
invert: true
@Hisen1985
Copy link

Hello friends, you are welcome here Bathroom vanities come in various sizes to fit any space and design preference. so if you want to change your bathroom, you can check here for the full information on the sizes of bathroom vanities according to the width of your bathroom you can get total information which is very helpful for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment