From 29ee1f98654a689e9cab76b0c7c68428faa43a8c Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Fri, 29 Oct 2021 10:33:07 -0700 Subject: Adds Arper, cleans up other stuff. --- smart_home/cameras.py | 16 ++-------------- smart_home/device.py | 6 +++++- smart_home/lights.py | 4 ++-- smart_home/outlets.py | 2 +- 4 files changed, 10 insertions(+), 18 deletions(-) (limited to 'smart_home') 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 -- cgit v1.3