diff --git a/config/custom_components/mqtt_example.py b/config/custom_components/mqtt_example.py index b4e5e89a977..451a60deef4 100644 --- a/config/custom_components/mqtt_example.py +++ b/config/custom_components/mqtt_example.py @@ -14,7 +14,7 @@ To use the mqtt_example component you will need to add the following to your configuration.yaml file. mqtt_example: - topic: home-assistant/mqtt_example + topic: "home-assistant/mqtt_example" """ import homeassistant.loader as loader @@ -29,7 +29,7 @@ DEFAULT_TOPIC = 'home-assistant/mqtt_example' def setup(hass, config): - """Setup the MQTT example component.""" + """Setup the MQTT example component.""" mqtt = loader.get_component('mqtt') topic = config[DOMAIN].get('topic', DEFAULT_TOPIC) entity_id = 'mqtt_example.last_message' diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index 510aedb00e2..d0843ebdcef 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -1,5 +1,5 @@ """ -Support for MQTT message handling.. +Support for MQTT message handling. For more details about this component, please refer to the documentation at https://home-assistant.io/components/mqtt/ @@ -102,13 +102,13 @@ MQTT_BASE_PLATFORM_SCHEMA = vol.Schema({ vol.Optional(CONF_QOS, default=DEFAULT_QOS): _VALID_QOS_SCHEMA, }) -# Sensor type platforms subscribe to mqtt events +# Sensor type platforms subscribe to MQTT events MQTT_RO_PLATFORM_SCHEMA = MQTT_BASE_PLATFORM_SCHEMA.extend({ vol.Required(CONF_STATE_TOPIC): valid_subscribe_topic, vol.Optional(CONF_VALUE_TEMPLATE): cv.template, }) -# Switch type platforms publish to mqtt and may subscribe +# Switch type platforms publish to MQTT and may subscribe MQTT_RW_PLATFORM_SCHEMA = MQTT_BASE_PLATFORM_SCHEMA.extend({ vol.Required(CONF_COMMAND_TOPIC): valid_publish_topic, vol.Optional(CONF_RETAIN, default=DEFAULT_RETAIN): cv.boolean, diff --git a/homeassistant/components/mqtt/server.py b/homeassistant/components/mqtt/server.py index eba8ce37b3c..e54e0f70ad0 100644 --- a/homeassistant/components/mqtt/server.py +++ b/homeassistant/components/mqtt/server.py @@ -1,4 +1,9 @@ -"""MQTT server.""" +""" +Support for a local MQTT broker. + +For more details about this component, please refer to the documentation at +https://home-assistant.io/components/mqtt/#use-the-embedded-broker +""" import asyncio import logging import tempfile