Modify docstrings to match PEP257
This commit is contained in:
parent
5222c19b4c
commit
6ac9210919
9 changed files with 48 additions and 68 deletions
|
@ -1,6 +1,4 @@
|
|||
"""
|
||||
homeassistant.components.automation.event
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Offers event listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
|
@ -15,7 +13,7 @@ _LOGGER = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def trigger(hass, config, action):
|
||||
""" Listen for events based on config. """
|
||||
"""Listen for events based on configuration."""
|
||||
event_type = config.get(CONF_EVENT_TYPE)
|
||||
|
||||
if event_type is None:
|
||||
|
@ -25,7 +23,7 @@ def trigger(hass, config, action):
|
|||
event_data = config.get(CONF_EVENT_DATA)
|
||||
|
||||
def handle_event(event):
|
||||
""" Listens for events and calls the action when data matches. """
|
||||
"""Listens for events and calls the action when data matches."""
|
||||
if not event_data or all(val == event.data.get(key) for key, val
|
||||
in event_data.items()):
|
||||
action()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue