added device type detection to config_flow
This commit is contained in:
1 parent
9b7fd82591
commit
a50deaae37
4 files changed
+74
-18
No files matched your search
@@ -41,6 +41,6 @@ def build_device(address: str, name: str):
|
||||
|
||||
def get_type_by_bt_name(bt_name: str):
|
||||
match = DEVICE_NAME_RE.match(bt_name)
|
||||
if len(match) > 0:
|
||||
return match[1]
|
||||
return "Unknown"
|
||||
if match is None or len(match) < 2:
|
||||
return "Unknown"
|
||||
return match[1]
|
||||
Reference in new issue
Block a user