Normalize to kWh when handling WS energy/fossil_energy_consumption (#79649)
* Normalize to kWh when handling WS energy/fossil_energy_consumption * Improve test
This commit is contained in:
parent
312770dbac
commit
5d7756885b
2 changed files with 7 additions and 5 deletions
|
@ -814,25 +814,25 @@ async def test_fossil_energy_consumption(hass, hass_ws_client, recorder_mock):
|
|||
"start": period1,
|
||||
"last_reset": None,
|
||||
"state": 0,
|
||||
"sum": 20,
|
||||
"sum": 20000,
|
||||
},
|
||||
{
|
||||
"start": period2,
|
||||
"last_reset": None,
|
||||
"state": 1,
|
||||
"sum": 30,
|
||||
"sum": 30000,
|
||||
},
|
||||
{
|
||||
"start": period3,
|
||||
"last_reset": None,
|
||||
"state": 2,
|
||||
"sum": 40,
|
||||
"sum": 40000,
|
||||
},
|
||||
{
|
||||
"start": period4,
|
||||
"last_reset": None,
|
||||
"state": 3,
|
||||
"sum": 50,
|
||||
"sum": 50000,
|
||||
},
|
||||
)
|
||||
external_energy_metadata_2 = {
|
||||
|
@ -841,7 +841,7 @@ async def test_fossil_energy_consumption(hass, hass_ws_client, recorder_mock):
|
|||
"name": "Total imported energy",
|
||||
"source": "test",
|
||||
"statistic_id": "test:total_energy_import_tariff_2",
|
||||
"unit_of_measurement": "kWh",
|
||||
"unit_of_measurement": "Wh",
|
||||
}
|
||||
external_co2_statistics = (
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue