[modbus] Share helper functions across modbus components - part B (#14172)

Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-03-31 10:48:16 -10:00
1 parent da6c4e20fe
commit 2cb987095d
9 files changed
+277 -222

No files matched your search

@@ -34,7 +34,7 @@ void ModbusFloatOutput::write_state(float value) {
}
// lambda didn't set payload
if (data.empty()) {
data = float_to_payload(value, this->sensor_value_type);
data = modbus::helpers::float_to_payload(value, this->sensor_value_type);
}
ESP_LOGD(TAG, "Updating register: start address=0x%X register count=%d new value=%.02f (val=%.02f)",