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 Bram Kragten
parent 71de50dae8
commit 3078b47d06

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"