diff --git a/cbpi/extension/gpioactor/__init__.py b/cbpi/extension/gpioactor/__init__.py index 50a15ae..ae8104f 100644 --- a/cbpi/extension/gpioactor/__init__.py +++ b/cbpi/extension/gpioactor/__init__.py @@ -20,17 +20,17 @@ except Exception: import RPi.GPIO as GPIO -@parameters([Property.Select(label="GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]), Property.Select(label="Inverted", options=["Yes", "No"])]) +@parameters([Property.Select(label="GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]), Property.Select(label="Inverted", options=["Yes", "No"],description="No: Active on high; Yes: Active on low")]) class GPIOActor(CBPiActor): def get_GPIO_state(self, state): # ON if state == 1: - return 0 if self.inverted == False else 1 + return 1 if self.inverted == False else 0 # OFF if state == 0: - return 1 if self.inverted == False else 0 + return 0 if self.inverted == False else 1 async def start(self): await super().start()