267 Scenario bug fully fixed Stable

This commit is contained in:
Dmitry Borisenko
2020-11-07 01:11:32 +03:00
parent 1f46226a46
commit 709a1fe1f7
30 changed files with 177 additions and 57 deletions

View File

@@ -19,9 +19,14 @@ void inputTimeSet() {
void handle_time_init() {
ts.add(
TIME, 1000, [&](void *) {
jsonWriteStr(configLiveJson, "timenow", timeNow->getTime());
eventGen("timenow", "");
TIME, 1000, [&](void*) {
String timenow = timeNow->getTimeWOsec();
static String prevTime;
if (prevTime != timenow) {
prevTime = timenow;
jsonWriteStr(configLiveJson, "timenow", timenow);
eventGen2("timenow", timenow);
}
},
nullptr, true);
}

View File

@@ -30,7 +30,7 @@ void SensorDallas::loop() {
void SensorDallas::readDallas() {
sensors.requestTemperaturesByIndex(_index);
float value = sensors.getTempCByIndex(_index);
eventGen(_key, "");
eventGen2(_key, String(value));
jsonWriteStr(configLiveJson, _key, String(value));
publishStatus(_key, String(value));
SerialPrint("I", "Sensor", "'" + _key + "' data: " + String(value));