Added info.sensor properties for motion and temperature

(HA integration)
This commit is contained in:
Blaz Kristan
2021-12-06 20:13:18 +01:00
parent 44f9bc5f0e
commit f57b606f72
2 changed files with 23 additions and 7 deletions

View File

@@ -320,6 +320,10 @@ public:
} else {
infoArr.add(F("disabled"));
}
JsonObject sensor = root[F("sensor")];
if (sensor.isNull()) sensor = root.createNestedObject(F("sensor"));
sensor[F("motion")] = sensorPinState || offTimerStart>0 ? true : false;
}
/**