mirror of
https://github.com/esphome/esphome.git
synced 2025-09-06 05:12:21 +01:00
trim whitespace from output list strings in set_available_outputs()
This commit is contained in:
@@ -89,6 +89,8 @@ void DynamicLamp::set_available_outputs(std::string output_list) {
|
||||
}
|
||||
for ( std::string s : v )
|
||||
{
|
||||
std::string id_string;
|
||||
id_string = std::regex_replace(s, std::regex("^ +| +$|( ) +"), "$1");
|
||||
this->available_outputs_[counter] = s.c_str();
|
||||
counter++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user