mirror of
https://github.com/esphome/esphome.git
synced 2025-09-13 00:32:20 +01:00
Fix: Pin flags code generation returning FLAG_NONE (#2377)
Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -90,7 +90,7 @@ def gpio_flags_expr(mode):
|
||||
CONF_PULLDOWN: cg.gpio_Flags.FLAG_PULLDOWN,
|
||||
}
|
||||
active_flags = [v for k, v in FLAGS_MAPPING.items() if mode.get(k)]
|
||||
if active_flags:
|
||||
if not active_flags:
|
||||
return cg.gpio_Flags.FLAG_NONE
|
||||
|
||||
return reduce(operator.or_, active_flags)
|
||||
|
Reference in New Issue
Block a user