A Home Assistant Lovelace card that plots a temperature/humidity sensor pair as a dot on a mold-growth-risk chart - the same "too cold / too dry / risk of growth / enhanced risk / great risk / too hot" chart used in building-science and dehumidifier literature.
- Reads two entities (a temperature sensor and a humidity sensor) and updates the dot live.
- Fully themeable: colors are drawn from your Home Assistant theme
(
--primary-text-color,--divider-color,--card-background-color, etc.), so it adapts to light mode, dark mode, and transparent/custom themes without configuration. Override the risk-band accent colors with--mri-cold-color,--mri-hot-color,--mri-dry-color,--mri-dot-color(e.g. via card-mod) if you want a different palette. - Temperature axis is °F or °C via a simple
temperature_unitYAML option (or auto-detected from your Home Assistant unit system), also exposed in the card's visual editor once it's added to a dashboard. - No build step, no dependencies. Single JS file.
- HACS → Frontend → ⋮ → Custom repositories → add this repo URL, category "Dashboard".
- Install "Mold Risk Index Chart Card".
- Add the resource (HACS usually does this automatically): Settings →
Dashboards → ⋮ → Resources →
/hacsfiles/mold-risk-index-chart/mold-risk-index-card.js, type "JavaScript Module".
- Copy
mold-risk-index-card.jsto<config>/www/mold-risk-index-card.js. - Settings → Dashboards → ⋮ → Resources → add
/local/mold-risk-index-card.js, type "JavaScript Module".
Add the card through the dashboard UI card picker ("Mold Risk Index Chart"), or via YAML:
type: custom:mold-risk-index-card temperature_entity: sensor.bedroom_temperature humidity_entity: sensor.bedroom_humidity title: Bedroom temperature_unit: auto # auto | F | C show_current_values: true
| Option | Type | Default | Description |
|---|---|---|---|
temperature_entity |
string | required | Entity providing the temperature reading. |
humidity_entity |
string | required | Entity providing the relative-humidity reading (%). |
title |
string | auto | Card header title. Defaults to the temperature entity's friendly name. |
temperature_unit |
string | auto |
auto follows your Home Assistant unit system; F or C pins the axis. |
show_legend |
boolean | true |
Show the risk-zone row (color chip + zone label) under the chart. |
show_current_values |
boolean | true |
Also show the live "72.4°F, 47% RH" readout in that row. |
curves |
array | - | Advanced: override the 3 risk-boundary curve definitions (see below). |
The three risk-boundary curves match the formulas used by the
Strixx76/mold_risk_index Home
Assistant integration (calc_limit_1/2/3 in sensor.py), so if you're using
that integration's Risk Index sensor, this card's zone classification agrees
with it exactly:
RH_limit(T) = coeff * e^(-T_celsius * rate) + floor, clamped to [clampMin, 100]
| Curve | coeff | rate | floor | clampMin |
|---|---|---|---|---|
| Risk of growth | 20 | 0.15 | 73 | 72 |
| Enhanced risk | 17 | 0.11 | 80 | 79 |
| Great risk | 15 | 0.10 | 85 | 84 |
Valid over 0-50°C (32-122°F); outside that range the card shows the "too cold"/"too hot" bands instead. If you're using a different risk model, you can override any of the three curves' parameters:
curves: - { coeff: 20, rate: 0.15, floor: 73, clampMin: 72 } # Risk of growth - { coeff: 17, rate: 0.11, floor: 80, clampMin: 79 } # Enhanced risk - { coeff: 15, rate: 0.10, floor: 85, clampMin: 84 } # Great risk