mirror of
https://github.com/esphome/esphome.git
synced 2026-09-02 02:56:01 +00:00
cleanup
This commit is contained in:
@@ -130,7 +130,9 @@ class Fan : public EntityBase {
|
||||
/// Set the restore mode of this fan.
|
||||
void set_restore_mode(FanRestoreMode restore_mode) { this->restore_mode_ = restore_mode; }
|
||||
|
||||
/// Get the current preset mode (returns view of string stored in traits, or empty view if not set)
|
||||
/// Get the current preset mode.
|
||||
/// Returns a view of the string stored in traits (static storage), or empty view if not set.
|
||||
/// Safe to use as the underlying string has static lifetime.
|
||||
std::string_view get_preset_mode() const {
|
||||
return this->preset_mode_ != nullptr ? std::string_view(this->preset_mode_) : std::string_view();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user