diff --git a/pcf8574_io/PCF85.py b/pcf8574_io/PCF85.py index bd28566..4baa606 100644 --- a/pcf8574_io/PCF85.py +++ b/pcf8574_io/PCF85.py @@ -3,10 +3,10 @@ def setup(PCFAdd, smBus, status): - if status: + if status is not None: with SMBus(smBus) as bus: bus.write_byte(PCFAdd, status) - elif not status: + else: with SMBus(smBus) as bus: bus.write_byte(PCFAdd, 0x00)