Hi everyone,
I’m facing a challenge with my ESPHome firmware on an ESP8266 that I’d like to get some help with. My current setup involves two components that require compile‐time configuration:
- RGB LED Strip (NeoPixel ws2812x):
– I’m using a ws2812x-based LED strip that is compiled with a fixed color order (e.g.,type: GRB
by default).
– There are nine possible color order options (such as GRB, RGB, RBG, GBR, BRG, BGR, etc.).
– My goal is to create a select menu in the Home Assistant front end that lists all nine options, with the default set to GRB. When a user selects a different order, that value should be sent to the ESPHome device, and the LED strip’s type should update accordingly. - DHT Sensor:
– I currently have a DHT sensor configured asmodel: DHT22
by default.
– I’d like to implement a similar select menu for the sensor’s model, allowing options such as DHT11, DHT22, AM2302, RHT03, etc., with DHT22 as the default.
– When a user selects a different model from the front end, the ESPHome should update the sensor’s model accordingly.
Additionally, I would like the selected values to be stored on the ESPHome device (using restore_value functionality) and, upon startup, the front end should reflect the currently stored settings.
The Core Issue:
After researching and testing, I’ve come to understand that parameters such as the LED strip’s color order and the DHT sensor’s model are determined during the compilation of the ESPHome firmware. In other words, these settings are compile-time configuration options and cannot be dynamically changed at runtime simply via a front-end select menu without re-flashing the firmware.
Questions:
- Is there any workaround or method (e.g., using multiple pre-defined objects or a dynamic update mechanism) that allows the end-user to choose and update these parameters via the front end without having to recompile and re-upload the firmware?
- Has anyone implemented a solution where a front-end select menu can modify such compile-time parameters dynamically, or is this fundamentally limited by how ESPHome and its compiler work?
I appreciate any insights or suggestions you might have.
Thanks in advance!