diff --git a/tasmota/xsns_53_sml.ino b/tasmota/xsns_53_sml.ino index 7a184a4bb..c85b66cf1 100755 --- a/tasmota/xsns_53_sml.ino +++ b/tasmota/xsns_53_sml.ino @@ -1976,7 +1976,7 @@ void SML_Decode(uint8_t index) { } else { // low word if (usign) ebus_dval = vbus_get_septet(cp) & 0xffff; - else (int16_t)(vbus_get_septet(cp) & 0xffff); + else ebus_dval = (int16_t)(vbus_get_septet(cp) & 0xffff); } break; case 'b': @@ -2993,10 +2993,14 @@ uint8_t hflg=0; } float SML_GetVal(uint32_t index) { - if (index<1 && index>SML_MAX_VARS) { index = 1;} + if (index < 1 || index > SML_MAX_VARS) { index = 1;} return meter_vars[index-1]; } +char *SML_GetSVal(uint32_t index) { + if (index < 1 || index > MAX_METERS) { index = 1;} + return &meter_id[index - 1][0]; +} #endif // USE_SML_SCRIPT_CMD