Bathroom

Misc automations specifically for bathrooms.

Motion Time Brightness

When motion detected, turn on a light to half brightness during 1AM and 6AM and full brightness during any other time.

Motion Brightness
[{"id":"b92e7625.ce1b78","type":"time-range-switch","z":"9afdaf1d.9b88f","name":"1AM - 6AM","lat":"","lon":"","startTime":"01:00","endTime":"06:00","startOffset":0,"endOffset":0,"x":280,"y":659,"wires":[["e11e681c.0ef608"],["8b92af8d.ffa1f"]]},{"id":"2d980e09.afa542","type":"server-state-changed","z":"9afdaf1d.9b88f","name":"Motion Detected","server":"a77b5e9d.0c69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.bathroom_motion","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":100,"y":660,"wires":[["b92e7625.ce1b78"],[]]},{"id":"8b92af8d.ffa1f","type":"api-call-service","z":"9afdaf1d.9b88f","name":"Turn on light at 100% brightness","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.bathroom","data":"{\"brightness_pct\":\"100\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":530,"y":684,"wires":[[]]},{"id":"e11e681c.0ef608","type":"api-call-service","z":"9afdaf1d.9b88f","name":"Turn on light at 50% brightness","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.bathroom","data":"{\"brightness_pct\":\"50\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":520,"y":634,"wires":[[]]},{"id":"a77b5e9d.0c69","type":"server","z":"","name":"Home Assistant","addon":true}]

Humidity Fan

Turn on a fan when humidity is high; turn the fan off when humidity lowers. This is a great way to automatically remove condensation when someone showers.

Humidity Fan
[{"id":"32c50907.2cde1e","type":"stoptimer","z":"9afdaf1d.9b88f","duration":"5","units":"Minute","payloadtype":"num","payloadval":"0","name":"Wait 5 Minutes","x":620,"y":200,"wires":[["cdfbf50a.3eecc8"],[]]},{"id":"cdfbf50a.3eecc8","type":"api-current-state","z":"9afdaf1d.9b88f","name":"High Humidity?","server":"a77b5e9d.0c69","version":1,"outputs":2,"halt_if":"70","halt_if_type":"num","halt_if_compare":"gt","override_topic":false,"entity_id":"sensor.bathroom_humidity","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":280,"y":320,"wires":[["7e082343.a7f13c"],["c5c47556.bb3f8"]]},{"id":"c5c47556.bb3f8","type":"api-call-service","z":"9afdaf1d.9b88f","name":"Turn off fan","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.bathroom_fan","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":610,"y":320,"wires":[[]]},{"id":"7e082343.a7f13c","type":"stoptimer","z":"9afdaf1d.9b88f","duration":"1","units":"Minute","payloadtype":"num","payloadval":"0","name":"Wait 1 min","x":610,"y":260,"wires":[["cdfbf50a.3eecc8"],[]]},{"id":"43927abd.48ee2c","type":"server-state-changed","z":"9afdaf1d.9b88f","name":"High Humidity","server":"a77b5e9d.0c69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.bathroom_humidity","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"70","halt_if_type":"num","halt_if_compare":"gt","outputs":2,"output_only_on_state_change":true,"x":90,"y":200,"wires":[["595cf5bf.3e5e34"],[]]},{"id":"595cf5bf.3e5e34","type":"api-call-service","z":"9afdaf1d.9b88f","name":"Turn on fan","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.bathroom_fan","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":310,"y":200,"wires":[["32c50907.2cde1e"]]},{"id":"a77b5e9d.0c69","type":"server","z":"","name":"Home Assistant","addon":true}]

Humidity Light

Turn on a light and change color based on high (red), medium (green), and low (blue) humidity.

Humidity Light
[{"id":"3de80ebe.75388a","type":"server-state-changed","z":"9afdaf1d.9b88f","name":"Humidity","server":"a77b5e9d.0c69","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.bathroom_humidity","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":80,"y":460,"wires":[["3649abb3.175f2c"]]},{"id":"3649abb3.175f2c","type":"switch","z":"9afdaf1d.9b88f","name":"State","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"70","vt":"str"},{"t":"gt","v":"40","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":230,"y":460,"wires":[["2c273f27.525a8"],["f78863cb.8aed2"],["f82257f5.0a516"]]},{"id":"f78863cb.8aed2","type":"api-call-service","z":"9afdaf1d.9b88f","name":"Turn on light and set color to green","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.living_room_lamp","data":"{\"color_name\":\"green\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":480,"y":460,"wires":[[]]},{"id":"2c273f27.525a8","type":"api-call-service","z":"9afdaf1d.9b88f","name":"Turn on light and set color to red","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.living_room_lamp","data":"{\"color_name\":\"red\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":480,"y":400,"wires":[[]]},{"id":"f82257f5.0a516","type":"api-call-service","z":"9afdaf1d.9b88f","name":"Turn on light and set color to blue","server":"a77b5e9d.0c69","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.living_room_lamp","data":"{\"color_name\":\"blue\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":480,"y":520,"wires":[[]]},{"id":"a77b5e9d.0c69","type":"server","z":"","name":"Home Assistant","addon":true}]