mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
objid property is obsolete, use obj instead
This commit is contained in:
parent
83b54eeec6
commit
88d1f69069
@ -803,9 +803,9 @@ void dispatch_moodlight(const char* topic, const char* payload)
|
|||||||
if(!json[F("state")].isNull())
|
if(!json[F("state")].isNull())
|
||||||
moodlight.power = Utilities::is_true(json[F("state")].as<std::string>().c_str());
|
moodlight.power = Utilities::is_true(json[F("state")].as<std::string>().c_str());
|
||||||
|
|
||||||
if(!json[F("r")].isNull()) moodlight.r = json[F("r")].as<uint8_t>();
|
if(!json["r"].isNull()) moodlight.r = json["r"].as<uint8_t>();
|
||||||
if(!json[F("g")].isNull()) moodlight.g = json[F("g")].as<uint8_t>();
|
if(!json["g"].isNull()) moodlight.g = json["g"].as<uint8_t>();
|
||||||
if(!json[F("b")].isNull()) moodlight.b = json[F("b")].as<uint8_t>();
|
if(!json["b"].isNull()) moodlight.b = json["b"].as<uint8_t>();
|
||||||
|
|
||||||
if(!json[F("color")].isNull()) {
|
if(!json[F("color")].isNull()) {
|
||||||
if(!json[F("color")]["r"].isNull()) {
|
if(!json[F("color")]["r"].isNull()) {
|
||||||
|
@ -386,7 +386,7 @@ void hasp_new_object(const JsonObject& config, uint8_t& saved_page_id)
|
|||||||
config.remove(FPSTR(FP_OBJ));
|
config.remove(FPSTR(FP_OBJ));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_WARNING(TAG_HASP, F("objid property is obsolete, use obj instead"));
|
LOG_WARNING(TAG_HASP, F("objid property is obsolete, use obj instead")); // TODO: obsolete objid
|
||||||
sdbm = config[FPSTR(FP_OBJID)].as<uint8_t>();
|
sdbm = config[FPSTR(FP_OBJID)].as<uint8_t>();
|
||||||
config.remove(FPSTR(FP_OBJID));
|
config.remove(FPSTR(FP_OBJID));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user