diff --git a/esphome/components/climate/climate.h b/esphome/components/climate/climate.h index d81702fb0c..7c2a0b1ed3 100644 --- a/esphome/components/climate/climate.h +++ b/esphome/components/climate/climate.h @@ -141,7 +141,7 @@ struct ClimateDeviceRestoreState { float target_temperature_low; float target_temperature_high; }; - } __attribute__((packed)); + }; float target_humidity; /// Convert this struct to a climate call that can be performed. diff --git a/esphome/components/text/text_traits.h b/esphome/components/text/text_traits.h index 6ec1e9da69..952afa70c7 100644 --- a/esphome/components/text/text_traits.h +++ b/esphome/components/text/text_traits.h @@ -21,7 +21,7 @@ class TextTraits { int get_max_length() const { return this->max_length_; } // Set/get the pattern. - void set_pattern(const std::string &pattern) { this->pattern_ = pattern; } + void set_pattern(std::string pattern) { this->pattern_ = std::move(pattern); } std::string get_pattern() const { return this->pattern_; } // Set/get the frontend mode. diff --git a/esphome/core/entity_base.h b/esphome/core/entity_base.h index 4ca21f9ee5..434111de79 100644 --- a/esphome/core/entity_base.h +++ b/esphome/core/entity_base.h @@ -63,7 +63,7 @@ class EntityBase { EntityCategory entity_category_{ENTITY_CATEGORY_NONE}; }; -class EntityBase_DeviceClass { // NOLINT(readability-identifier-naming) +class EntityBase_DeviceClass { public: /// Get the device class, using the manual override if set. std::string get_device_class(); @@ -74,7 +74,7 @@ class EntityBase_DeviceClass { // NOLINT(readability-identifier-naming) const char *device_class_{nullptr}; ///< Device class override }; -class EntityBase_UnitOfMeasurement { // NOLINT(readability-identifier-naming) +class EntityBase_UnitOfMeasurement { public: /// Get the unit of measurement, using the manual override if set. std::string get_unit_of_measurement();