mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 18:48:39 +00:00
[modbus] Fix parsing & split out server mode (#11969)
This commit is contained in:
@@ -201,7 +201,7 @@ void ModbusController::update() {
|
||||
// walk through the sensors and determine the register ranges to read
|
||||
size_t ModbusController::create_register_ranges_() {
|
||||
this->register_ranges_.clear();
|
||||
if (this->parent_->role == modbus::ModbusRole::CLIENT && this->sensorset_.empty()) {
|
||||
if (this->sensorset_.empty()) {
|
||||
ESP_LOGW(TAG, "No sensors registered");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user