diff --git a/esphome/components/select/select.h b/esphome/components/select/select.h index f859594cd1..7459c9d146 100644 --- a/esphome/components/select/select.h +++ b/esphome/components/select/select.h @@ -35,7 +35,7 @@ class Select : public EntityBase { #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" /// @deprecated Use current_option() instead. This member will be removed in ESPHome 2026.5.0. - __attribute__((deprecated("Use current_option() instead of .state. Will be removed in 2026.5.0"))) + ESPDEPRECATED("Use current_option() instead of .state. Will be removed in 2026.5.0", "2025.11.0") std::string state{}; Select() = default; diff --git a/esphome/core/entity_base.h b/esphome/core/entity_base.h index 6e5362464f..1486ff5360 100644 --- a/esphome/core/entity_base.h +++ b/esphome/core/entity_base.h @@ -61,9 +61,10 @@ class EntityBase { } // Get/set this entity's icon - [[deprecated("Use get_icon_ref() instead for better performance (avoids string copy). Will stop working in ESPHome " - "2026.5.0")]] std::string - get_icon() const; + ESPDEPRECATED( + "Use get_icon_ref() instead for better performance (avoids string copy). Will be removed in ESPHome 2026.5.0", + "2025.11.0") + std::string get_icon() const; void set_icon(const char *icon); StringRef get_icon_ref() const { static constexpr auto EMPTY_STRING = StringRef::from_lit(""); @@ -160,9 +161,10 @@ class EntityBase { class EntityBase_DeviceClass { // NOLINT(readability-identifier-naming) public: /// Get the device class, using the manual override if set. - [[deprecated("Use get_device_class_ref() instead for better performance (avoids string copy). Will stop working in " - "ESPHome 2026.5.0")]] std::string - get_device_class(); + ESPDEPRECATED("Use get_device_class_ref() instead for better performance (avoids string copy). Will be removed in " + "ESPHome 2026.5.0", + "2025.11.0") + std::string get_device_class(); /// Manually set the device class. void set_device_class(const char *device_class); /// Get the device class as StringRef @@ -178,9 +180,10 @@ class EntityBase_DeviceClass { // NOLINT(readability-identifier-naming) class EntityBase_UnitOfMeasurement { // NOLINT(readability-identifier-naming) public: /// Get the unit of measurement, using the manual override if set. - [[deprecated("Use get_unit_of_measurement_ref() instead for better performance (avoids string copy). Will stop " - "working in ESPHome 2026.5.0")]] std::string - get_unit_of_measurement(); + ESPDEPRECATED("Use get_unit_of_measurement_ref() instead for better performance (avoids string copy). Will be " + "removed in ESPHome 2026.5.0", + "2025.11.0") + std::string get_unit_of_measurement(); /// Manually set the unit of measurement. void set_unit_of_measurement(const char *unit_of_measurement); /// Get the unit of measurement as StringRef