Does anyone know if there is a way to do "dynamic" leds number.

Does anyone know if there is a way to do “dynamic” leds number.
For instance I could save leds count in EEPROM then on start read it and use in my sketch. I need this to implement possibility to easily add and remove leds without need to rebuld the firmware.

Create an led array that’s the maximum number of leds that you would support and then set num_leds from eeprom - for example:

#define MAX_LEDS 512
uint_16 NUM_LEDS = MAX_LEDS;
CRGB leds[MAX_LEDS];

setup() {
NUM_LEDS = value_from_eeprom();
LEDS.addLeds(leds, NUM_LEDS);
}

This sounds like a solution. Thanks.