diff --git a/README.md b/README.md index c70f1ff..eaf0efe 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ These topics are reported from the device: These topics can control the device: -| CMD Topic | Values expected | Meaning | -|-----------------------------|------------------|-------------------------------| -| `{mqtt_topic}/CMD/power` | on/off | Turn the device on or off | +| CMD Topic | Values expected | Meaning | +|--------------------------------------------|------------------------------|----------------------------------------------------------------------------| +| `{mqtt_topic}/CMD/devicePower` | on/off | Turn the device on or off | diff --git a/miotAirpurifierBridge.py b/miotAirpurifierBridge.py index 7681207..660f526 100644 --- a/miotAirpurifierBridge.py +++ b/miotAirpurifierBridge.py @@ -58,7 +58,7 @@ def on_mqttMessage(client, userdata, message): mqttMsgData = message.payload.decode("utf-8") mqttMsgTopic = message.topic log(2, "RECEIVED: " + mqttMsgTopic + ":" + mqttMsgData) - if ( mqttMsgTopic == mqtt_cmdTopic+"power" ): + if ( mqttMsgTopic == mqtt_cmdTopic+"devicePower" ): if (mqttMsgData == "on"): ap.on() log(2, "ACTION: Power On")