diff --git a/esphome/components/datetime/datetime_base.h b/esphome/components/datetime/datetime_base.h index d94dfe9e8b..ba2b47f457 100644 --- a/esphome/components/datetime/datetime_base.h +++ b/esphome/components/datetime/datetime_base.h @@ -20,7 +20,7 @@ class DateTimeBase : public EntityBase { void add_on_state_callback(std::function &&callback) { this->state_callback_.add(std::move(callback)); } - virtual const char *get_component_type() const override = 0; + const char *get_component_type() const override = 0; #ifdef USE_TIME void set_rtc(time::RealTimeClock *rtc) { this->rtc_ = rtc; } diff --git a/esphome/components/sensor/sensor.h b/esphome/components/sensor/sensor.h index 574daa487a..e0376903ea 100644 --- a/esphome/components/sensor/sensor.h +++ b/esphome/components/sensor/sensor.h @@ -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). */ - virtual std::string unique_id(); + std::string unique_id() override; // Get the component type for this entity const char *get_component_type() const override; diff --git a/esphome/components/text_sensor/text_sensor.h b/esphome/components/text_sensor/text_sensor.h index 3bb1a5ea26..75b162b56d 100644 --- a/esphome/components/text_sensor/text_sensor.h +++ b/esphome/components/text_sensor/text_sensor.h @@ -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). */ - virtual std::string unique_id(); + std::string unique_id() override; bool has_state();