This commit is contained in:
J. Nick Koston
2025-05-13 22:04:23 -05:00
parent 3987b98044
commit 8769ddcfa9
3 changed files with 2 additions and 6 deletions

View File

@@ -143,7 +143,7 @@ class Sensor : public EntityBase, public EntityBase_DeviceClass, public EntityBa
*
* @deprecated Do not use for new sensors, a suitable unique ID is automatically generated (2023.4).
*/
std::string unique_id() override;
virtual std::string unique_id();
void internal_send_state_to_frontend(float state);

View File

@@ -65,7 +65,7 @@ class TextSensor : public EntityBase, public EntityBase_DeviceClass {
*
* @deprecated Do not use for new sensors, a suitable unique ID is automatically generated (2023.4).
*/
std::string unique_id() override;
virtual std::string unique_id();
bool has_state();

View File

@@ -29,10 +29,6 @@ class EntityBase {
// Get the unique Object ID of this Entity
uint32_t get_object_id_hash();
// Get the unique ID for this entity, can be overridden by entities
// that need custom unique IDs
virtual std::string unique_id() { return ""; }
// Get/set whether this Entity should be hidden from outside of ESPHome
bool is_internal() const;
void set_internal(bool internal);