From c532a9023ab33c3b34c6621b371aac000b9f2124 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 20 Dec 2024 14:05:33 +0100 Subject: [PATCH] Revert remove hass debug connection in dev (#23356) --- src/state/connection-mixin.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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),