Merge pull request #447 from Eshmun/master

Fix custom topic when HASP_USE_CUSTOM is defined
This commit is contained in:
fvanroie 2023-03-15 18:08:18 +01:00 committed by GitHub
commit c7b8b847ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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