From 505d643bf03a2682f7eafeea1304d0404e39c166 Mon Sep 17 00:00:00 2001 From: ElVit <54866762+ElVit@users.noreply.github.com> Date: Sat, 12 Jul 2025 14:52:17 +0200 Subject: [PATCH] Update panasonic_heatpump.cpp Added additional check in `panasonicheatpumpcomponent::check_response` to not decode Panasonic extra query. --- components/panasonic_heatpump/panasonic_heatpump.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/panasonic_heatpump/panasonic_heatpump.cpp b/components/panasonic_heatpump/panasonic_heatpump.cpp index fdddd58..7910111 100644 --- a/components/panasonic_heatpump/panasonic_heatpump.cpp +++ b/components/panasonic_heatpump/panasonic_heatpump.cpp @@ -133,7 +133,7 @@ namespace esphome { while (this->available()) { - // Read byte from heatpump and forward it directly to the client (CZ-TAW1) + // Read each byte from heatpump and forward it directly to the client (CZ-TAW1) this->read_byte(&byte_); if (this->uart_client_ != nullptr) { @@ -216,7 +216,7 @@ namespace esphome while (this->uart_client_->available()) { - // Read byte from client and forward it directly to the heatpump + // Read each byte from client and forward it directly to the heatpump this->uart_client_->read_byte(&byte_); this->write_byte(byte_); @@ -273,6 +273,7 @@ namespace esphome if (data.empty()) return false; if (data[0] != 0x71) return false; + if (data[3] != 0x10) return false; if (data.size() != RESPONSE_MSG_SIZE) { ESP_LOGW(TAG, "Invalid response message length: recieved %d - expected %d", data.size(), RESPONSE_MSG_SIZE);