This commit is contained in:
J. Nick Koston
2026-01-08 21:49:59 -10:00
parent 6c502d879b
commit 1e30f54dff
+3 -1
View File
@@ -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();
}