Add test to remove outlet and shutter.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -199,18 +199,21 @@ char *devices_manager_get(devices_manager_t *dm, const char *capability)
|
||||
|
||||
if (capability == kOutletEntry)
|
||||
{
|
||||
output_node = devices_manager_outlets_to_json_object(dm);
|
||||
}
|
||||
else if (capability == kShutterEntry)
|
||||
{
|
||||
output_node = devices_manager_shutters_to_json_object(dm);
|
||||
}
|
||||
else if (capability == kSprinklerEntry)
|
||||
{
|
||||
output_node = devices_manager_sprinkler_to_json_object(dm);
|
||||
if (output_node != NULL)
|
||||
{
|
||||
output = strdup(json_object_to_json_string(output_node));
|
||||
json_object_put(output_node);
|
||||
}
|
||||
output_node = devices_manager_sprinklers_to_json_object(dm);
|
||||
}
|
||||
|
||||
if (output_node != NULL)
|
||||
{
|
||||
output = strdup(json_object_to_json_string(output_node));
|
||||
json_object_put(output_node);
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user