Skip to content

Commit

Permalink
Cleanup MQTT legacy notify instruction using mqtt publish
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouwh committed Aug 12, 2024
1 parent 4f6a76b commit a95a66a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions source/_integrations/mqtt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1027,31 +1027,6 @@ Documentation on the MQTT components that support YAML [can be found here](/inte
The MQTT integration supports templating. Read more [about using templates with the MQTT integration](/docs/configuration/templating/#using-templates-with-the-mqtt-integration).
## MQTT Notifications
The MQTT notification support is different than for the other [notification](/integrations/notify/) integrations. It is an action. This means you need to provide more details when calling the action.
**Perform action** section from **Developer Tools** -> **Actions** allows you to send MQTT messages. Choose *mqtt.publish* from the list of available actions, and enter something like the sample below into the **data** field and select **Perform action**.
```json
{
"~":"homeassistant/switch/irrigation",
"name":"garden",
"cmd_t":"~/set",
"stat_t":"~/state"
}
```

<p class='img'>
<img src='/images/screenshots/mqtt-notify.png' alt='Screenshot showing how to publish a message to an MQTT topic'/>
</p>

The same will work for automations.

<p class='img'>
<img src='/images/screenshots/mqtt-notify-action.png' alt='Screenshot showing how to publish a message to an MQTT topic for automations' />
</p>

### Examples
#### REST API
Expand Down
Binary file removed source/images/screenshots/mqtt-notify-action.png
Binary file not shown.
Binary file removed source/images/screenshots/mqtt-notify.png
Binary file not shown.

0 comments on commit a95a66a

Please sign in to comment.