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.mqtt
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Offers MQTT listening automation rules.
|
||||
|
||||
For more details about this automation rule, please refer to the documentation
|
||||
|
|
@ -17,7 +15,7 @@ CONF_PAYLOAD = 'payload'
|
|||
|
||||
|
||||
def trigger(hass, config, action):
|
||||
""" Listen for state changes based on `config`. """
|
||||
"""Listen for state changes based on configuration."""
|
||||
topic = config.get(CONF_TOPIC)
|
||||
payload = config.get(CONF_PAYLOAD)
|
||||
|
||||
|
|
@ -27,7 +25,7 @@ def trigger(hass, config, action):
|
|||
return False
|
||||
|
||||
def mqtt_automation_listener(msg_topic, msg_payload, qos):
|
||||
""" Listens for MQTT messages. """
|
||||
"""Listens for MQTT messages."""
|
||||
if payload is None or payload == msg_payload:
|
||||
action()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue