review change
This commit is contained in:
parent
4a9cde46e5
commit
40c9190f67
@ -848,7 +848,6 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (topic.startsWith("shellies/" + shellyId + "/input_event/")) {
|
if (topic.startsWith("shellies/" + shellyId + "/input_event/")) {
|
||||||
int channel = topic.split("/").last().toInt();
|
|
||||||
if (thing->thingClassId() == shellyButton1ThingClassId) { // it can be only at channel 0
|
if (thing->thingClassId() == shellyButton1ThingClassId) { // it can be only at channel 0
|
||||||
QJsonParseError error;
|
QJsonParseError error;
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error);
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error);
|
||||||
@ -866,6 +865,7 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr
|
|||||||
thing->emitEvent(eventTypeId, ParamList() << Param(paramTypeId, param));
|
thing->emitEvent(eventTypeId, ParamList() << Param(paramTypeId, param));
|
||||||
}
|
}
|
||||||
if (thing->thingClassId() == shellyI3ThingClassId) {
|
if (thing->thingClassId() == shellyI3ThingClassId) {
|
||||||
|
int channel = topic.split("/").last().toInt();
|
||||||
QJsonParseError error;
|
QJsonParseError error;
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error);
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error);
|
||||||
if (error.error != QJsonParseError::NoError) {
|
if (error.error != QJsonParseError::NoError) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user