diff --git a/homeassistant/components/mqtt/services.yaml b/homeassistant/components/mqtt/services.yaml index 07507035c57..4960cf9fb82 100644 --- a/homeassistant/components/mqtt/services.yaml +++ b/homeassistant/components/mqtt/services.yaml @@ -1,32 +1,22 @@ # Describes the format for available MQTT services publish: - name: Publish - description: Publish a message to an MQTT topic. fields: topic: - name: Topic - description: Topic to publish payload. required: true example: /homeassistant/hello selector: text: payload: - name: Payload - description: Payload to publish. example: This is great selector: text: payload_template: - name: Payload Template - description: Template to render as payload value. Ignored if payload given. advanced: true example: "{{ states('sensor.temperature') }}" selector: object: qos: - name: QoS - description: Quality of Service to use. advanced: true default: 0 selector: @@ -36,27 +26,17 @@ publish: - "1" - "2" retain: - name: Retain - description: If message should have the retain flag set. default: false selector: boolean: dump: - name: Dump - description: - Dump messages on a topic selector to the 'mqtt_dump.txt' file in your - configuration folder. fields: topic: - name: Topic - description: topic to listen to example: "OpenZWave/#" selector: text: duration: - name: Duration - description: how long we should listen for messages in seconds default: 5 selector: number: @@ -65,5 +45,3 @@ dump: unit_of_measurement: "seconds" reload: - name: Reload - description: Reload all MQTT entities from YAML. diff --git a/homeassistant/components/mqtt/strings.json b/homeassistant/components/mqtt/strings.json index 3423b2cd470..61d2b40314b 100644 --- a/homeassistant/components/mqtt/strings.json +++ b/homeassistant/components/mqtt/strings.json @@ -145,5 +145,51 @@ "custom": "Custom" } } + }, + "services": { + "publish": { + "name": "Publish", + "description": "Publishes a message to an MQTT topic.", + "fields": { + "topic": { + "name": "Topic", + "description": "Topic to publish to." + }, + "payload": { + "name": "Payload", + "description": "The payload to publish." + }, + "payload_template": { + "name": "Payload template", + "description": "Template to render as a payload value. If a payload is provided, the template is ignored." + }, + "qos": { + "name": "QoS", + "description": "Quality of Service to use. O. At most once. 1: At least once. 2: Exactly once." + }, + "retain": { + "name": "Retain", + "description": "If the message should have the retain flag set. If set, the broker stores the most recent message on a topic." + } + } + }, + "dump": { + "name": "Export", + "description": "Writes all messages on a specific topic into the `mqtt_dump.txt` file in your configuration folder.", + "fields": { + "topic": { + "name": "Topic", + "description": "Topic to listen to." + }, + "duration": { + "name": "Duration", + "description": "How long we should listen for messages in seconds." + } + } + }, + "reload": { + "name": "Reload", + "description": "Reloads MQTT entities from the YAML-configuration." + } } }