From e5c9a976833da31bc00b5bbe1e5ddcc680bc3201 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Sat, 8 Feb 2025 13:17:01 +0100 Subject: [PATCH] Do not publish NaN floats, send None instead --- templates/mqtt.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/mqtt.yaml b/templates/mqtt.yaml index 19240b9..abddde6 100644 --- a/templates/mqtt.yaml +++ b/templates/mqtt.yaml @@ -7,3 +7,6 @@ mqtt: # e.g. Reset button, and component+object_id doesn't cut it # to provide uniqueness. discovery_unique_id_generator: mac + # No point in publishing NaN as it will not be accepted by + # HA and only generate error messages. + publish_nan_as_none: true