summaryrefslogtreecommitdiff
path: root/smart_home/chromecasts.py
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2022-02-10 14:10:48 -0800
committerScott Gasch <[email protected]>2022-02-10 14:10:48 -0800
commitf2600f30801c849fc1d139386e3ddc3c9eb43e30 (patch)
tree74c5173bf47322bcfbbd2985adfb54741cf3c4cc /smart_home/chromecasts.py
parent415c2c91972ea5a574dce166ec609926dcf19d73 (diff)
More cleanup.
Diffstat (limited to 'smart_home/chromecasts.py')
-rw-r--r--smart_home/chromecasts.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/smart_home/chromecasts.py b/smart_home/chromecasts.py
index bec8461..dd6d217 100644
--- a/smart_home/chromecasts.py
+++ b/smart_home/chromecasts.py
@@ -17,6 +17,8 @@ logger = logging.getLogger(__name__)
class BaseChromecast(dev.Device):
+ """A base class to represent a Google Chromecase device."""
+
ccasts: List[Any] = []
refresh_ts = None
browser = None
@@ -45,13 +47,11 @@ class BaseChromecast(dev.Device):
self.cast = None
for cc in BaseChromecast.ccasts:
if cc.cast_info.host == ip and cc.cast_info.cast_type != 'group':
- logger.debug(f'Found chromecast at {ip}: {cc}')
+ logger.debug('Found chromecast at %s: %s', ip, cc)
self.cast = cc
self.cast.wait(timeout=1.0)
if self.cast is None:
- raise Exception(
- f'Can\'t find ccast device at {ip}, is that really a ccast device?'
- )
+ raise Exception(f'Can\'t find ccast device at {ip}, is that really a ccast device?')
def is_idle(self):
return self.cast.is_idle