Smart humidity intelligence for Home Assistant – badges, comfort band and 24-hour multi-room chart.
Version: v1.0.2 reverted back to original code as v1.0.1 was too unstable.
TL;DR:
Drop one package file into/config/packages/, paste one Lovelace card, change your room sensor IDs, and you get:
- Live house-average humidity
- Condensation & mould risk badges
- 7-day humidity drift
- A Comfort Band panel with actionable guidance
- A dropdown 24-hour multi-room humidity chart
-
Four badges across the top
- Humidity – live house average with dynamic colour + glow
- Condensation – worst-room risk (“Watch / Risk / Danger”)
- Mould – worst-room risk (“Watch / Risk / Danger”)
- Drift – 7-day difference vs historical mean (up/down trend)
-
Comfort Band panel
- Shows target band (default 45–55 %)
- Plain-language comfort text: dry / sweet spot / high
- Worst-room condensation + mould summary lines
- Tapping anywhere on the card toggles an expansion chevron
-
Humidity Constellation (24 h)
- ApexCharts line chart of all your key rooms
- Target band rendered as a shaded zone
- 24-hour, group-by-15-minutes smoothing
- Hidden by default; opened by the Comfort Band chevron
-
Backend intelligence (no automations required)
- House average humidity
- 7-day mean and drift
- Worst-room condensation and mould with simple thresholds
- Binary “danger” flags to drive the badge styling
-
Responsive UI
- Circular badges scale between phone and tablet widths
- Works as a single stack or dropped into a larger dashboard
- Home Assistant 20251203.3 (tested on recent installs)
- HACS (recommended) for easy frontend installation
- Frontend cards:
-
packages/humidity_intelligence.yamlAll backend logic: helpers, template sensors, statistics, risk flags. -
lovelace/humidity_intelligence_card.yamlThe UI card: badges, Comfort Band + chevron, Humidity Constellation chart.
The README assumes this structure, but you can rename folders if you like.
If you already use packages, you can skip this step.
-
Create a folder called
packagesinside your Home Assistant config folder:/config/packages/ -
Open
configuration.yamland add (or extend) thehomeassistant:block:homeassistant: packages: !include_dir_merge_named packages/
-
Go to Settings → System → Developer tools → Check configuration.
-
If valid, restart Home Assistant.
Install via HACS → Frontend:
-
Search for and install:
- button-card
- apexcharts-card
- card-mod
-
Restart Home Assistant after all three are installed.
-
Copy
packages/humidity_intelligence.yamlfrom this repo into:/config/packages/humidity_intelligence.yaml -
Open the file and edit the room humidity entities under this block:
# >>> EDIT THESE ENTITY IDS TO MATCH YOUR SENSORS <<< {% set rooms = [ 'sensor.living_room_humidity', 'sensor.kitchen_humidity', 'sensor.hallway_humidity', 'sensor.bedroom_humidity', 'sensor.kids_room_humidity', 'sensor.bathroom_humidity', 'sensor.toilet_humidity' ] %}
Replace these with your own humidity sensor entity IDs. You can safely remove rooms you don’t have, or add more.
-
(Optional) Adjust the comfort band thresholds:
- name: House Humidity Target Low state: 45 # change to your preferred lower limit - name: House Humidity Target High state: 55 # change to your preferred upper limit
-
Go to Developer tools → Check configuration.
-
Restart Home Assistant.
After restart you should see (under Developer tools → States):
sensor.house_average_humiditysensor.house_humidity_mean_7dsensor.house_humidity_drift_7dsensor.worst_room_condensationsensor.worst_room_condensation_risksensor.worst_room_mouldsensor.worst_room_mould_riskbinary_sensor.humidity_dangerbinary_sensor.condensation_dangerbinary_sensor.mould_dangerinput_boolean.humidity_constellation_expanded
If any of these are missing, re-check that the package is loaded and your YAML syntax is valid.
You can either import the card file or paste the YAML manually.
- Go to the dashboard where you want the card.
- Click ⋮ → Edit dashboard → + Add card → Manual.
- Paste the contents of
lovelace/humidity_intelligence_card.yaml. - Save.
The card will show:
- 4 badges on the first row
- Comfort Band panel
- Tapping the Comfort Band toggles the chevron and reveals/hides the 24-hour chart.
If you like to keep your Lovelace in files:
-
Save the UI card as:
/config/lovelace/humidity_intelligence_card.yaml -
In your view definition (raw YAML mode), use an include:
views: - title: Climate path: climate cards: - !include /config/lovelace/humidity_intelligence_card.yaml
-
Save and reload the dashboard.
In humidity_intelligence.yaml, find the House Average Humidity sensor and replace the example entities with your actual humidity sensors:
{% set rooms = [
'sensor.living_room_humidity', # ← change to your entity IDs
'sensor.kitchen_humidity',
'sensor.hallway_humidity',
'sensor.bedroom_humidity',
'sensor.kids_room_humidity',
'sensor.bathroom_humidity',
'sensor.toilet_humidity'
] %}
If you don’t change these, the package will still load, but sensor.house_average_humidity will see them as unknown and will throw a numeric value error.### Colour thresholds and glow
The badge borders and glows are driven by inline JavaScript in button-card styles.
If you want to change the thresholds (e.g. what counts as “Danger” or “Watch”), edit the relevant if blocks in the card YAML.
Example (humidity badge border):
if (h < 45) return '2px solid rgba(56,189,248,0.75)';
if (h < 49) return '2px solid rgba(125,211,252,0.70)';
if (h < 60) return '2px solid rgba(74,222,128,0.70)';
if (h < 68) return '2px solid rgba(250,204,21,0.75)';
return '2px solid rgba(239,68,68,0.85)';These are set in the package file:
{% if h >= 80 %}
Danger
{% elif h >= 70 %}
Risk
{% elif h >= 60 %}
Watch
{% else %}
Low
{% endif %}Adjust the cut-offs to fit your building and climate.
The ApexCharts annotations use the same House Humidity Target Low/High sensors, so if you tweak the targets in the package, the shaded Target band in the chart will track automatically.
The card loads but shows unknown everywhere
- Check your entity IDs in the package file.
- Make sure each room sensor is actually reporting a numeric humidity value.
statisticssensors need some history to produce a mean; the 7-day drift may show0orunknownright after a restart until enough samples are collected.
The chevron doesn’t open the chart
- Confirm
input_boolean.humidity_constellation_expandedexists and ison/off. - Check the
entityfor the Comfort Band button: it should be that input_boolean. - The chart is wrapped in a
conditionalcard that only shows when the boolean ison.
YAML error when restarting
- Almost always a spacing or copy/paste issue.
- Run the built-in Check configuration and read the line number it points to.
- Make sure the
homeassistant: packages:line inconfiguration.yamlhas the correct indentation.
- Per-room detail view / drill-down
- Optional “winter vs summer” target presets
- Temperature + humidity combined view
- HACS-ready structure & auto-release
If you have ideas, open an issue or start a discussion.
Issues, ideas and pull requests are welcome:
- Tweak the thresholds, try it in different climates and report back.
- Share screenshots and alternative colour themes.
- Help test on mobile vs tablet dashboards.
When submitting a PR, please:
- Keep personal entity names out of the default config.
- Stick to standard Home Assistant practices (packages, includes, etc.).
- Aim for zero console errors in the browser.
This project is released under the MIT License. You’re free to use, modify and share it in your own dashboards and automations.
Humidity Intelligence was built for Home Assistant users who want more than a single humidity number – they want a story: where the moisture is going, which room is getting risky, and whether it’s time to ventilate or relax.
If you use this card in your setup, a star on the repo and a screenshot in the issues/discussions are always appreciated 💧
