3 """General utility functions involving smart home devices."""
8 from smart_home import cameras, chromecasts, lights, outlets
10 logger = logging.getLogger(__name__)
13 def is_camera(device: Any) -> bool:
14 return isinstance(device, cameras.BaseCamera)
17 def is_chromecast(device: Any) -> bool:
18 return isinstance(device, chromecasts.BaseChromecast)
21 def is_light(device: Any) -> bool:
22 return isinstance(device, lights.BaseLight)
25 def is_outlet(device: Any) -> bool:
26 return isinstance(device, outlets.BaseOutlet)