diff --git a/src/driver/drv_pwmToggler.c b/src/driver/drv_pwmToggler.c index 6405c273d..884d40e7d 100644 --- a/src/driver/drv_pwmToggler.c +++ b/src/driver/drv_pwmToggler.c @@ -96,16 +96,20 @@ static float g_current[MAX_ONOFF_SLOTS]; int parsePowerArgument(const char *s); void publish_enableState(int index) { +#if ENABLE_MQTT char topic[32]; snprintf(topic, sizeof(topic), "toggler_enable%i", index); MQTT_PublishMain_StringInt(topic, g_enabled[index], 0); +#endif } void publish_value(int index) { +#if ENABLE_MQTT char topic[32]; snprintf(topic, sizeof(topic), "toggler_set%i", index); MQTT_PublishMain_StringInt(topic, g_values[index], 0); +#endif } void setTargetChannel(int index) {