1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 15:52:20 +01:00

Remove deprecated attribute from virtual entity methods (#3056)

This commit is contained in:
Oxan van Leeuwen
2022-01-16 23:40:15 +01:00
committed by GitHub
parent 1ea6f957bc
commit 89e7448007
3 changed files with 25 additions and 11 deletions

View File

@@ -74,8 +74,10 @@ class BinarySensor : public EntityBase {
// ========== OVERRIDE METHODS ==========
// (You'll only need this when creating your own custom binary sensor)
/// Get the default device class for this sensor, or empty string for no default.
ESPDEPRECATED("device_class() is deprecated, set property during config validation instead.", "2022.01")
/** 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();
protected: