From 7752794fc5bf9d482a61f927218c6203d95a0c3e Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Tue, 12 Nov 2019 18:59:23 +0100 Subject: [PATCH] Fix neopixelbus missing method pins (#848) Fixes https://github.com/esphome/issues/issues/839 --- esphome/components/neopixelbus/light.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/esphome/components/neopixelbus/light.py b/esphome/components/neopixelbus/light.py index e5106d4bd6..e405b3d7a8 100644 --- a/esphome/components/neopixelbus/light.py +++ b/esphome/components/neopixelbus/light.py @@ -74,7 +74,11 @@ def validate_method_pin(value): method_pins['BIT_BANG'] = list(range(0, 16)) elif CORE.is_esp32: method_pins['BIT_BANG'] = list(range(0, 32)) - pins_ = method_pins[method] + pins_ = method_pins.get(method) + if pins_ is None: + # all pins allowed for this method + return value + for opt in (CONF_PIN, CONF_CLOCK_PIN, CONF_DATA_PIN): if opt in value and value[opt] not in pins_: raise cv.Invalid("Method {} only supports pin(s) {}".format(