Skip to content

v1.0.13

Choose a tag to compare

@funkadelic funkadelic released this 09 Dec 19:20

🐛 Bug Fix

Negative Midnight Values

  • Fixed negative cumulative sum values appearing at midnight
    • Issue: When importing today's data multiple times per hour, the integration was incorrectly starting from today's partial cumulative sum instead of yesterday's final sum
    • This caused midnight (first hour of new day) to show negative values like -513.96 gallons

✅ Testing

New Validation Test Added

  • Added test_cumulative_sum_across_days to test_login.py
    • Validates cumulative sum calculations across day boundaries
    • Fetches yesterday's data and calculates final cumulative sum
    • Fetches today's data and verifies it starts from yesterday's final sum
    • Three validation checks:
      • ✅ First hour cumulative is positive (not negative)
      • ✅ First hour cumulative = yesterday final + first hour usage
      • ✅ Final cumulative = yesterday total + today total

Full Changelog: v1.0.12...v1.013