mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-30 01:38:27 +02:00
Keep Device Class in Flash. (#4639)
* Keep Device Class in Flash. * Remove blank line --------- Co-authored-by: Your Name <you@example.com>
This commit is contained in:
@@ -16,13 +16,5 @@ std::string NumberTraits::get_unit_of_measurement() {
|
||||
return "";
|
||||
}
|
||||
|
||||
void NumberTraits::set_device_class(const std::string &device_class) { this->device_class_ = device_class; }
|
||||
|
||||
std::string NumberTraits::get_device_class() {
|
||||
if (this->device_class_.has_value())
|
||||
return *this->device_class_;
|
||||
return "";
|
||||
}
|
||||
|
||||
} // namespace number
|
||||
} // namespace esphome
|
||||
|
||||
Reference in New Issue
Block a user