Home Assistant recipes, by sensor
Teach every sensor what to say
A sensor that only shows a number on a dashboard has not protected anything yet. Pick the kind of sensor, fill in its name, and the bench writes the automation that turns its reading into a notice on your phone.
- 6kinds of sensor, each with a recipe written for it.
- 40°Fis when the freeze recipe speaks, while there is still time before 32°F.
- 24 hoursof silence and the watchdog asks you to check a sensor.
The recipe bench
Runs in your browser. Nothing you type is sent.
Leak sensor. When the sensor reads wet, send you a notice to close the main valve.
automations.yaml
- alias: "Leak: water detected"
mode: single
triggers:
- trigger: state
entity_id: binary_sensor.water_heater_leak
to: "on"
actions:
- action: notify.mobile_app_your_phone
data:
title: "Water detected"
message: "{{ trigger.to_state.name }} is wet. Close the main water valve."
Rename the entities to your own, then paste. Syntax: Home Assistant: Automation triggers.
Every recipe, with why it looks the way it does
- binary_sensor, device class moistureLeak sensor recipeWater on the floor at a water heater, a washer, a dishwasher, a sink or a toilet, the moment it gets there.
- sensor, device class temperatureFreeze sensor recipeA cold space where pipes run, a crawlspace, a garage, an attic or a cabinet on an outside wall, falling toward freezing.
- sensor, device class humidityHumidity sensor recipeA basement or a bathroom that stays damp long enough for mold, and the slow leak that keeps a room damp.
- binary_sensor, device class garage_doorGarage door sensor recipeA garage door left open on a freezing night, with water lines in the garage.
- sensor, device class power (a plug that measures watts)Sump pump power plug recipeA sump pump that runs and runs, which means water is coming in faster than usual or the float is stuck.
- any entity, plus sensor, device class batterySensor watchdog recipeThe failure nobody notices: a sensor whose battery died or that dropped off the network, so it can no longer warn you.
More from the bench
- From a reading to a noticeWhat happens between a sensor noticing something and your phone buzzing, and how to put a recipe from this site into Home Assistant.
- Leak and freeze plan builderTick what your house has. Get every leak and freeze sensor it needs, where each one goes, and the automations to run them, ready to copy.
- Put a widget on your siteThe recipe bench and the leak and freeze plan builder, free to embed on your own site with one line of HTML.
Where should the sensors go in the first place? The guides live on Leak and Freeze, this site's sister.