diff --git a/src/state/connection-mixin.ts b/src/state/connection-mixin.ts index 6afb6d277d7f..2a219abccb36 100644 --- a/src/state/connection-mixin.ts +++ b/src/state/connection-mixin.ts @@ -89,7 +89,7 @@ export const connectionMixin = >( notifyOnError = true, returnResponse = false ) => { - if (this.hass?.debugConnection) { + if (__DEV__ || this.hass?.debugConnection) { // eslint-disable-next-line no-console console.log( "Calling service", @@ -115,7 +115,7 @@ export const connectionMixin = >( ) { return { context: { id: "" } }; } - if (this.hass?.debugConnection) { + if (__DEV__ || 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 (this.hass?.debugConnection) { + if (__DEV__ || 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 (this.hass?.debugConnection) { + if (__DEV__ || this.hass?.debugConnection) { // eslint-disable-next-line no-console console.log("Sending", msg); } const resp = conn.sendMessagePromise(msg); - if (this.hass?.debugConnection) { + if (__DEV__ || this.hass?.debugConnection) { resp.then( // eslint-disable-next-line no-console (result) => console.log("Received", result),