Update utility_account_id in Opower to be lowercase in statistic id (#124837)

Update utility_account_id to be lowercase in statistic id
This commit is contained in:
AutonomousOwl 2024-08-29 02:34:13 -04:00 committed by GitHub
parent 3b6128d590
commit 1101e7ef64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,7 @@ class OpowerCoordinator(DataUpdateCoordinator[dict[str, Forecast]]):
account.meter_type.name.lower(),
# Some utilities like AEP have "-" in their account id.
# Replace it with "_" to avoid "Invalid statistic_id"
account.utility_account_id.replace("-", "_"),
account.utility_account_id.replace("-", "_").lower(),
)
)
cost_statistic_id = f"{DOMAIN}:{id_prefix}_energy_cost"