refactored entity listener so that live events actually come in

This commit is contained in:
ari committed 2022-07-28 22:27:57 -04:00
1 parent 57c86093a4
commit 883955e523
12 files changed
+214 -266

No files matched your search

+2 -20
View File
@@ -17,20 +17,10 @@ export const useMockHAEntities = (args: MockHAEntitiesProps) => {
{
additional: {},
ready: false,
collection: {
state: {},
refresh: () => new Promise(() => {}),
subscribe: () => () => {},
},
},
{
additional: {},
ready: false,
collection: {
state: {},
refresh: () => new Promise(() => {}),
subscribe: () => () => {},
},
}
);
} else {
@@ -38,20 +28,12 @@ export const useMockHAEntities = (args: MockHAEntitiesProps) => {
{
additional: {},
ready: true,
collection: {
state: args.entities,
refresh: () => new Promise(() => {}),
subscribe: () => () => {},
},
collection: args.entities,
},
{
additional: {},
ready: true,
collection: {
state: args.entitySource,
refresh: () => new Promise(() => {}),
subscribe: () => () => {},
},
collection: args.entitySource,
}
);
}