Breakfix to handle null value in Teslemetry (#116206)

* Fixes

* Remove unused test
pull/116264/head
Brett Adams 2024-04-26 23:44:13 +10:00 committed by GitHub
parent 63dffbcce1
commit e909074dfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ class TeslemetryEnergyDataCoordinator(TeslemetryDataCoordinator):
# Convert Wall Connectors from array to dict
data["response"]["wall_connectors"] = {
wc["din"]: wc for wc in data["response"].get("wall_connectors", [])
wc["din"]: wc for wc in (data["response"].get("wall_connectors") or [])
}
return data["response"]