Releases: patrickjcash/nisource-home-assistant
Releases · patrickjcash/nisource-home-assistant
v1.1.1
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
Major Improvements
Fixed Sensor Issues
- Due Date sensor: Now properly displays date (was showing as unavailable)
- Fixed to return Python
dateobject instead of string for DATE device class
- Fixed to return Python
- Total Bill sensor: Fixed name from "this Period" to "Last Period" to reflect arrears billing
- Current Amount Due: Added new sensor using
currentAmountDuefrom 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
- Some columns have leading spaces (e.g.,
Testing Improvements
- Comprehensive diagnostic test: New
test_api_standalone.pyprovides 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
- Gas Usage - Latest month's consumption in CCF
- Total Bill Last Period - Previous billing cycle amount (arrears)
- Balance Due - Current account balance
- Current Amount Due - Amount currently due
- 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