Compilation fix - order_events declared inside wrong #ifdef

This commit is contained in:
amarofarinha 2024-09-28 08:51:50 +01:00
parent b92b3ab3b0
commit 2a1424c969

View file

@ -66,8 +66,6 @@ SensorConfig sensorConfigs[] = {
}; };
static std::vector<EventData> order_events;
static String generateCommonInfoAutoConfigTopic(const char* object_id, const char* hostname) { static String generateCommonInfoAutoConfigTopic(const char* object_id, const char* hostname) {
return String("homeassistant/sensor/battery-emulator_") + String(hostname) + "/" + String(object_id) + "/config"; return String("homeassistant/sensor/battery-emulator_") + String(hostname) + "/" + String(object_id) + "/config";
} }
@ -83,6 +81,8 @@ static String generateEventsAutoConfigTopic(const char* object_id, const char* h
#endif // HA_AUTODISCOVERY #endif // HA_AUTODISCOVERY
static std::vector<EventData> order_events;
static void publish_common_info(void) { static void publish_common_info(void) {
static JsonDocument doc; static JsonDocument doc;
#ifdef HA_AUTODISCOVERY #ifdef HA_AUTODISCOVERY