blob: f79c734be49e46d5f56db1528deb49e2d66f15e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env python3
import logging
from typing import Any
import smart_home.cameras as cameras
import smart_home.chromecasts as chromecasts
import smart_home.lights as lights
import smart_home.outlets as outlets
logger = logging.getLogger(__name__)
def is_camera(device: Any) -> bool:
return isinstance(device, cameras.BaseCamera)
def is_chromecast(device: Any) -> bool:
return isinstance(device, chromecasts.BaseChromecast)
def is_light(device: Any) -> bool:
return isinstance(device, lights.BaseLight)
def is_outlet(device: Any) -> bool:
return isinstance(device, outlets.BaseOutlet)
|