diff --git a/esphome/components/zwave_proxy/zwave_proxy.cpp b/esphome/components/zwave_proxy/zwave_proxy.cpp index 6376fe6800..b6b25dd025 100644 --- a/esphome/components/zwave_proxy/zwave_proxy.cpp +++ b/esphome/components/zwave_proxy/zwave_proxy.cpp @@ -20,6 +20,10 @@ void ZWaveProxy::loop() { if (this->response_handler_()) { return; // If a response was handled, exit early to avoid a CAN } + if (this->api_connection_ != nullptr && !this->api_connection_->is_connection_setup()) { + ESP_LOGW(TAG, "Subscriber disconnected"); + this->api_connection_ = nullptr; // Unsubscribe if disconnected + } while (this->available()) { uint8_t byte;