review change

master
Herb Paar 2021-01-26 00:42:37 +01:00
parent 4a9cde46e5
commit 40c9190f67
1 changed files with 1 additions and 1 deletions

View File

@ -848,7 +848,6 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr
}
if (topic.startsWith("shellies/" + shellyId + "/input_event/")) {
int channel = topic.split("/").last().toInt();
if (thing->thingClassId() == shellyButton1ThingClassId) { // it can be only at channel 0
QJsonParseError 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));
}
if (thing->thingClassId() == shellyI3ThingClassId) {
int channel = topic.split("/").last().toInt();
QJsonParseError error;
QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error);
if (error.error != QJsonParseError::NoError) {