Check value set

This commit is contained in:
iranl
2024-04-21 21:31:45 +02:00
parent 3ea6f4f2d9
commit d293a03cc1
3 changed files with 25 additions and 1 deletions

View File

@@ -749,6 +749,12 @@ void NukiOpenerWrapper::onConfigUpdateReceived(const char *value)
if(json[basicKeys[i]])
{
const char *jsonchar = json[basicKeys[i]].as<const char*>();
if(strlen(jsonchar) == 0)
{
jsonResult[basicKeys[i]] = "noValueSet";
continue;
}
if((int)basicOpenerConfigAclPrefs[i] == 1)
{
@@ -924,6 +930,12 @@ void NukiOpenerWrapper::onConfigUpdateReceived(const char *value)
if(json[advancedKeys[i]])
{
const char *jsonchar = json[advancedKeys[i]].as<const char*>();
if(strlen(jsonchar) == 0)
{
jsonResult[advancedKeys[i]] = "noValueSet";
continue;
}
if((int)advancedOpenerConfigAclPrefs[i] == 1)
{

View File

@@ -686,6 +686,12 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
if(json[basicKeys[i]])
{
const char *jsonchar = json[basicKeys[i]].as<const char*>();
if(strlen(jsonchar) == 0)
{
jsonResult[basicKeys[i]] = "noValueSet";
continue;
}
if((int)basicLockConfigAclPrefs[i] == 1)
{
@@ -883,6 +889,12 @@ void NukiWrapper::onConfigUpdateReceived(const char *value)
if(json[advancedKeys[i]])
{
const char *jsonchar = json[advancedKeys[i]].as<const char*>();
if(strlen(jsonchar) == 0)
{
jsonResult[advancedKeys[i]] = "noValueSet";
continue;
}
if((int)advancedLockConfigAclPrefs[i] == 1)
{

View File

@@ -378,7 +378,7 @@ The result of the last configuration change action will be published to the `con
<br>
The JSON data will include a node called "general" and a node for every setting that Nuki Hub detected in the action.<br>
Possible values for the "general" node are "noPinSet", "invalidJson", "invalidConfig", "success" and "noChange".<br>
Possible values for the node per setting are "unchanged", "invalidValue", "valueTooLong", "accessDenied", "success", "failed", "timeOut", "working", "notPaired", "error" and "undefined"<br>
Possible values for the node per setting are "unchanged", "noValueSet", "invalidValue", "valueTooLong", "accessDenied", "success", "failed", "timeOut", "working", "notPaired", "error" and "undefined"<br>
<br>
Example:
- `{"advertisingMode":"success","general":"success"}`