From e68f31101e39154bbb110c56f25adc9e0d1165e4 Mon Sep 17 00:00:00 2001 From: Paul C Diem Date: Wed, 27 Jan 2021 19:43:20 -0600 Subject: [PATCH] Use dgr name for MQTT if SO88 --- tasmota/xdrv_35_pwm_dimmer.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasmota/xdrv_35_pwm_dimmer.ino b/tasmota/xdrv_35_pwm_dimmer.ino index 0abd2206b..3bce167a2 100644 --- a/tasmota/xdrv_35_pwm_dimmer.ino +++ b/tasmota/xdrv_35_pwm_dimmer.ino @@ -619,13 +619,13 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed) if (mqtt_trigger) { char topic[TOPSZ]; sprintf_P(TasmotaGlobal.mqtt_data, PSTR("Trigger%u"), mqtt_trigger); -#ifdef USE_PWM_DIMMER_REMOTE - if (Settings.flag4.multiple_device_groups) { +#ifdef USE_DEVICE_GROUPS + if (Settings.flag4.device_groups_enabled) { snprintf_P(topic, sizeof(topic), PSTR("cmnd/%s/EVENT"), device_groups[power_button_index].group_name); MqttPublish(topic); } else -#endif // USE_PWM_DIMMER_REMOTE +#endif // USE_DEVICE_GROUPS MqttPublishPrefixTopic_P(CMND, PSTR("EVENT")); }