Heating & Cooling Degree Days – Negative Temperature Fix (v1.0.3)
A maintenance release that fixes sensor validation for negative temperatures. The integration now correctly handles temperatures below 0°C (or 0°F), so degree days calculations work reliably in winter conditions.
✨ What's New?
Fix: Negative Temperatures in Sensor Validation
Temperature readings are now validated using a proper numeric conversion instead of a string check:
- Previous behavior: Validation used
state.replace(".", "", 1).isdigit(), which rejected negative values because the minus sign is not a digit. This caused the integration to fail or skip data when temperatures dropped below 0°C. - New behavior: Validation uses
try/except float()conversion, which correctly accepts:- Negative temperatures (e.g. -5.2°C)
- Scientific notation (e.g. 1e-3)
- All valid numeric formats
- Impact: Degree days calculations continue to work correctly during cold weather.
This fixes #76.
Thanks to @roumano for reporting this issue and helping improve the integration.
📝 Important Notes
- No breaking changes: This release is fully backward compatible.
- Recommended for cold climates: If you experienced issues in winter (missing data, failed updates, or incorrect degree days when temperatures went below zero), upgrading to 1.0.3 is recommended.
📋 Compatibility
- Minimum required versions:
- Home Assistant Core: 2024.1.0
- HACS: 1.32.0
🔧 Installation / Update
Via HACS (recommended)
- Open HACS
- Go to Integrations
- Click the three dots menu on "Heating & Cooling Degree Days"
- Select "Update"
- Restart Home Assistant
Manual Installation
- Download the latest release from the releases page
- Extract the
custom_componentsfolder to your Home Assistant configuration directory - Restart Home Assistant