3 Commits

Author SHA1 Message Date
Yurii
b53dae6a43 fix: `inputmode` attribute fixed for float settings #117 2024-12-31 01:48:44 +03:00
Yurii
de2318bc6a refactor: compatibility with ArduinoJson 7.3.0 2024-12-30 23:12:31 +03:00
Yurii
081209420a chore: bump bblanchon/ArduinoJson from 7.1.0 to 7.3.0 2024-12-30 23:11:14 +03:00
4 changed files with 21 additions and 21 deletions

View File

@@ -17,7 +17,7 @@ core_dir = .pio
version = 1.5.0
framework = arduino
lib_deps =
bblanchon/ArduinoJson@^7.1.0
bblanchon/ArduinoJson@^7.3.0
;ihormelnyk/OpenTherm Library@^1.1.5
https://github.com/ihormelnyk/opentherm_library#master
;arduino-libraries/ArduinoMqttClient@^0.1.8

View File

@@ -181,7 +181,7 @@ public:
if (sSensor.type == Sensors::Type::BLUETOOTH) {
// available state topic
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = doc[FPSTR(HA_STATE_TOPIC)];
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = AVAILABILITY_SENSOR_CONN;
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = JsonString(AVAILABILITY_SENSOR_CONN, true);
String sName = sSensor.name;
switch (vType) {
@@ -254,7 +254,7 @@ public:
} else {
// available state topic
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = doc[FPSTR(HA_STATE_TOPIC)];
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = AVAILABILITY_SENSOR_CONN;
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = JsonString(AVAILABILITY_SENSOR_CONN, true);
doc[FPSTR(HA_NAME)] = sSensor.name;
doc[FPSTR(HA_VALUE_TEMPLATE)] = F("{{ value_json.value|float(0)|round(2) }}");
@@ -970,7 +970,7 @@ public:
JsonDocument doc;
doc[FPSTR(HA_AVAILABILITY)][0][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = this->stateTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = AVAILABILITY_OT_CONN;
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = JsonString(AVAILABILITY_OT_CONN, true);
doc[FPSTR(HA_AVAILABILITY_MODE)] = F("all");
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
doc[FPSTR(HA_UNIQUE_ID)] = this->getObjectIdWithPrefix(F("heating"));
@@ -991,7 +991,7 @@ public:
JsonDocument doc;
doc[FPSTR(HA_AVAILABILITY)][0][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = this->stateTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = AVAILABILITY_OT_CONN;
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = JsonString(AVAILABILITY_OT_CONN, true);
doc[FPSTR(HA_AVAILABILITY_MODE)] = F("all");
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
doc[FPSTR(HA_UNIQUE_ID)] = this->getObjectIdWithPrefix(F("dhw"));
@@ -1012,7 +1012,7 @@ public:
JsonDocument doc;
doc[FPSTR(HA_AVAILABILITY)][0][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = this->stateTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = AVAILABILITY_OT_CONN;
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = JsonString(AVAILABILITY_OT_CONN, true);
doc[FPSTR(HA_AVAILABILITY_MODE)] = F("all");
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
doc[FPSTR(HA_UNIQUE_ID)] = this->getObjectIdWithPrefix(F("flame"));
@@ -1033,7 +1033,7 @@ public:
JsonDocument doc;
doc[FPSTR(HA_AVAILABILITY)][0][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = this->stateTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = AVAILABILITY_OT_CONN;
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = JsonString(AVAILABILITY_OT_CONN, true);
doc[FPSTR(HA_AVAILABILITY_MODE)] = F("all");
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
doc[FPSTR(HA_UNIQUE_ID)] = this->getObjectIdWithPrefix(F("fault"));
@@ -1054,7 +1054,7 @@ public:
JsonDocument doc;
doc[FPSTR(HA_AVAILABILITY)][0][FPSTR(HA_TOPIC)] = this->statusTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_TOPIC)] = this->stateTopic.c_str();
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = AVAILABILITY_OT_CONN;
doc[FPSTR(HA_AVAILABILITY)][1][FPSTR(HA_VALUE_TEMPLATE)] = JsonString(AVAILABILITY_OT_CONN, true);
doc[FPSTR(HA_AVAILABILITY_MODE)] = F("all");
doc[FPSTR(HA_ENABLED_BY_DEFAULT)] = enabledByDefault;
doc[FPSTR(HA_UNIQUE_ID)] = this->getObjectIdWithPrefix(FPSTR(HA_ENTITY_CATEGORY_DIAGNOSTIC));

View File

@@ -134,12 +134,12 @@
<div class="grid">
<label>
<span data-i18n>sensors.correction.offset</span>
<input type="number" inputmode="numeric" name="offset" min="-20" max="20" step="0.01" required>
<input type="number" inputmode="decimal" name="offset" min="-20" max="20" step="0.01" required>
</label>
<label>
<span data-i18n>sensors.correction.factor</span>
<input type="number" inputmode="numeric" name="factor" min="0.01" max="10" step="0.01" required>
<input type="number" inputmode="decimal" name="factor" min="0.01" max="10" step="0.01" required>
</label>
</div>
</details>
@@ -159,7 +159,7 @@
<label>
<span data-i18n>sensors.filtering.factor.title</span>
<input type="number" inputmode="numeric" name="filteringFactor" min="0.01" max="1" step="0.01">
<input type="number" inputmode="decimal" name="filteringFactor" min="0.01" max="1" step="0.01">
<small data-i18n>sensors.filtering.factor.note</small>
</label>
</div>

View File

@@ -170,12 +170,12 @@
<div class="grid">
<label>
<span data-i18n>settings.heating.hyst</span>
<input type="number" inputmode="numeric" name="heating[hysteresis]" min="0" max="5" step="0.05" required>
<input type="number" inputmode="decimal" name="heating[hysteresis]" min="0" max="5" step="0.05" required>
</label>
<label>
<span data-i18n>settings.heating.turboFactor</span>
<input type="number" inputmode="numeric" name="heating[turboFactor]" min="1.5" max="10" step="0.1" required>
<input type="number" inputmode="decimal" name="heating[turboFactor]" min="1.5" max="10" step="0.1" required>
</label>
</div>
@@ -254,17 +254,17 @@
<div class="grid">
<label>
<span data-i18n>settings.equitherm.n</span>
<input type="number" inputmode="numeric" name="equitherm[n_factor]" min="0.001" max="10" step="0.001" required>
<input type="number" inputmode="decimal" name="equitherm[n_factor]" min="0.001" max="10" step="0.001" required>
</label>
<label>
<span data-i18n>settings.equitherm.k</span>
<input type="number" inputmode="numeric" name="equitherm[k_factor]" min="0" max="10" step="0.01" required>
<input type="number" inputmode="decimal" name="equitherm[k_factor]" min="0" max="10" step="0.01" required>
</label>
<label>
<span data-i18n>settings.equitherm.t.title</span>
<input type="number" inputmode="numeric" name="equitherm[t_factor]" min="0" max="10" step="0.01" required>
<input type="number" inputmode="decimal" name="equitherm[t_factor]" min="0" max="10" step="0.01" required>
<small data-i18n>settings.equitherm.t.note</small>
</label>
</div>
@@ -291,17 +291,17 @@
<div class="grid">
<label>
<span data-i18n>settings.pid.p</span>
<input type="number" inputmode="numeric" name="pid[p_factor]" min="0.1" max="1000" step="0.01" required>
<input type="number" inputmode="decimal" name="pid[p_factor]" min="0.1" max="1000" step="0.01" required>
</label>
<label>
<span data-i18n>settings.pid.i</span>
<input type="number" inputmode="numeric" name="pid[i_factor]" min="0" max="100" step="0.0001" required>
<input type="number" inputmode="decimal" name="pid[i_factor]" min="0" max="100" step="0.0001" required>
</label>
<label>
<span data-i18n>settings.pid.d</span>
<input type="number" inputmode="numeric" name="pid[d_factor]" min="0" max="100000" step="0.1" required>
<input type="number" inputmode="decimal" name="pid[d_factor]" min="0" max="100000" step="0.1" required>
</label>
</div>
@@ -390,13 +390,13 @@
<div class="grid">
<label>
<span data-i18n>settings.ot.minPower.title</span>
<input type="number" inputmode="numeric" name="opentherm[minPower]" min="0" max="1000" step="0.1">
<input type="number" inputmode="decimal" name="opentherm[minPower]" min="0" max="1000" step="0.01">
<small data-i18n>settings.ot.minPower.note</small>
</label>
<label>
<span data-i18n>settings.ot.maxPower.title</span>
<input type="number" inputmode="numeric" name="opentherm[maxPower]" min="0" max="1000" step="0.1">
<input type="number" inputmode="decimal" name="opentherm[maxPower]" min="0" max="1000" step="0.01">
<small data-i18n>settings.ot.maxPower.note</small>
</label>
</div>