Get rid of some unnecessary serial output.
This commit is contained in:
parent
123d70f7f7
commit
59df30351e
@ -129,8 +129,5 @@ void Communicator::mqtt_discovery(const String topic, StaticJsonDocument<1536> &
|
||||
}
|
||||
|
||||
void Communicator::publish_data(String topic, String value) {
|
||||
Serial.print(topic);
|
||||
Serial.print(" --> ");
|
||||
Serial.println(value);
|
||||
_mqtt_client.publish(topic.c_str(), value.c_str(), true);
|
||||
}
|
||||
|
@ -36,8 +36,7 @@ void mqttCallback(char *topic, byte *payload, unsigned int length) {
|
||||
for (int i=0;i<TOTAL_DEVICES;i++) {
|
||||
if (strcmp((char *)topic, (DEVICE_LIST[i].mode.CmdTopic).c_str() ) == 0){
|
||||
DEVICE_LIST[i].mode.Setting = (char*)payload;
|
||||
Serial.print("Swing: ");
|
||||
Serial.println(DEVICE_LIST[i].swing_topic);
|
||||
|
||||
if (DEVICE_LIST[i].mode.Setting == "auto") {
|
||||
DEVICE_LIST[i].swing_state = "off";
|
||||
hass_comm.publish_data(DEVICE_LIST[i].swing_topic, "on");
|
||||
|
Loading…
Reference in New Issue
Block a user