From 90cfbf64f0b0163becc2b2c39684a70f472c5479 Mon Sep 17 00:00:00 2001 From: jan iversen Date: Sat, 9 Sep 2023 21:38:51 +0200 Subject: [PATCH] Review comments. --- homeassistant/components/modbus/base_platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/modbus/base_platform.py b/homeassistant/components/modbus/base_platform.py index 07704508a26cd4..4539a4e496c515 100644 --- a/homeassistant/components/modbus/base_platform.py +++ b/homeassistant/components/modbus/base_platform.py @@ -236,7 +236,7 @@ def unpack_structure_result(self, registers: list[int]) -> str | None: if isinstance(v_temp, int) and self._precision == 0: v_result.append(str(v_temp)) elif v_temp is None: - v_result.append("nan") + v_result.append("0") elif v_temp != v_temp: # noqa: PLR0124 # NaN float detection replace with None v_result.append("nan")