From 4d3808400e56490c8794b94a42e89c02c77d6513 Mon Sep 17 00:00:00 2001 From: carferrer <102899019+carferrer@users.noreply.github.com> Date: Thu, 14 Mar 2024 22:26:20 +0100 Subject: [PATCH] Update validate.py Change interface requeriments from 2 to 1 digit --- custom_components/myhome/validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/myhome/validate.py b/custom_components/myhome/validate.py index a27b09c..24bf064 100644 --- a/custom_components/myhome/validate.py +++ b/custom_components/myhome/validate.py @@ -161,7 +161,7 @@ def __init__(self, msg=None): self.msg = msg def __call__(self, v): - if type(v) == str and v.isdigit() and len(v) == 2: + if type(v) == str and v.isdigit() and len(v) == 1: if int(v) > 15: raise Invalid(f"Invalid Bus Interface number {v}, it must be between 00 and 15.") elif v is not None: