mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 12:06:26 +01:00
Remove deprecated attribute from virtual entity methods (#3056)
This commit is contained in:
parent
282313ab52
commit
c5eba04517
@ -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:
|
||||
|
@ -169,7 +169,11 @@ class Cover : public EntityBase {
|
||||
friend CoverCall;
|
||||
|
||||
virtual void control(const CoverCall &call) = 0;
|
||||
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();
|
||||
|
||||
optional<CoverRestoreState> restore_state_();
|
||||
|
@ -150,20 +150,28 @@ class Sensor : public EntityBase {
|
||||
void internal_send_state_to_frontend(float state);
|
||||
|
||||
protected:
|
||||
/// Override this to set the default unit of measurement.
|
||||
ESPDEPRECATED("unit_of_measurement() is deprecated, set property during config validation instead.", "2022.01")
|
||||
/** Override this to set the default unit of measurement.
|
||||
*
|
||||
* @deprecated This method is deprecated, set the property during config validation instead. (2022.1)
|
||||
*/
|
||||
virtual std::string unit_of_measurement(); // NOLINT
|
||||
|
||||
/// Override this to set the default accuracy in decimals.
|
||||
ESPDEPRECATED("accuracy_decimals() is deprecated, set property during config validation instead.", "2022.01")
|
||||
/** Override this to set the default accuracy in decimals.
|
||||
*
|
||||
* @deprecated This method is deprecated, set the property during config validation instead. (2022.1)
|
||||
*/
|
||||
virtual int8_t accuracy_decimals(); // NOLINT
|
||||
|
||||
/// Override this to set the default device class.
|
||||
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(); // NOLINT
|
||||
|
||||
/// Override this to set the default state class.
|
||||
ESPDEPRECATED("state_class() is deprecated, set property during config validation instead.", "2022.01")
|
||||
/** Override this to set the default state class.
|
||||
*
|
||||
* @deprecated This method is deprecated, set the property during config validation instead. (2022.1)
|
||||
*/
|
||||
virtual StateClass state_class(); // NOLINT
|
||||
|
||||
uint32_t hash_base() override;
|
||||
|
Loading…
Reference in New Issue
Block a user