mirror of https://github.com/arendst/Tasmota.git
Fix wrong sign of attributes
This commit is contained in:
parent
9d86c15685
commit
0ebcbc76dc
|
@ -1397,7 +1397,7 @@ int32_t Z_ApplyConverter(const class ZCLFrame *zcl, uint16_t shortaddr, JsonObje
|
|||
if (multiplier > 0) {
|
||||
json[new_name] = ((float)value) * multiplier;
|
||||
} else {
|
||||
json[new_name] = ((float)value) / multiplier;
|
||||
json[new_name] = ((float)value) / (-multiplier);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -483,7 +483,7 @@ void ZbSendReportWrite(const JsonObject &val_pubwrite, uint16_t device, uint16_t
|
|||
if (multiplier > 0) { // inverse of decoding
|
||||
val_f = val_f / multiplier;
|
||||
} else {
|
||||
val_f = val_f * multiplier;
|
||||
val_f = val_f * (-multiplier);
|
||||
}
|
||||
use_val = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue