mirror of
https://github.com/home-assistant/core.git
synced 2025-11-06 09:29:27 +00:00
Modify docstrings to match PEP257
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user