mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Update __init__.py (#1454)
:cherry: picked from esphome/esphome@32a4680 branch (fix-sn74hc595-optional-oe-pin) by @OttoWinter
This commit is contained in:
parent
9586fb95d1
commit
34df25da39
1 changed files with 3 additions and 2 deletions
|
@ -34,6 +34,7 @@ def to_code(config):
|
||||||
cg.add(var.set_clock_pin(clock_pin))
|
cg.add(var.set_clock_pin(clock_pin))
|
||||||
latch_pin = yield cg.gpio_pin_expression(config[CONF_LATCH_PIN])
|
latch_pin = yield cg.gpio_pin_expression(config[CONF_LATCH_PIN])
|
||||||
cg.add(var.set_latch_pin(latch_pin))
|
cg.add(var.set_latch_pin(latch_pin))
|
||||||
|
if CONF_OE_PIN in config:
|
||||||
oe_pin = yield cg.gpio_pin_expression(config[CONF_OE_PIN])
|
oe_pin = yield cg.gpio_pin_expression(config[CONF_OE_PIN])
|
||||||
cg.add(var.set_oe_pin(oe_pin))
|
cg.add(var.set_oe_pin(oe_pin))
|
||||||
cg.add(var.set_sr_count(config[CONF_SR_COUNT]))
|
cg.add(var.set_sr_count(config[CONF_SR_COUNT]))
|
||||||
|
|
Loading…
Reference in a new issue