mirror of
https://github.com/esphome/esphome.git
synced 2025-09-16 10:12:21 +01:00
EntityBase
Name can stay in flash. (#4594)
* `EntityBase`can stay in flash. * Trying to please the CI. --------- Co-authored-by: Your Name <you@example.com>
This commit is contained in:
@@ -20,8 +20,7 @@ std::string state_class_to_string(StateClass state_class) {
|
||||
}
|
||||
}
|
||||
|
||||
Sensor::Sensor(const std::string &name) : EntityBase(name), state(NAN), raw_state(NAN) {}
|
||||
Sensor::Sensor() : Sensor("") {}
|
||||
Sensor::Sensor() : state(NAN), raw_state(NAN) {}
|
||||
|
||||
std::string Sensor::get_unit_of_measurement() {
|
||||
if (this->unit_of_measurement_.has_value())
|
||||
|
@@ -57,7 +57,6 @@ std::string state_class_to_string(StateClass state_class);
|
||||
class Sensor : public EntityBase {
|
||||
public:
|
||||
explicit Sensor();
|
||||
explicit Sensor(const std::string &name);
|
||||
|
||||
/// Get the unit of measurement, using the manual override if set.
|
||||
std::string get_unit_of_measurement();
|
||||
|
Reference in New Issue
Block a user