1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-27 23:52:28 +01:00

Always use brackets around single log macros (#4072)

This commit is contained in:
Jesse Hills
2022-11-23 10:32:51 +13:00
committed by GitHub
parent 91925b1826
commit ef26677b67
29 changed files with 133 additions and 68 deletions

View File

@@ -177,8 +177,9 @@ void ESP32ImprovComponent::set_state_(improv::State state) {
}
void ESP32ImprovComponent::set_error_(improv::Error error) {
if (error != improv::ERROR_NONE)
if (error != improv::ERROR_NONE) {
ESP_LOGE(TAG, "Error: %d", error);
}
if (this->error_->get_value().empty() || this->error_->get_value()[0] != error) {
uint8_t data[1]{error};
this->error_->set_value(data, 1);