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 authored and Paulus Schoutsen committed 2017-04-29 22:04:49 -07:00
1 parent e22e70a01a
commit 3ee4d1060f
264 files changed
+1686 -1768

No files matched your search

+7 -5
View File
@@ -10,9 +10,9 @@ import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.const import (CONF_TOKEN, EVENT_STATE_CHANGED)
from homeassistant.helpers import state as state_helper
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
@@ -28,7 +28,7 @@ CONFIG_SCHEMA = vol.Schema({
def setup(hass, config):
"""Setup the Logentries component."""
"""Set up the Logentries component."""
conf = config[DOMAIN]
token = conf.get(CONF_TOKEN)
le_wh = '{}{}'.format(DEFAULT_HOST, token)
@@ -52,11 +52,13 @@ def setup(hass, config):
}
]
try:
payload = {"host": le_wh,
"event": json_body}
payload = {
"host": le_wh,
"event": json_body
}
requests.post(le_wh, data=json.dumps(payload), timeout=10)
except requests.exceptions.RequestException as error:
_LOGGER.exception('Error sending to Logentries: %s', error)
_LOGGER.exception("Error sending to Logentries: %s", error)
hass.bus.listen(EVENT_STATE_CHANGED, logentries_event_listener)