mirror of https://github.com/arendst/Tasmota.git
Use dgr name for MQTT if SO88
This commit is contained in:
parent
5b375acdd2
commit
e68f31101e
|
@ -619,13 +619,13 @@ void PWMDimmerHandleButton(uint32_t button_index, bool pressed)
|
||||||
if (mqtt_trigger) {
|
if (mqtt_trigger) {
|
||||||
char topic[TOPSZ];
|
char topic[TOPSZ];
|
||||||
sprintf_P(TasmotaGlobal.mqtt_data, PSTR("Trigger%u"), mqtt_trigger);
|
sprintf_P(TasmotaGlobal.mqtt_data, PSTR("Trigger%u"), mqtt_trigger);
|
||||||
#ifdef USE_PWM_DIMMER_REMOTE
|
#ifdef USE_DEVICE_GROUPS
|
||||||
if (Settings.flag4.multiple_device_groups) {
|
if (Settings.flag4.device_groups_enabled) {
|
||||||
snprintf_P(topic, sizeof(topic), PSTR("cmnd/%s/EVENT"), device_groups[power_button_index].group_name);
|
snprintf_P(topic, sizeof(topic), PSTR("cmnd/%s/EVENT"), device_groups[power_button_index].group_name);
|
||||||
MqttPublish(topic);
|
MqttPublish(topic);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // USE_PWM_DIMMER_REMOTE
|
#endif // USE_DEVICE_GROUPS
|
||||||
MqttPublishPrefixTopic_P(CMND, PSTR("EVENT"));
|
MqttPublishPrefixTopic_P(CMND, PSTR("EVENT"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue