Skip to content

Commit

Permalink
Remove entity_state_api feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshaughnessy committed Jul 20, 2023
1 parent f099ec6 commit fddd1ab
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/utils/entity-state-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,9 @@ function push(hubChannel: HubChannel, command: HubChannelCommand, payload?: HubC
if (!localClientID) {
throw new Error("Cannot get/set entity states without a local client ID.");
}
if (qsTruthy("entity_state_api")) {
return new Promise((resolve, reject) => {
hubChannel.channel.push(command, payload).receive("ok", resolve).receive("error", reject);
});
} else {
console.warn("Entity state API is inactive. Would have sent:", { command, payload });
return Promise.reject();
}
return new Promise((resolve, reject) => {
hubChannel.channel.push(command, payload).receive("ok", resolve).receive("error", reject);
});
}

function listEntityStates(hubChannel: HubChannel) {
Expand Down

0 comments on commit fddd1ab

Please sign in to comment.