1
1
"""
2
2
Support for Sky Hub.
3
3
4
- # Example configuration.yaml entry
5
- device_tracker:
6
- - platform: sky_hub
7
- host: 192.168.1.254
4
+ For more details about this platform, please refer to the documentation at
5
+ https://home-assistant.io/components/device_tracker.sky_hub/
8
6
"""
9
7
import logging
10
8
import re
20
18
from homeassistant .const import CONF_HOST
21
19
from homeassistant .util import Throttle
22
20
23
- # Return cached results if last scan was less then this time ago.
24
- MIN_TIME_BETWEEN_SCANS = timedelta (seconds = 10 )
25
-
26
21
_LOGGER = logging .getLogger (__name__ )
27
-
28
22
_MAC_REGEX = re .compile (r'(([0-9A-Fa-f]{1,2}\:){5}[0-9A-Fa-f]{1,2})' )
29
23
24
+ MIN_TIME_BETWEEN_SCANS = timedelta (seconds = 10 )
25
+
30
26
PLATFORM_SCHEMA = PLATFORM_SCHEMA .extend ({
31
27
vol .Required (CONF_HOST ): cv .string
32
28
})
@@ -45,7 +41,7 @@ class SkyHubDeviceScanner(DeviceScanner):
45
41
46
42
def __init__ (self , config ):
47
43
"""Initialise the scanner."""
48
- _LOGGER .info (' Initialising Sky Hub' )
44
+ _LOGGER .info (" Initialising Sky Hub" )
49
45
self .host = config .get (CONF_HOST , '192.168.1.254' )
50
46
51
47
self .lock = threading .Lock ()
@@ -86,7 +82,7 @@ def _update_info(self):
86
82
return False
87
83
88
84
with self .lock :
89
- _LOGGER .info (' Scanning' )
85
+ _LOGGER .info (" Scanning" )
90
86
91
87
data = _get_skyhub_data (self .url )
92
88
0 commit comments