mirror of
https://github.com/esphome/esphome.git
synced 2025-10-01 17:42:22 +01:00
Remove legacy unique_id field from entities (#9022)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -70,7 +70,5 @@ void TextSensor::internal_send_state_to_frontend(const std::string &state) {
|
||||
this->callback_.call(state);
|
||||
}
|
||||
|
||||
std::string TextSensor::unique_id() { return ""; }
|
||||
|
||||
} // namespace text_sensor
|
||||
} // namespace esphome
|
||||
|
@@ -20,9 +20,6 @@ namespace text_sensor {
|
||||
if (!(obj)->get_icon().empty()) { \
|
||||
ESP_LOGCONFIG(TAG, "%s Icon: '%s'", prefix, (obj)->get_icon().c_str()); \
|
||||
} \
|
||||
if (!(obj)->unique_id().empty()) { \
|
||||
ESP_LOGV(TAG, "%s Unique ID: '%s'", prefix, (obj)->unique_id().c_str()); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define SUB_TEXT_SENSOR(name) \
|
||||
@@ -64,11 +61,6 @@ class TextSensor : public EntityBase, public EntityBase_DeviceClass {
|
||||
|
||||
// ========== INTERNAL METHODS ==========
|
||||
// (In most use cases you won't need these)
|
||||
/** Override this method to set the unique ID of this sensor.
|
||||
*
|
||||
* @deprecated Do not use for new sensors, a suitable unique ID is automatically generated (2023.4).
|
||||
*/
|
||||
virtual std::string unique_id();
|
||||
|
||||
void internal_send_state_to_frontend(const std::string &state);
|
||||
|
||||
|
Reference in New Issue
Block a user