# 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:
        select:
          options:
            - "0"
            - "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:
          min: 1
          max: 300
          unit_of_measurement: "seconds"

reload:
  name: Reload
  description: Reload all MQTT entities from YAML.
