Add "Old" pairing method to the UI

This commit is contained in:
redphx 2022-04-17 10:15:27 +07:00
parent 0e1aa86096
commit d84ad34434
2 changed files with 14 additions and 7 deletions

View file

@ -28,6 +28,7 @@ class WsCommand(Enum):
class PairingMethod(Enum):
DEFAULT = 'default'
FAST = 'fast'
OLD = 'old'
REGEX_PAIRING_CODE = re.compile(r'^\d{6}$')
@ -222,7 +223,7 @@ def is_valid_ip_address(val):
def is_valid_pairing_method(val):
return val in [PairingMethod.DEFAULT.value, PairingMethod.FAST.value]
return val in [PairingMethod.DEFAULT.value, PairingMethod.FAST.value, PairingMethod.OLD.value]
def get_host_ip():