fix failing build without climate module

This commit is contained in:
Siwat Sirichai 2023-11-16 14:51:17 +07:00
parent 2c2427ee3c
commit e124c73f67
1 changed files with 84 additions and 81 deletions

View File

@ -453,7 +453,6 @@ void ota_begin()
}
#endif
void io_begin()
{
Serial.println("Initializing I/O . . .");
@ -591,12 +590,16 @@ void mqtt_callback(char *topic, byte *payload, unsigned int length)
else if ((!strncmp(topic_trim, "/pwm/", 5)) && !strncmp(topic_trim + 7, "/set/value", 10))
{
pwm_value_callback(topic_trim, topic_length, payload_nt, length);
} else if(!strcmp(topic,STATE_REQUEST_TOPIC)) {
}
else if (!strcmp(topic, STATE_REQUEST_TOPIC))
{
state_request_callback();
}
else
{
#ifdef ENABLE_CLIMATE_MODULE
ac_state_callback(topic, topic_length, payload_nt, length);
#endif
}
user_mqtt_callback(topic, topic_length, payload_nt, length);
}