Fix a bug in device.py around the type of keywords, add logging and
[python_utils.git] / smart_home / device.py
index 02717a343f433414398425c7d16e4939414ecf2a..06187d7a6578e2eaedb5d86e6173977d62b6288d 100644 (file)
@@ -11,14 +11,14 @@ class Device(object):
         self,
         name: str,
         mac: str,
-        keywords: Optional[List[str]],
+        keywords: Optional[str] = "",
     ):
         self.name = name
         self.mac = mac
         self.keywords = keywords
         self.arper = arper.Arper()
         if keywords is not None:
-            self.kws = keywords
+            self.kws: List[str] = keywords.split(' ')
         else:
             self.kws = []