diff --git a/source/_integrations/button.mqtt.markdown b/source/_integrations/button.mqtt.markdown index b9229a44911..909ba65f3a4 100644 --- a/source/_integrations/button.mqtt.markdown +++ b/source/_integrations/button.mqtt.markdown @@ -14,11 +14,30 @@ The `mqtt` button platform lets you send an MQTT message when the button is pres ```yaml # Example configuration.yaml entry +mqtt: + button: + - command_topic: "home/bedroom/switch1/reboot" +``` + + + +{% details "Previous configuration format" %} + +The configuration format of manual configured MQTT items has changed. +The old format that places configurations under the `button` platform key +should no longer be used and is deprecated. + +The above example shows the new and modern way, +this is the previous/old example: + +```yaml button: - platform: mqtt command_topic: "home/bedroom/switch1/reboot" ``` +{% enddetails %} + {% configuration %} availability: description: A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic`. @@ -193,16 +212,16 @@ The example below shows a full configuration for a button. ```yaml # Example configuration.yaml entry -button: - - platform: mqtt - unique_id: bedroom_switch_reboot_btn - name: "Restart Bedroom Switch" - command_topic: "home/bedroom/switch1/commands" - payload_press: "restart" - availability: - - topic: "home/bedroom/switch1/available" - qos: 0 - retain: false - entity_category: "config" - device_class: "restart" +mqtt: + button: + - unique_id: bedroom_switch_reboot_btn + name: "Restart Bedroom Switch" + command_topic: "home/bedroom/switch1/commands" + payload_press: "restart" + availability: + - topic: "home/bedroom/switch1/available" + qos: 0 + retain: false + entity_category: "config" + device_class: "restart" ```