1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Adjust fossil energy consumption in demo to avoid negative numbers (#11160)

This commit is contained in:
Paulus Schoutsen
2022-01-11 16:55:32 -08:00
committed by GitHub
parent f852208eff
commit bb40e66833

View File

@@ -83,7 +83,7 @@ export const mockEnergy = (hass: MockHomeAssistant) => {
}));
hass.mockWS("energy/info", () => ({ cost_sensors: [] }));
hass.mockWS("energy/fossil_energy_consumption", ({ period }) => ({
start: period === "month" ? 500 : period === "day" ? 20 : 5,
start: period === "month" ? 250 : period === "day" ? 10 : 2,
}));
const todayString = format(startOfToday(), "yyyy-MM-dd");
const tomorrowString = format(startOfTomorrow(), "yyyy-MM-dd");