From 79f861f012c7b68e531124411e474081d3491fd8 Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 31 Mar 2023 06:29:17 +0200 Subject: [PATCH] Avoid sensor padding. (#4638) Co-authored-by: Your Name --- esphome/components/sensor/sensor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/sensor/sensor.h b/esphome/components/sensor/sensor.h index 4308eafb12..efcada1411 100644 --- a/esphome/components/sensor/sensor.h +++ b/esphome/components/sensor/sensor.h @@ -161,7 +161,6 @@ class Sensor : public EntityBase { CallbackManager raw_callback_; ///< Storage for raw state callbacks. CallbackManager callback_; ///< Storage for filtered state callbacks. - bool has_state_{false}; Filter *filter_list_{nullptr}; ///< Store all active filters. optional unit_of_measurement_; ///< Unit of measurement override @@ -169,6 +168,7 @@ class Sensor : public EntityBase { optional device_class_; ///< Device class override optional state_class_{STATE_CLASS_NONE}; ///< State class override bool force_update_{false}; ///< Force update mode + bool has_state_{false}; }; } // namespace sensor