feat: added diagnostic code polling via opentherm, added hex value for fault code and diag code

This commit is contained in:
Yurii
2024-10-05 10:03:14 +03:00
parent 4478e8f204
commit a4ee4c5224
9 changed files with 76 additions and 2 deletions

View File

@@ -665,4 +665,13 @@ function form2json(data, noCastItems = []) {
let object = Array.from(data).reduce(method, {});
return JSON.stringify(object);
}
function dec2hex(i) {
let hex = parseInt(i).toString(16);
if (hex.length % 2 != 0) {
hex = "0" + hex;
}
return hex.toUpperCase();
}