summaryrefslogtreecommitdiff
path: root/smart_home
diff options
context:
space:
mode:
Diffstat (limited to 'smart_home')
-rw-r--r--smart_home/cameras.py14
-rw-r--r--smart_home/device.py6
-rw-r--r--smart_home/lights.py4
-rw-r--r--smart_home/outlets.py2
4 files changed, 9 insertions, 17 deletions
diff --git a/smart_home/cameras.py b/smart_home/cameras.py
index 963f54e..40850a9 100644
--- a/smart_home/cameras.py
+++ b/smart_home/cameras.py
@@ -2,25 +2,13 @@
"""Utilities for dealing with the webcams."""
-from abc import abstractmethod
-import datetime
-import json
import logging
-import os
-import re
-import subprocess
-import sys
-from typing import Any, Dict, List, Optional, Set
-import argparse_utils
-import config
-import logging_utils
import smart_home.device as dev
-from google_assistant import ask_google, GoogleResponse
-from decorator_utils import timeout, memoized
logger = logging.getLogger(__name__)
+
class BaseCamera(dev.Device):
camera_mapping = {
'cabin_drivewaycam': 'cabin_driveway',
diff --git a/smart_home/device.py b/smart_home/device.py
index 27860c5..0953b8d 100644
--- a/smart_home/device.py
+++ b/smart_home/device.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
import re
-from typing import Any, List, Optional, Tuple
+from typing import List, Optional
+
class Device(object):
def __init__(
@@ -24,6 +25,9 @@ class Device(object):
def get_mac(self) -> str:
return self.mac
+ def get_ip(self) -> str:
+ pass
+
def get_keywords(self) -> Optional[List[str]]:
return self.kws
diff --git a/smart_home/lights.py b/smart_home/lights.py
index 0752139..5446722 100644
--- a/smart_home/lights.py
+++ b/smart_home/lights.py
@@ -2,7 +2,7 @@
"""Utilities for dealing with the smart lights."""
-from abc import ABC, abstractmethod
+from abc import abstractmethod
import datetime
import json
import logging
@@ -10,7 +10,7 @@ import os
import re
import subprocess
import sys
-from typing import Any, Dict, List, Optional, Set
+from typing import Any, Dict, List, Optional
import tinytuya as tt
diff --git a/smart_home/outlets.py b/smart_home/outlets.py
index 81e10a7..f34d574 100644
--- a/smart_home/outlets.py
+++ b/smart_home/outlets.py
@@ -10,7 +10,7 @@ import os
import re
import subprocess
import sys
-from typing import Any, Dict, List, Optional, Set
+from typing import Dict, List, Optional
import argparse_utils
import config