Skip to content

Releases: patrickjcash/nisource-home-assistant

v1.1.1

27 Jan 23:06

Choose a tag to compare

Fix URLs for KY, PA, MD, VA Columbia Gas customer portals

Thanks to @michaelpetik for the contribution!

NiSource Gas v1.1.0 - Sensor Fixes and Robust CSV Parsing

07 Jan 21:41

Choose a tag to compare

Major Improvements

Fixed Sensor Issues

  • Due Date sensor: Now properly displays date (was showing as unavailable)
    • Fixed to return Python date object instead of string for DATE device class
  • Total Bill sensor: Fixed name from "this Period" to "Last Period" to reflect arrears billing
  • Current Amount Due: Added new sensor using currentAmountDue from API
  • Removed unreliable sensors: Previous Balance and Payments Received (data not consistently available in API)

Robust CSV Parsing

  • CSV column name handling: Added get_csv_value() helper method to handle NiSource's inconsistent CSV format
    • Some columns have leading spaces (e.g., ' Bill Amount' instead of 'Bill Amount')
    • Helper tries both variants, making code resilient to future CSV format changes
    • Prevents negative consumption and missing cost statistics

Testing Improvements

  • Comprehensive diagnostic test: New test_api_standalone.py provides detailed diagnostics
    • Tests authentication, CSV parsing, statistics calculation, and sensor values
    • Helpful for troubleshooting integration issues
  • Archived old test scripts: Cleaned up development test files
  • Documentation: Added tests/README.md with testing instructions

Current Sensors

  1. Gas Usage - Latest month's consumption in CCF
  2. Total Bill Last Period - Previous billing cycle amount (arrears)
  3. Balance Due - Current account balance
  4. Current Amount Due - Amount currently due
  5. Due Date - Next payment due date

Statistics for Energy Dashboard

  • NiSource Gas Consumption - Historical usage data (statistic ID: nisource:consumption)
  • NiSource Gas Cost - Historical billing data (statistic ID: nisource:cost)

Both statistics include up to 18 months of historical data backfilled on first setup.

Documentation

  • Updated DEVELOPMENT.md with CSV column naming best practices
  • Added inline comments explaining arrears billing model and data sources

Full Changelog: v1.0.0...v1.1.0