mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-26 04:06:34 +00:00
fixes building the sensor names in case of multiple channel thermostat function (#18248)
now it will follow SetOption64 (hyphen vs underscore) hyphen is the standard - underscore the much safer option in my cases as many user user underscore the mistake was not detected till now Co-authored-by: Fabian Steger <git@fabian-steger.de>
This commit is contained in:
parent
7abff936cd
commit
0081022543
@ -1368,7 +1368,10 @@ void ThermostatGetLocalSensor(uint8_t ctr_output) {
|
|||||||
if ( (THERMOSTAT_SENSOR_NUMBER > 1)
|
if ( (THERMOSTAT_SENSOR_NUMBER > 1)
|
||||||
&&(THERMOSTAT_CONTROLLER_OUTPUTS > 1)
|
&&(THERMOSTAT_CONTROLLER_OUTPUTS > 1)
|
||||||
&&(ctr_output < THERMOSTAT_SENSOR_NUMBER)) {
|
&&(ctr_output < THERMOSTAT_SENSOR_NUMBER)) {
|
||||||
sensor_name.concat("_" + (ctr_output + 1));
|
char temp[4];
|
||||||
|
temp[0] = IndexSeparator();
|
||||||
|
snprintf(&temp[1], 4, "%u", (ctr_output + 1));
|
||||||
|
sensor_name.concat(temp);
|
||||||
}
|
}
|
||||||
JsonParserToken value_token = root[sensor_name].getObject()[PSTR("Temperature")];
|
JsonParserToken value_token = root[sensor_name].getObject()[PSTR("Temperature")];
|
||||||
if (value_token.isNum()) {
|
if (value_token.isNum()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user