Open Axeman72 opened 8 months ago
Looking at the esp32_rmt_led_strip code, I think that a "int(value)" instead of "value" in this line should fix the issue. Or, at least, it fixed the issue in my two esphome instances.
DISCLAIMER: I've never used Python before.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
When using a variable substitution in the "rmt_channel" property of a light using platform esp32_rmt_led_strip) the compilation fails because the substitution is handled as a string and not as a number. The same substitution works in the "channel" property of a light using neopixelbus platform and method esp32_rmt (See attached YAML)
This happens even using !include, where I can pass a integer variable
but it's always handled as a string in the substitution, and I get the same error in the build log.
I haven't found a way to cast the value, and since there is no way to use a workaround with "ifs" in ESPHome YAMLs (like in Azure DevOps), the esp32_rmt_led_strip can't be used in a !include in the same way the neopixelbus can.
Which version of ESPHome has the issue?
2023.11.6
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP32
Board
esp32 generic dev board
Component causing the issue
light/esp32_rmt_led_strip
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response