mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 20:38:27 +02:00
Activate some clang-tidy checks (#1884)
This commit is contained in:
@@ -8,7 +8,7 @@ static const char *TAG = "tuya.climate";
|
||||
|
||||
void TuyaClimate::setup() {
|
||||
if (this->switch_id_.has_value()) {
|
||||
this->parent_->register_listener(*this->switch_id_, [this](TuyaDatapoint datapoint) {
|
||||
this->parent_->register_listener(*this->switch_id_, [this](const TuyaDatapoint &datapoint) {
|
||||
ESP_LOGV(TAG, "MCU reported switch is: %s", ONOFF(datapoint.value_bool));
|
||||
this->mode = climate::CLIMATE_MODE_OFF;
|
||||
if (datapoint.value_bool) {
|
||||
@@ -25,7 +25,7 @@ void TuyaClimate::setup() {
|
||||
});
|
||||
}
|
||||
if (this->active_state_id_.has_value()) {
|
||||
this->parent_->register_listener(*this->active_state_id_, [this](TuyaDatapoint datapoint) {
|
||||
this->parent_->register_listener(*this->active_state_id_, [this](const TuyaDatapoint &datapoint) {
|
||||
ESP_LOGV(TAG, "MCU reported active state is: %u", datapoint.value_enum);
|
||||
this->active_state_ = datapoint.value_enum;
|
||||
this->compute_state_();
|
||||
@@ -33,7 +33,7 @@ void TuyaClimate::setup() {
|
||||
});
|
||||
}
|
||||
if (this->target_temperature_id_.has_value()) {
|
||||
this->parent_->register_listener(*this->target_temperature_id_, [this](TuyaDatapoint datapoint) {
|
||||
this->parent_->register_listener(*this->target_temperature_id_, [this](const TuyaDatapoint &datapoint) {
|
||||
this->target_temperature = datapoint.value_int * this->target_temperature_multiplier_;
|
||||
ESP_LOGV(TAG, "MCU reported target temperature is: %.1f", this->target_temperature);
|
||||
this->compute_state_();
|
||||
@@ -41,7 +41,7 @@ void TuyaClimate::setup() {
|
||||
});
|
||||
}
|
||||
if (this->current_temperature_id_.has_value()) {
|
||||
this->parent_->register_listener(*this->current_temperature_id_, [this](TuyaDatapoint datapoint) {
|
||||
this->parent_->register_listener(*this->current_temperature_id_, [this](const TuyaDatapoint &datapoint) {
|
||||
this->current_temperature = datapoint.value_int * this->current_temperature_multiplier_;
|
||||
ESP_LOGV(TAG, "MCU reported current temperature is: %.1f", this->current_temperature);
|
||||
this->compute_state_();
|
||||
|
||||
Reference in New Issue
Block a user