Skip to content

Commit

Permalink
fix mis-order (#19769)
Browse files Browse the repository at this point in the history
* fix mis-order

* fix mis-order on esp32 too
  • Loading branch information
barbudor authored Oct 16, 2023
1 parent d05d76b commit 8e9299e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tasmota/tasmota_xsns_sensor/xsns_05_ds18x20.ino
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ void Ds18x20Name(uint8_t sensor) {
}
snprintf_P(DS18X20Data.name, sizeof(DS18X20Data.name), PSTR("%s%c%s"), DS18X20Data.name, IndexSeparator(), address);
#elif defined(DS18x20_USE_ID_ALIAS)
sensor = ds18x20_sensor[sensor].index;
if (ds18x20_sensor[sensor].alias[0] != '0') {
if (isdigit(ds18x20_sensor[sensor].alias[0])) {
snprintf_P(DS18X20Data.name, sizeof(DS18X20Data.name), PSTR("DS18Sens%c%d"), IndexSeparator(), atoi(ds18x20_sensor[sensor].alias));
Expand Down
1 change: 1 addition & 0 deletions tasmota/tasmota_xsns_sensor/xsns_05_esp32_ds18x20.ino
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ void Ds18x20Name(uint8_t sensor) {
}
snprintf_P(DS18X20Data.name, sizeof(DS18X20Data.name), PSTR("%s%c%s"), DS18X20Data.name, IndexSeparator(), address);
#elif defined(DS18x20_USE_ID_ALIAS)
sensor = ds18x20_sensor[sensor].index;
if (ds18x20_sensor[sensor].alias[0] != '0') {
if (isdigit(ds18x20_sensor[sensor].alias[0])) {
snprintf_P(DS18X20Data.name, sizeof(DS18X20Data.name), PSTR("DS18Sens%c%d"), IndexSeparator(), atoi(ds18x20_sensor[sensor].alias));
Expand Down

0 comments on commit 8e9299e

Please sign in to comment.