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
|
@ -13,6 +13,7 @@ from typing import Any, cast
|
|||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import recorder, websocket_api
|
||||
from homeassistant.const import ENERGY_KILO_WATT_HOUR
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.integration_platform import (
|
||||
async_process_integration_platforms,
|
||||
|
@ -268,6 +269,7 @@ async def ws_get_fossil_energy_consumption(
|
|||
statistic_ids,
|
||||
"hour",
|
||||
True,
|
||||
{"energy": ENERGY_KILO_WATT_HOUR},
|
||||
)
|
||||
|
||||
def _combine_sum_statistics(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue