1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-17 02:32:20 +01:00

Remove a whole bunch of deprecated/removed stuff (#1981)

This commit is contained in:
Jesse Hills
2021-07-14 14:42:16 +12:00
committed by GitHub
parent 04c3a43c17
commit 07ae8ec553
23 changed files with 14 additions and 141 deletions

View File

@@ -28,7 +28,6 @@ void Sensor::publish_state(float state) {
this->filter_list_->input(state);
}
}
void Sensor::push_new_value(float state) { this->publish_state(state); }
std::string Sensor::unit_of_measurement() { return ""; }
std::string Sensor::icon() { return ""; }
uint32_t Sensor::update_interval() { return 0; }
@@ -104,9 +103,7 @@ void Sensor::clear_filters() {
}
this->filter_list_ = nullptr;
}
float Sensor::get_value() const { return this->state; }
float Sensor::get_state() const { return this->state; }
float Sensor::get_raw_value() const { return this->raw_state; }
float Sensor::get_raw_state() const { return this->raw_state; }
std::string Sensor::unique_id() { return ""; }

View File

@@ -87,12 +87,8 @@ class Sensor : public Nameable {
/// Clear the entire filter chain.
void clear_filters();
/// Getter-syntax for .value. Please use .state instead.
float get_value() const ESPDEPRECATED(".value is deprecated, please use .state");
/// Getter-syntax for .state.
float get_state() const;
/// Getter-syntax for .raw_value. Please use .raw_state instead.
float get_raw_value() const ESPDEPRECATED(".raw_value is deprecated, please use .raw_state");
/// Getter-syntax for .raw_state
float get_raw_state() const;
@@ -114,12 +110,6 @@ class Sensor : public Nameable {
*/
void publish_state(float state);
/** Push a new value to the MQTT front-end.
*
* Note: deprecated, please use publish_state.
*/
void push_new_value(float state) ESPDEPRECATED("push_new_value is deprecated. Please use .publish_state instead");
// ========== INTERNAL METHODS ==========
// (In most use cases you won't need these)
/// Add a callback that will be called every time a filtered value arrives.