Merge PR #306: Hue: Don't set invalid states to the hue color light
commit
e46023591a
|
|
@ -160,10 +160,12 @@ void HueLight::updateStates(const QVariantMap &statesMap)
|
|||
// alert (none, select, lselect)
|
||||
setAlert(statesMap.value("alert").toString());
|
||||
setBrigtness(statesMap.value("bri").toInt());
|
||||
setCt(statesMap.value("ct").toInt());
|
||||
setPower(statesMap.value("on").toBool());
|
||||
setSat(statesMap.value("sat").toInt());
|
||||
setHue(statesMap.value("hue").toInt());
|
||||
if (statesMap.contains("ct")) {
|
||||
setCt(statesMap.value("ct").toInt());
|
||||
}
|
||||
if (!statesMap.value("xy").toList().isEmpty())
|
||||
setXy(QPointF(statesMap.value("xy").toList().first().toFloat(), statesMap.value("xy").toList().last().toFloat()));
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ private:
|
|||
quint16 m_hue;
|
||||
quint8 m_sat;
|
||||
QPointF m_xy;
|
||||
quint16 m_ct;
|
||||
quint16 m_ct = 153;
|
||||
QString m_alert;
|
||||
QString m_effect;
|
||||
ColorMode m_colorMode;
|
||||
|
|
|
|||
Loading…
Reference in New Issue