Merge pull request #1819 from fabaff/typos

Update file header and fix typos
This commit is contained in:
Fabian Affolter 2016-04-13 19:35:06 +02:00
commit 9d71a8c4b9
3 changed files with 11 additions and 6 deletions

View File

@ -14,7 +14,7 @@ To use the mqtt_example component you will need to add the following to your
configuration.yaml file. configuration.yaml file.
mqtt_example: mqtt_example:
topic: home-assistant/mqtt_example topic: "home-assistant/mqtt_example"
""" """
import homeassistant.loader as loader import homeassistant.loader as loader
@ -29,7 +29,7 @@ DEFAULT_TOPIC = 'home-assistant/mqtt_example'
def setup(hass, config): def setup(hass, config):
"""Setup the MQTT example component.""" """Setup the MQTT example component."""
mqtt = loader.get_component('mqtt') mqtt = loader.get_component('mqtt')
topic = config[DOMAIN].get('topic', DEFAULT_TOPIC) topic = config[DOMAIN].get('topic', DEFAULT_TOPIC)
entity_id = 'mqtt_example.last_message' entity_id = 'mqtt_example.last_message'

View File

@ -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 For more details about this component, please refer to the documentation at
https://home-assistant.io/components/mqtt/ 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, 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({ MQTT_RO_PLATFORM_SCHEMA = MQTT_BASE_PLATFORM_SCHEMA.extend({
vol.Required(CONF_STATE_TOPIC): valid_subscribe_topic, vol.Required(CONF_STATE_TOPIC): valid_subscribe_topic,
vol.Optional(CONF_VALUE_TEMPLATE): cv.template, 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({ MQTT_RW_PLATFORM_SCHEMA = MQTT_BASE_PLATFORM_SCHEMA.extend({
vol.Required(CONF_COMMAND_TOPIC): valid_publish_topic, vol.Required(CONF_COMMAND_TOPIC): valid_publish_topic,
vol.Optional(CONF_RETAIN, default=DEFAULT_RETAIN): cv.boolean, vol.Optional(CONF_RETAIN, default=DEFAULT_RETAIN): cv.boolean,

View File

@ -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 asyncio
import logging import logging
import tempfile import tempfile