From 219c5953f152e375469ba81e4728dcbfcf9c1526 Mon Sep 17 00:00:00 2001 From: Avirsaam <107193364+Avirsaam@users.noreply.github.com> Date: Mon, 5 Sep 2022 03:50:27 +0300 Subject: [PATCH] Update modbus_controller.cpp (#3768) --- esphome/components/modbus_controller/modbus_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/modbus_controller/modbus_controller.cpp b/esphome/components/modbus_controller/modbus_controller.cpp index bd2fec3ece..e60b016a17 100644 --- a/esphome/components/modbus_controller/modbus_controller.cpp +++ b/esphome/components/modbus_controller/modbus_controller.cpp @@ -236,7 +236,7 @@ size_t ModbusController::create_register_ranges_() { } } - if (curr->start_address == r.start_address) { + if (curr->start_address == r.start_address && curr->register_type == r.register_type) { // use the lowest non zero value for the whole range // Because zero is the default value for skip_updates it is excluded from getting the min value. if (curr->skip_updates != 0) {