diff --git a/pi_mqtt_gpio/modules/orangepi.py b/pi_mqtt_gpio/modules/orangepi.py index 06ae9bd2115651a893cf7506c97ce004dcb2ad36..e61cf91c9fe06cbe58092433bf0d20886f7a0c73 100644 --- a/pi_mqtt_gpio/modules/orangepi.py +++ b/pi_mqtt_gpio/modules/orangepi.py @@ -15,8 +15,9 @@ CONFIG_SCHEMA = { }, "mode": { "type": "string", - "required": False, + "required": True, "empty": False, + "default": "bcm", "allowed": ALLOWED_MODES + list(map(str.upper, ALLOWED_MODES)) } } @@ -44,7 +45,7 @@ class GPIO(GenericGPIO): } board = config["board"].upper() - mode = config.get("mode", "bcm").upper() + mode = config["mode"].upper() if not hasattr(gpio, board): raise AssertionError("%s board not found" % board) gpio.setboard(getattr(gpio, board))