mirror of
https://github.com/esphome/esphome.git
synced 2025-09-08 14:22:21 +01:00
fix: update output_id logging to use c_str() and simplify input_id initialization in set_available_outputs method
This commit is contained in:
@@ -79,7 +79,7 @@ void DynamicLamp::dump_config() {
|
||||
}
|
||||
for (uint8_t i = 0; i < 16; i++) {
|
||||
if (this->available_outputs_[i].active) {
|
||||
ESP_LOGCONFIG(TAG, "Using output with id %s as output number %" PRIu8 "", this->available_outputs_[i].output_id, i);
|
||||
ESP_LOGCONFIG(TAG, "Using output with id %s as output number %" PRIu8 "", this->available_outputs_[i].output_id.c_str(), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ void DynamicLamp::set_available_outputs(std::string output_list) {
|
||||
for ( std::string s : v )
|
||||
{
|
||||
std::string input_id{ static_cast<std::string>(this->trim_(s.c_str())) };
|
||||
this->available_outputs_[counter] = LinkedOutput{true, input_id.c_str(), counter, 0, 0, 1.0, false};
|
||||
this->available_outputs_[counter] = LinkedOutput{true, input_id, counter, 0, 0, 1.0, false};
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ uint8_t DynamicLamp::add_lamp() {
|
||||
i++;
|
||||
}
|
||||
this->mark_failed();
|
||||
return 0;.c_str()
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DynamicLamp::add_lamp_output_(uint8_t lamp_number, LinkedOutput output) {
|
||||
|
Reference in New Issue
Block a user