Update docstrings (#7361)

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update tomato.py

* Update isy994.py

* Lint + fix tests

* Lint
This commit is contained in:
Fabian Affolter 2017-04-30 07:04:49 +02:00 committed by Paulus Schoutsen
parent e22e70a01a
commit 3ee4d1060f
264 changed files with 1686 additions and 1768 deletions

View file

@ -56,7 +56,7 @@ CONFIG_SCHEMA = vol.Schema({
def setup(hass, config):
"""Setup the VOC component."""
"""Set up the Volvo On Call component."""
from volvooncall import Connection
connection = Connection(
config[DOMAIN].get(CONF_USERNAME),
@ -79,14 +79,11 @@ def setup(hass, config):
for attr, (component, *_) in RESOURCES.items():
if (getattr(vehicle, attr + '_supported', True) and
attr in config[DOMAIN].get(CONF_RESOURCES, [attr])):
discovery.load_platform(hass,
component,
DOMAIN,
(vehicle.vin, attr),
config)
discovery.load_platform(
hass, component, DOMAIN, (vehicle.vin, attr), config)
def update_vehicle(vehicle):
"""Updated information on vehicle received."""
"""Revieve updated information on vehicle."""
state.vehicles[vehicle.vin] = vehicle
if vehicle.vin not in state.entities:
discover_vehicle(vehicle)
@ -101,7 +98,7 @@ def setup(hass, config):
"""Update status from the online service."""
try:
if not connection.update():
_LOGGER.warning('Could not query server')
_LOGGER.warning("Could not query server")
return False
for vehicle in connection.vehicles:
@ -111,7 +108,7 @@ def setup(hass, config):
finally:
track_point_in_utc_time(hass, update, utcnow() + interval)
_LOGGER.info('Logging in to service')
_LOGGER.info("Logging in to service")
return update(utcnow())
@ -154,7 +151,7 @@ class VolvoEntity(Entity):
@property
def should_poll(self):
"""Polling is not needed."""
"""Return the polling state."""
return False
@property