Maintenance 2nd (#4106)

* Add link to docs

* Fix link

* Update line breaks

* Update ordering

* Align vera platofrm to only use add_devices
(instead od add_devices_callback)

* Remove line break

* Use consts

* Update ordering

* Update ordering

* Use const, create default name, use string formatting

* Update ordering

* Use const

* Update import style

* Update ordering and line breaks

* update line breaks

* Set default port

* Set defaults and update ordering

* Update ordering

* Minor style updates

* Update ordering, defaults, line breaks, and readability

* Use constants

* Add line breaks

* use string formatting

* Update line breaks

* Update logger
This commit is contained in:
Fabian Affolter 2016-10-30 09:58:34 +01:00 committed by GitHub
parent e6ece4bf6d
commit 9f2aae1357
28 changed files with 272 additions and 271 deletions

View file

@ -7,15 +7,16 @@ https://home-assistant.io/components/device_tracker.bbox/
from collections import namedtuple
import logging
from datetime import timedelta
import homeassistant.util.dt as dt_util
from homeassistant.components.device_tracker import DOMAIN
from homeassistant.util import Throttle
# Return cached results if last scan was less then this time ago
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=60)
REQUIREMENTS = ['pybbox==0.0.5-alpha']
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['pybbox==0.0.5-alpha']
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=60)
def get_scanner(hass, config):
@ -36,7 +37,7 @@ class BboxDeviceScanner(object):
self.last_results = [] # type: List[Device]
self.success_init = self._update_info()
_LOGGER.info('Bbox scanner initialized')
_LOGGER.info("Bbox scanner initialized")
def scan_devices(self):
"""Scan for new devices and return a list with found device IDs."""
@ -60,7 +61,7 @@ class BboxDeviceScanner(object):
Returns boolean if scanning successful.
"""
_LOGGER.info('Scanning')
_LOGGER.info("Scanning...")
import pybbox
@ -78,5 +79,5 @@ class BboxDeviceScanner(object):
self.last_results = last_results
_LOGGER.info('Bbox scan successful')
_LOGGER.info("Bbox scan successful")
return True