Added info.sensor properties for motion and temperature
(HA integration)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user