I'm trying to change the color of the smart lamp using the following code:
-------------------------------------------------
var dps = [String : Any]()
dps = ["24" : "00f003e8"]
device?.publishDps(dps, success: {
print("success")
}, failure: { (error) in
if let e = error {
print("publishDps failure: (e)")
}
})
-------------------------------------------------
I have tried to pass a value in hexadecimal, RGB, the literal name of the color (for example blue) and the color of the smart lamp does not update, but the method returns me success.
where am i wrong?
I'm trying to change the color of the smart lamp using the following code:
------------------------------------------------- var dps = [String : Any]() dps = ["24" : "00f003e8"] device?.publishDps(dps, success: { print("success") }, failure: { (error) in if let e = error { print("publishDps failure: (e)") } }) -------------------------------------------------
I have tried to pass a value in hexadecimal, RGB, the literal name of the color (for example blue) and the color of the smart lamp does not update, but the method returns me success. where am i wrong?
PS: i'm using swift