11"""
22Support for Sky Hub.
33
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/
86"""
97import logging
108import re
2018from homeassistant .const import CONF_HOST
2119from homeassistant .util import Throttle
2220
23- # Return cached results if last scan was less then this time ago.
24- MIN_TIME_BETWEEN_SCANS = timedelta (seconds = 10 )
25-
2621_LOGGER = logging .getLogger (__name__ )
27-
2822_MAC_REGEX = re .compile (r'(([0-9A-Fa-f]{1,2}\:){5}[0-9A-Fa-f]{1,2})' )
2923
24+ MIN_TIME_BETWEEN_SCANS = timedelta (seconds = 10 )
25+
3026PLATFORM_SCHEMA = PLATFORM_SCHEMA .extend ({
3127 vol .Required (CONF_HOST ): cv .string
3228})
@@ -45,7 +41,7 @@ class SkyHubDeviceScanner(DeviceScanner):
4541
4642 def __init__ (self , config ):
4743 """Initialise the scanner."""
48- _LOGGER .info (' Initialising Sky Hub' )
44+ _LOGGER .info (" Initialising Sky Hub" )
4945 self .host = config .get (CONF_HOST , '192.168.1.254' )
5046
5147 self .lock = threading .Lock ()
@@ -86,7 +82,7 @@ def _update_info(self):
8682 return False
8783
8884 with self .lock :
89- _LOGGER .info (' Scanning' )
85+ _LOGGER .info (" Scanning" )
9086
9187 data = _get_skyhub_data (self .url )
9288
0 commit comments