From 9af492c219c701adffad9c8bc6ff8409bb20d652 Mon Sep 17 00:00:00 2001 From: Long Vo Date: Thu, 14 Nov 2024 16:48:46 +0700 Subject: [PATCH] updated formatting --- esphome/components/mqtt/mqtt_sensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/mqtt/mqtt_sensor.cpp b/esphome/components/mqtt/mqtt_sensor.cpp index 2f040bff9e..add02e7b9c 100644 --- a/esphome/components/mqtt/mqtt_sensor.cpp +++ b/esphome/components/mqtt/mqtt_sensor.cpp @@ -70,7 +70,7 @@ bool MQTTSensorComponent::send_initial_state() { } bool MQTTSensorComponent::publish_state(float value) { int8_t accuracy = this->sensor_->get_accuracy_decimals(); - if(std::isnan(value)) + if (std::isnan(value)) return this->publish(this->get_state_topic_(), "None"); return this->publish(this->get_state_topic_(), value_accuracy_to_string(value, accuracy)); }