Merge pull request #10725 from pcdiem/pwm11

Use dgr name for MQTT if SO88
This commit is contained in:
Theo Arends 2021-01-28 08:49:57 +01:00 committed by GitHub
commit 211058dd8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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"));
}