mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Added missing json document compilation to states retrieval. (#321)
This commit is contained in:
parent
9f6edc0296
commit
2410c6021e
@ -338,7 +338,6 @@ void LedDevicePhilipsHue::saveStates(unsigned int nLights)
|
||||
response = get("lights");
|
||||
// Use QJsonDocument to parse reponse.
|
||||
reader = QJsonDocument::fromJson(response, &error);
|
||||
|
||||
if (error.error != QJsonParseError::NoError)
|
||||
{
|
||||
throw std::runtime_error(("No lights found at " + getUrl("lights")).toStdString());
|
||||
@ -374,6 +373,8 @@ void LedDevicePhilipsHue::saveStates(unsigned int nLights)
|
||||
break;
|
||||
}
|
||||
|
||||
json = reader.object();
|
||||
|
||||
// Get state object values which are subject to change.
|
||||
QJsonObject state;
|
||||
if (!json.contains("state"))
|
||||
|
Loading…
Reference in New Issue
Block a user