1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-08 12:53:45 +01:00

[uponor_smatrix] Fix clang-tidy sign comparison errors (#11076)

This commit is contained in:
J. Nick Koston
2025-10-06 13:20:56 -05:00
committed by GitHub
parent fdd422c42a
commit ad296a7d74
3 changed files with 5 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ void UponorSmatrixClimate::control(const climate::ClimateCall &call) {
} }
void UponorSmatrixClimate::on_device_data(const UponorSmatrixData *data, size_t data_len) { void UponorSmatrixClimate::on_device_data(const UponorSmatrixData *data, size_t data_len) {
for (int i = 0; i < data_len; i++) { for (size_t i = 0; i < data_len; i++) {
switch (data[i].id) { switch (data[i].id) {
case UPONOR_ID_TARGET_TEMP_MIN: case UPONOR_ID_TARGET_TEMP_MIN:
this->min_temperature_ = raw_to_celsius(data[i].value); this->min_temperature_ = raw_to_celsius(data[i].value);

View File

@@ -18,7 +18,7 @@ void UponorSmatrixSensor::dump_config() {
} }
void UponorSmatrixSensor::on_device_data(const UponorSmatrixData *data, size_t data_len) { void UponorSmatrixSensor::on_device_data(const UponorSmatrixData *data, size_t data_len) {
for (int i = 0; i < data_len; i++) { for (size_t i = 0; i < data_len; i++) {
switch (data[i].id) { switch (data[i].id) {
case UPONOR_ID_ROOM_TEMP: case UPONOR_ID_ROOM_TEMP:
if (this->temperature_sensor_ != nullptr) if (this->temperature_sensor_ != nullptr)

View File

@@ -122,7 +122,7 @@ bool UponorSmatrixComponent::parse_byte_(uint8_t byte) {
// Decode packet payload data for easy access // Decode packet payload data for easy access
UponorSmatrixData data[data_len]; UponorSmatrixData data[data_len];
for (int i = 0; i < data_len; i++) { for (size_t i = 0; i < data_len; i++) {
data[i].id = packet[(i * 3) + 4]; data[i].id = packet[(i * 3) + 4];
data[i].value = encode_uint16(packet[(i * 3) + 5], packet[(i * 3) + 6]); data[i].value = encode_uint16(packet[(i * 3) + 5], packet[(i * 3) + 6]);
} }
@@ -135,7 +135,7 @@ bool UponorSmatrixComponent::parse_byte_(uint8_t byte) {
// thermostat sending both room temperature and time information. // thermostat sending both room temperature and time information.
bool found_temperature = false; bool found_temperature = false;
bool found_time = false; bool found_time = false;
for (int i = 0; i < data_len; i++) { for (size_t i = 0; i < data_len; i++) {
if (data[i].id == UPONOR_ID_ROOM_TEMP) if (data[i].id == UPONOR_ID_ROOM_TEMP)
found_temperature = true; found_temperature = true;
if (data[i].id == UPONOR_ID_DATETIME1) if (data[i].id == UPONOR_ID_DATETIME1)
@@ -181,7 +181,7 @@ bool UponorSmatrixComponent::send(uint16_t device_address, const UponorSmatrixDa
packet.push_back(device_address >> 8); packet.push_back(device_address >> 8);
packet.push_back(device_address >> 0); packet.push_back(device_address >> 0);
for (int i = 0; i < data_len; i++) { for (size_t i = 0; i < data_len; i++) {
packet.push_back(data[i].id); packet.push_back(data[i].id);
packet.push_back(data[i].value >> 8); packet.push_back(data[i].value >> 8);
packet.push_back(data[i].value >> 0); packet.push_back(data[i].value >> 0);