Add coordinator data to Renault diagnostics (#64783)

* Add coordinator data to renault diagnostics

* Adjust tests

* Adjust tests

* Add GPS coordinates to redacted information
This commit is contained in:
epenet 2022-01-24 10:15:57 +01:00 committed by GitHub
parent 17d7dc991f
commit aa9ccc7dfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 7 deletions

View file

@ -134,6 +134,31 @@ VEHICLE_DETAILS = {
"radioCode": REDACTED,
}
VEHICLE_DATA = {
"battery": {
"batteryAutonomy": 141,
"batteryAvailableEnergy": 31,
"batteryCapacity": 0,
"batteryLevel": 60,
"batteryTemperature": 20,
"chargingInstantaneousPower": 27,
"chargingRemainingTime": 145,
"chargingStatus": 1.0,
"plugStatus": 1,
"timestamp": "2020-01-12T21:40:16Z",
},
"charge_mode": {
"chargeMode": "always",
},
"cockpit": {
"totalMileage": 49114.27,
},
"hvac_status": {
"externalTemperature": 8.0,
"hvacStatus": "off",
},
}
@pytest.mark.usefixtures("fixtures_with_data")
@pytest.mark.parametrize("vehicle_type", ["zoe_40"], indirect=True)
@ -154,7 +179,7 @@ async def test_entry_diagnostics(
},
"title": "Mock Title",
},
"vehicles": [VEHICLE_DETAILS],
"vehicles": [{"details": VEHICLE_DETAILS, "data": VEHICLE_DATA}],
}
@ -174,4 +199,4 @@ async def test_device_diagnostics(
assert await get_diagnostics_for_device(
hass, hass_client, config_entry, device
) == {"details": VEHICLE_DETAILS}
) == {"details": VEHICLE_DETAILS, "data": VEHICLE_DATA}