3 # © Copyright 2021-2022, Scott Gasch
5 """General utility functions involving smart home devices."""
10 from smart_home import cameras, chromecasts, lights, outlets
12 logger = logging.getLogger(__name__)
15 def is_camera(device: Any) -> bool:
16 return isinstance(device, cameras.BaseCamera)
19 def is_chromecast(device: Any) -> bool:
20 return isinstance(device, chromecasts.BaseChromecast)
23 def is_light(device: Any) -> bool:
24 return isinstance(device, lights.BaseLight)
27 def is_outlet(device: Any) -> bool:
28 return isinstance(device, outlets.BaseOutlet)