What's New
🐛 Delivery Address Sensor for some Customers (Fixes #26)
Some customers with a billing address different from their tank location were seeing their billing address in sensor.amerigas_propane_service_address instead of their actual tank address. This is a limitation of the portal's accountSummaryViewModel JSON, which stores billing fields rather than the customer's delivery address for some accounts.
A new sensor.amerigas_propane_delivery_address sensor is added. It parses the delivery address directly from the dashboard HTML, capturing the actual tank location regardless of account type.
sensor.amerigas_propane_service_address is unchanged — it continues to reflect the accountSummaryViewModel data as before.
Affected customers: Use
sensor.amerigas_propane_delivery_addressfor your tank's address going forward.Other customers: Both sensors will show the same address. The new sensor may show as unavailable if the HTML patterns don't match — this is expected and does not affect any other sensors.
⚡ Performance — Entity Registry Lookup Optimization
Pre-delivery level entity lookups now use async_get_entity_id() instead of iterating the full entity registry on every call. No behavioral change.
🧪 Initial Unit Tests
Added a tests/ package with unit tests for API initialization and _calculate_gallons_remaining boundary conditions.
Migration
No breaking changes. Update via HACS and restart Home Assistant.
Full Changelog
See [CHANGELOG.md](https://github.com/skircr115/ha-amerigas/blob/main/CHANGELOG.md) for complete technical details.