Added config switch for turing off the lamps if the color black is written.

Former-commit-id: bb4f4bc74c035c10a8dc678a11052ea276ea0149
This commit is contained in:
Tim Niggemann
2014-07-16 11:49:34 +02:00
parent fcb2ff6667
commit b055578759
3 changed files with 24 additions and 9 deletions

View File

@@ -164,7 +164,8 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
else if (type == "philipshue")
{
const std::string output = deviceConfig["output"].asString();
device = new LedDevicePhilipsHue(output);
const bool switchOffOnBlack = deviceConfig.get("switch_off_on_black", false).asBool();
device = new LedDevicePhilipsHue(output, switchOffOnBlack);
}
else if (type == "test")
{