A modern Home Assistant custom component for comprehensive frost risk monitoring and meteorological calculations.
This integration creates 8 advanced meteorological sensors based on temperature and humidity readings:
- Absolute Humidity (g/m³) - Actual water vapor content in the air
- Dew Point (°C) - Temperature at which water vapor condenses
- Frost Point (°C) - Temperature at which frost forms (below 0°C)
- Freezing Point (°C) - Atmospheric freezing point with humidity effects
- Wet-Bulb Temperature (°C) - Temperature with evaporative cooling
- Vapor Pressure (hPa) - Partial pressure of water vapor
- Humidity Ratio (kg/kg) - Mass of water vapor per unit mass of dry air
- Frost Risk Level (0-5) - Multi-factor frost risk assessment
The integration creates a device per config entry (identifier: (frost_risks, entry_id)). All generated sensors for that instance are attached to that device, which makes them easier to find and manage in Settings → Devices & Services.
- ✅ Config Flow UI - Easy setup through Home Assistant UI (no YAML required)
- ✅ SensorEntity - Uses modern Home Assistant sensor architecture
- ✅ Async/Await - Fully asynchronous implementation
- ✅ Auto-Update - Automatically recalculates when temperature or humidity changes
- ✅ HACS Compatible - Ready for installation via HACS
- ✅ Bilingual - English and Dutch translations included
All calculations use scientifically validated formulas:
- Magnus-Tetens formula for dew point
- Stull's formula (2011) for wet-bulb temperature
- ASHRAE standards for humidity ratio
- Modified Magnus formula for frost point
- Open HACS in Home Assistant
- Go to "Integrations"
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add
https://github.com/Patrick1610/home-assistant-frost-risksas repository - Category: Integration
- Click "Add"
- Search for "Frost Risks" and install
- Restart Home Assistant
- Copy the
custom_components/frost_risksfolder to your Home Assistant'scustom_componentsdirectory - Restart Home Assistant
- Go to Settings → Devices & Services
- Click + Add Integration
- Search for Frost Risks
- Enter a name for your sensor group
- Select your temperature sensor (must have device_class: temperature)
- Select your humidity sensor (must have device_class: humidity)
- Click Submit
The integration will automatically create all 8 sensors.
If you name your integration "Living Room", you'll get:
sensor.living_room_absolute_humidity
sensor.living_room_dew_point
sensor.living_room_frost_point
sensor.living_room_freezing_point
sensor.living_room_wet_bulb_temperature
sensor.living_room_vapor_pressure
sensor.living_room_humidity_ratio
sensor.living_room_frost_risk_level
The frost risk level sensor provides a 0-5 scale based on multiple meteorological factors:
| Level | Description | Risk |
|---|---|---|
| 0 | No Risk | No frost expected |
| 1 | Very Low | Minimal frost risk |
| 2 | Low | Slight possibility of frost |
| 3 | Moderate | Frost possible in favorable conditions |
| 4 | High | Frost likely |
| 5 | Very High | Frost highly likely |
The risk assessment considers:
- Current temperature
- Dew point temperature
- Wet-bulb temperature
- Freezing point
- Absolute humidity
automation:
- alias: "Frost Warning"
trigger:
- platform: numeric_state
entity_id: sensor.outdoor_frost_risk_level
above: 3
action:
- service: notify.mobile_app
data:
title: "⚠️ Frost Warning"
message: "High frost risk detected. Protect sensitive plants!"automation:
- alias: "Prevent Pipe Freezing"
trigger:
- platform: numeric_state
entity_id: sensor.garage_frost_risk_level
above: 4
action:
- service: climate.set_temperature
target:
entity_id: climate.garage_heater
data:
temperature: 5type: entities
title: Frost Monitoring
entities:
- entity: sensor.outdoor_temperature
- entity: sensor.outdoor_humidity
- entity: sensor.outdoor_dew_point
- entity: sensor.outdoor_frost_point
- entity: sensor.outdoor_wet_bulb_temperature
- entity: sensor.outdoor_frost_risk_levelEach sensor includes additional attributes:
temperature: 2.5 # Source temperature in °C
humidity: 85 # Source humidity in %The frost risk level sensor also includes:
description_en: "High" # English description
description_nl: "Hoog" # Dutch descriptionAH = (6.112 × e^((17.67×T)/(T+243.5)) × RH × 2.1674) / (273.15 + T)
α = (17.27×T)/(237.7+T) + ln(RH/100)
Td = (237.7 × α) / (17.27 - α)
Tw = T×atan(0.151977×√(RH+8.313659)) + atan(T+RH) - atan(RH-1.676331)
+ 0.00391838×RH^1.5×atan(0.023101×RH) - 4.686035
es = 6.112 × exp((17.67×T)/(T+243.5))
e = es × (RH/100)
W = 0.622 × (e / (P - e))
where P = 1013.25 hPa (standard atmospheric pressure)
You can add multiple instances of this integration for different locations:
- Outdoor monitoring (garden, balcony)
- Indoor monitoring (living room, bedroom)
- Garage/Shed monitoring
- Greenhouse monitoring
Each instance creates its own set of 8 sensors.
- 🐛 Issues: Report bugs or request features
- 💬 Discussions: Ask questions and share ideas
- 🔧 Pull Requests: Contributions are welcome!
Originally inspired by papo-o/home-assistant-frost-risks, completely rewritten for modern Home Assistant architecture.
MIT License - See LICENSE file for details