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:
1 parent
e22e70a01a
commit
3ee4d1060f
264 files changed
+1686
-1768
No files matched your search
@@ -17,13 +17,12 @@ import homeassistant.util.dt as dt_util
|
||||
from homeassistant.components import sun
|
||||
from homeassistant.components.frontend import register_built_in_panel
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.const import (EVENT_HOMEASSISTANT_START,
|
||||
EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED,
|
||||
STATE_NOT_HOME, STATE_OFF, STATE_ON,
|
||||
ATTR_HIDDEN, HTTP_BAD_REQUEST)
|
||||
from homeassistant.const import (
|
||||
EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, EVENT_STATE_CHANGED,
|
||||
STATE_NOT_HOME, STATE_OFF, STATE_ON, ATTR_HIDDEN, HTTP_BAD_REQUEST)
|
||||
from homeassistant.core import State, split_entity_id, DOMAIN as HA_DOMAIN
|
||||
|
||||
DOMAIN = "logbook"
|
||||
DOMAIN = 'logbook'
|
||||
DEPENDENCIES = ['recorder', 'frontend']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -100,11 +99,11 @@ def setup(hass, config):
|
||||
|
||||
hass.http.register_view(LogbookView(config.get(DOMAIN, {})))
|
||||
|
||||
register_built_in_panel(hass, 'logbook', 'Logbook',
|
||||
'mdi:format-list-bulleted-type')
|
||||
register_built_in_panel(
|
||||
hass, 'logbook', 'Logbook', 'mdi:format-list-bulleted-type')
|
||||
|
||||
hass.services.register(DOMAIN, 'log', log_message,
|
||||
schema=LOG_MESSAGE_SCHEMA)
|
||||
hass.services.register(
|
||||
DOMAIN, 'log', log_message, schema=LOG_MESSAGE_SCHEMA)
|
||||
return True
|
||||
|
||||
|
||||
@@ -164,11 +163,11 @@ class Entry(object):
|
||||
|
||||
|
||||
def humanify(events):
|
||||
"""Generator that converts a list of events into Entry objects.
|
||||
"""Generate a converted list of events into Entry objects.
|
||||
|
||||
Will try to group events if possible:
|
||||
- if 2+ sensor updates in GROUP_BY_MINUTES, show last
|
||||
- if home assistant stop and start happen in same minute call it restarted
|
||||
- if 2+ sensor updates in GROUP_BY_MINUTES, show last
|
||||
- if home assistant stop and start happen in same minute call it restarted
|
||||
"""
|
||||
# Group events in batches of GROUP_BY_MINUTES
|
||||
for _, g_events in groupby(
|
||||
|
||||
Reference in new issue
Block a user