Skip to content

v1.0.2

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Nov 22:46
8083612

Heating & Cooling Degree Days – Persistent Storage and Improved Configuration (v1.0.2)

Downloads for this release

A new release introducing persistent storage for historical data and improved default configuration settings. This release ensures data survives Home Assistant restarts and provides better default values for a smoother setup experience.

✨ What's New?

Persistent Storage for Historical Data

The integration now saves daily degree days values to persistent storage, ensuring data survives Home Assistant restarts:

  • Automatic data persistence using Home Assistant's Store helper
  • Historical daily HDD and CDD values are automatically saved after each update cycle
  • Data is automatically restored on startup before the first refresh
  • Prevents loss of accumulated weekly and monthly degree days calculations after restarts
  • Each integration instance uses its own storage file for independent operation

This fixes #57 where monthly and weekly degree days values would reset after a Home Assistant restart.

Improved Default Base Temperature Configuration

The default base temperature has been updated to use more appropriate values:

  • Changed default for Celsius: From 65.0°C to 18.0°C (standard reference for heating degree days in metric systems)
  • Kept default for Fahrenheit: Remains 65.0°F (standard reference for imperial systems)
  • Automatic unit detection: Temperature unit is now automatically detected from Home Assistant preferences
  • Simplified configuration: Removed temperature unit field from configuration flow
  • Better UI guidance: Added field descriptions in configuration UI

🔧 Technical Details

  • Storage location: .storage/heating_cooling_degree_days_data_{entry_id}.json
  • Data format: JSON with ISO date strings as keys and float values
  • Data retention: 60 days (existing cleanup logic preserved)
  • Error handling: Graceful fallback to empty dictionaries if storage operations fail

📝 Important Notes

  • No breaking changes: This release is fully backward compatible. Existing setups continue to work seamlessly.
  • Existing installations: Will automatically get persistent storage enabled. Historical data will start accumulating from the upgrade date.
  • Temperature unit: Existing configurations continue to use their current setting. New installations benefit from automatic detection.

🧪 Testing Needed

We would appreciate feedback on:

  • Data Persistence: Verify that weekly and monthly degree days values are preserved after Home Assistant restarts.
  • Historical Accuracy: Confirm that calculations immediately after restart use the full historical data (no reset to zero or loss of previous days).
  • Multiple Instances: Test that multiple integration instances store data independently without conflicts.
  • Storage Behavior: Monitor storage file creation and verify data is being saved correctly (check .storage/ directory).
  • Default Configuration: Verify that default base temperature is correctly set (18°C for Celsius, 65°F for Fahrenheit) and that temperature unit is auto-detected.
  • Configuration Flow: Test the simplified configuration flow and verify field descriptions appear correctly.

🐛 Bug Reports

If you encounter any issues, please open a GitHub issue and include:

  • Your Home Assistant version.
  • Your integration configuration (temperature sensor, base temperature, enabled periods).
  • Debug-level logs showing data loading and saving operations.
  • A clear description of the problem, including:
    • Whether data persists after restart or if values reset to zero.
    • Which sensors are affected (daily, weekly, monthly, HDD, CDD).
    • When the issue occurs (first startup after upgrade, after restart, during operation).
    • Whether storage files are created in .storage/ directory.
  • Storage file contents (if safe to share, with any sensitive data redacted).

📋 Compatibility

  • Minimum required versions:
    • Home Assistant Core: 2024.1.0
    • HACS: 1.32.0

🔧 Installation / Update

Via HACS (recommended)

  1. Open HACS
  2. Go to Integrations
  3. Click the three dots menu on "Heating & Cooling Degree Days"
  4. Select "Update"
  5. Restart Home Assistant

Manual Installation

  1. Download the latest release from the releases page
  2. Extract the custom_components folder to your Home Assistant configuration directory
  3. Restart Home Assistant