1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-31 07:03:55 +00:00

modbus_controller: remove hard coded register size (#2654)

This commit is contained in:
Martin
2021-11-10 04:24:44 +01:00
committed by GitHub
parent 875b803483
commit 662773b075
2 changed files with 4 additions and 35 deletions

View File

@@ -25,13 +25,6 @@ class ModbusTextSensor : public Component, public text_sensor::TextSensor, publi
this->sensor_value_type = SensorValueType::RAW;
this->force_new_range = force_new_range;
}
size_t get_register_size() const override {
if (sensor_value_type == SensorValueType::RAW) {
return this->response_bytes_;
} else {
return SensorItem::get_register_size();
}
}
void dump_config() override;