From f080107d86f417d31f30eef1277470ade745a2b2 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Mon, 13 May 2024 07:15:12 +0200 Subject: [PATCH] fix timout switchoff #1680 --- src/roomcontrol.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/roomcontrol.cpp b/src/roomcontrol.cpp index c30c055ad..ecad897e2 100644 --- a/src/roomcontrol.cpp +++ b/src/roomcontrol.cpp @@ -96,14 +96,13 @@ void Roomctrl::send(uint8_t addr) { return; } - if ((uuid::get_uptime() - receive_time_[hc]) > TIMEOUT) { + if (!switch_off_[hc] && (uuid::get_uptime() - receive_time_[hc]) > TIMEOUT) { remotetemp_[hc] = EMS_VALUE_INT16_NOTSET; switch_off_[hc] = true; - send_time_[hc] = uuid::get_uptime() - SEND_INTERVAL; // send now sendtype_[hc] = SendType::TEMP; EMSESP::logger().warning("remotetemp timeout hc%d, stop sending roomtemperature to thermostat", hc); } - if (uuid::get_uptime() - send_time_[hc] > SEND_INTERVAL) { // check interval + if (switch_off_[hc] || (uuid::get_uptime() - send_time_[hc]) > SEND_INTERVAL) { // check interval if (type_[hc] == RC100H) { if (sendtype_[hc] == SendType::HUMI) { // send humidity if (switch_off_[hc]) {