Fix energy panel in Demo (#12906)

This commit is contained in:
Bram Kragten 2022-06-16 17:00:52 +02:00 committed by GitHub
parent a4cb270f09
commit 6c5cf2a0ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import { MockHomeAssistant } from "../../../src/fake_data/provide_hass";
export const mockConfig = (hass: MockHomeAssistant) => {
hass.mockAPI("config/config_entries/entry", () => [
hass.mockAPI("config/config_entries/entry?domain=co2signal", () => [
{
entry_id: "co2signal",
domain: "co2signal",

View File

@ -466,6 +466,7 @@ export const mockHistory = (mockHass: MockHomeAssistant) => {
return results;
}
);
mockHass.mockWS("recorder/get_statistics_metadata", () => []);
mockHass.mockWS("history/list_statistic_ids", () => []);
mockHass.mockWS(
"history/statistics_during_period",

View File

@ -194,6 +194,7 @@ export const provideHass = (
socket: {
readyState: WebSocket.OPEN,
},
haVersion: "DEMO",
} as any,
connected: true,
states: {},