Fix custom topic

This commit is contained in:
Eshmun 2023-03-15 01:06:45 +01:00
parent 3e6c9a67ce
commit 93529509d6

View File

@ -350,10 +350,10 @@ void onMqttConnect(esp_mqtt_client_handle_t client)
// mqttSubscribeTo(mqttNodeTopic + subtopic);
#if defined(HASP_USE_CUSTOM)
subtopic = F(MQTT_TOPIC_CUSTOM "/#");
mqttSubscribeTo(mqttGroupTopic + subtopic);
mqttSubscribeTo(mqttNodeTopic + subtopic);
#endif
String subtopic = F(MQTT_TOPIC_CUSTOM "/#");
mqttSubscribeTo(mqttGroupCommandTopic + subtopic);
mqttSubscribeTo(mqttNodeCommandTopic + subtopic);
#endif
/* Home Assistant auto-configuration */
#ifdef HASP_USE_HA