1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

Drop deprecated entity property base methods (#4539)

This commit is contained in:
Oxan van Leeuwen
2023-03-09 01:08:45 +01:00
committed by GitHub
parent afc1c83af4
commit ba1416cc0e
6 changed files with 7 additions and 68 deletions

View File

@@ -208,14 +208,10 @@ Cover::Cover() : Cover("") {}
std::string Cover::get_device_class() {
if (this->device_class_override_.has_value())
return *this->device_class_override_;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
return this->device_class();
#pragma GCC diagnostic pop
return "";
}
bool Cover::is_fully_open() const { return this->position == COVER_OPEN; }
bool Cover::is_fully_closed() const { return this->position == COVER_CLOSED; }
std::string Cover::device_class() { return ""; }
CoverCall CoverRestoreState::to_call(Cover *cover) {
auto call = cover->make_call();

View File

@@ -170,12 +170,6 @@ class Cover : public EntityBase {
virtual void control(const CoverCall &call) = 0;
/** Override this to set the default device class.
*
* @deprecated This method is deprecated, set the property during config validation instead. (2022.1)
*/
virtual std::string device_class();
optional<CoverRestoreState> restore_state_();
CallbackManager<void()> state_callback_{};