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");
|
response = get("lights");
|
||||||
// Use QJsonDocument to parse reponse.
|
// Use QJsonDocument to parse reponse.
|
||||||
reader = QJsonDocument::fromJson(response, &error);
|
reader = QJsonDocument::fromJson(response, &error);
|
||||||
|
|
||||||
if (error.error != QJsonParseError::NoError)
|
if (error.error != QJsonParseError::NoError)
|
||||||
{
|
{
|
||||||
throw std::runtime_error(("No lights found at " + getUrl("lights")).toStdString());
|
throw std::runtime_error(("No lights found at " + getUrl("lights")).toStdString());
|
||||||
@ -374,6 +373,8 @@ void LedDevicePhilipsHue::saveStates(unsigned int nLights)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
json = reader.object();
|
||||||
|
|
||||||
// Get state object values which are subject to change.
|
// Get state object values which are subject to change.
|
||||||
QJsonObject state;
|
QJsonObject state;
|
||||||
if (!json.contains("state"))
|
if (!json.contains("state"))
|
||||||
|
Loading…
Reference in New Issue
Block a user