feat: add labels to NodeInfo
This commit is contained in:
@@ -349,6 +349,15 @@ NeoPixelService neoService(ctx, taskManager, NEOPIXEL_COUNT, NEOPIXEL_PIN, NEOPI
|
||||
void setup() {
|
||||
network.setupWiFi();
|
||||
|
||||
// Add example labels for this node
|
||||
auto it = ctx.memberList->find(ctx.hostname);
|
||||
if (it != ctx.memberList->end()) {
|
||||
it->second.labels["app"] = "neopixel";
|
||||
it->second.labels["device"] = "light";
|
||||
it->second.labels["pixels"] = String(NEOPIXEL_COUNT);
|
||||
it->second.labels["pin"] = String(NEOPIXEL_PIN);
|
||||
}
|
||||
|
||||
taskManager.initialize();
|
||||
|
||||
apiServer.begin();
|
||||
|
||||
Reference in New Issue
Block a user