Add support for Frequency variable in AddChangeHandler (#1853)

* add support for frequency variable in AddChangeHandler

* bl0942 frequency variable rounding correction

* move frequency to last args for VCPPublishThreshold

* frequency selftest precision adjustments

---------

Co-authored-by: kcstonacek <stonacek@stonacek.nz>
This commit is contained in:
KC Stonacek
2025-11-12 09:35:39 +13:00
committed by GitHub
parent 8be0c3bb6c
commit 60ca11183f
16 changed files with 266 additions and 91 deletions

View File

@ -231,6 +231,7 @@ static int http_tasmota_json_ENERGY(void* request, jsonCb_t printer) {
printer(request, "\"Factor\":%f,", _getReading_NanToZero(OBK_POWER_FACTOR));
printer(request, "\"Voltage\":%f,", _getReading_NanToZero(OBK_VOLTAGE));
printer(request, "\"Current\":%f,", _getReading_NanToZero(OBK_CURRENT));
printer(request, "\"Frequency\":%f,", _getReading_NanToZero(OBK_FREQUENCY));
printer(request, "\"ConsumptionTotal\":%f,", _getReading_NanToZero(OBK_CONSUMPTION_TOTAL));
printer(request, "\"Yesterday\": %f,", _getReading_NanToZero(OBK_CONSUMPTION_YESTERDAY));
printer(request, "\"ConsumptionLastHour\":%f", _getReading_NanToZero(OBK_CONSUMPTION_LAST_HOUR));