From 21507c570dd1235f3fcdf6e6b776acdb09c10a30 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 02:29:46 +0000 Subject: [PATCH] [pre-commit.ci lite] apply automatic fixes --- esphome/components/modbus_controller/modbus_controller.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/modbus_controller/modbus_controller.h b/esphome/components/modbus_controller/modbus_controller.h index 111b0d574e..35aab81e90 100644 --- a/esphome/components/modbus_controller/modbus_controller.h +++ b/esphome/components/modbus_controller/modbus_controller.h @@ -286,7 +286,8 @@ class ServerRegister { return std::to_string(value); case SensorValueType::FP32_R: case SensorValueType::FP32: { - // max 48: float with %.1f can be up to 42 chars incl. null (3.4e38 → 38 integer digits + decimal point + 1 decimal digit + optional sign) + // max 48: float with %.1f can be up to 42 chars incl. null (3.4e38 → 38 integer digits + decimal point + 1 + // decimal digit + optional sign) char buf[48]; snprintf(buf, sizeof(buf), "%.1f", bit_cast(static_cast(value))); return buf;