Use state change for setting `config/ledindication`
@@ -808,12 +808,24 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
updated = true;
}
else if (rid.suffix == RConfigLedIndication) // Boolean
+ {
+ if (!devManaged)
{
pendingMask |= R_PENDING_LEDINDICATION;
sensor->enableRead(WRITE_LEDINDICATION);
sensor->setNextReadTime(WRITE_LEDINDICATION, QTime::currentTime());
updated = true;
}
+ else
+ {
+ if (rsub)
+ {
+ change.addTargetValue(rid.suffix, data.boolean);
+ rsub->addStateChange(change);
+ updated = true;
+ }
+ }
+ }
else if (rid.suffix == RConfigSensitivity) // Unsigned integer
{
pendingMask |= R_PENDING_SENSITIVITY;
