mirror of
https://github.com/home-assistant/core.git
synced 2025-09-08 22:31:32 +02:00
Fix API field rename for Volvo integration (#151183)
This commit is contained in:
@@ -269,8 +269,12 @@ class VolvoMediumIntervalCoordinator(VolvoBaseCoordinator):
|
|||||||
capabilities = await self.api.async_get_energy_capabilities()
|
capabilities = await self.api.async_get_energy_capabilities()
|
||||||
|
|
||||||
if capabilities.get("isSupported", False):
|
if capabilities.get("isSupported", False):
|
||||||
|
|
||||||
|
def _normalize_key(key: str) -> str:
|
||||||
|
return "chargingStatus" if key == "chargingSystemStatus" else key
|
||||||
|
|
||||||
self._supported_capabilities = [
|
self._supported_capabilities = [
|
||||||
key
|
_normalize_key(key)
|
||||||
for key, value in capabilities.items()
|
for key, value in capabilities.items()
|
||||||
if isinstance(value, dict) and value.get("isSupported", False)
|
if isinstance(value, dict) and value.get("isSupported", False)
|
||||||
]
|
]
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
"chargerConnectionStatus": {
|
"chargerConnectionStatus": {
|
||||||
"isSupported": true
|
"isSupported": true
|
||||||
},
|
},
|
||||||
"chargingStatus": {
|
"chargingSystemStatus": {
|
||||||
"isSupported": true
|
"isSupported": true
|
||||||
},
|
},
|
||||||
"chargingType": {
|
"chargingType": {
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
"chargerConnectionStatus": {
|
"chargerConnectionStatus": {
|
||||||
"isSupported": true
|
"isSupported": true
|
||||||
},
|
},
|
||||||
"chargingStatus": {
|
"chargingSystemStatus": {
|
||||||
"isSupported": true
|
"isSupported": true
|
||||||
},
|
},
|
||||||
"chargingType": {
|
"chargingType": {
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
"chargerConnectionStatus": {
|
"chargerConnectionStatus": {
|
||||||
"isSupported": true
|
"isSupported": true
|
||||||
},
|
},
|
||||||
"chargingStatus": {
|
"chargingSystemStatus": {
|
||||||
"isSupported": true
|
"isSupported": true
|
||||||
},
|
},
|
||||||
"chargingType": {
|
"chargingType": {
|
||||||
|
Reference in New Issue
Block a user