diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index 87b6aa4f2a..725201f6cd 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -76,7 +76,7 @@ export const connectionMixin = >( translationMetadata, dockedSidebar: "docked", vibrate: true, - debugConnection: false, + debugConnection: __DEV__, suspendWhenHidden: true, enableShortcuts: true, moreInfoEntityId: null, @@ -89,7 +89,7 @@ export const connectionMixin = >( notifyOnError = true, returnResponse = false ) => { - if (__DEV__ || this.hass?.debugConnection) { + if (this.hass?.debugConnection) { // eslint-disable-next-line no-console console.log( "Calling service", @@ -115,7 +115,7 @@ export const connectionMixin = >( ) { return { context: { id: "" } }; } - if (__DEV__ || this.hass?.debugConnection) { + if (this.hass?.debugConnection) { // eslint-disable-next-line no-console console.error( "Error calling service", @@ -167,7 +167,7 @@ export const connectionMixin = >( ) => fetchWithAuth(auth, `${auth.data.hassUrl}${path}`, init), // For messages that do not get a response sendWS: (msg) => { - if (__DEV__ || this.hass?.debugConnection) { + if (this.hass?.debugConnection) { // eslint-disable-next-line no-console console.log("Sending", msg); } @@ -175,14 +175,14 @@ export const connectionMixin = >( }, // For messages that expect a response callWS: (msg) => { - if (__DEV__ || this.hass?.debugConnection) { + if (this.hass?.debugConnection) { // eslint-disable-next-line no-console console.log("Sending", msg); } const resp = conn.sendMessagePromise(msg); - if (__DEV__ || this.hass?.debugConnection) { + if (this.hass?.debugConnection) { resp.then( // eslint-disable-next-line no-console (result) => console.log("Received", result),