Update mqtt.markdown to fix typo (#30100)

There's one too many right bracket causing the json parsor to fail.

Error log:

2023-12-01 23:45:07.964 WARNING (MainThread) [homeassistant.components.mqtt.discovery] Unable to parse JSON irrigation: '{"name": "Irrigation", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state", "unique_id": "irr01ad", "device": {"identifiers": ["garden01ad"], "name": "Garden" }}}'
This commit is contained in:
Hao 2023-12-01 22:56:12 -08:00 committed by GitHub
parent 59c1d4a6b3
commit a3e77ed933
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -844,7 +844,7 @@ Setting up a light, switch etc. is similar but requires a `command_topic` as men
```bash ```bash
mosquitto_pub -r -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/config" \ mosquitto_pub -r -h 127.0.0.1 -p 1883 -t "homeassistant/switch/irrigation/config" \
-m '{"name": "Irrigation", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state", "unique_id": "irr01ad", "device": {"identifiers": ["garden01ad"], "name": "Garden" }}}' -m '{"name": "Irrigation", "command_topic": "homeassistant/switch/irrigation/set", "state_topic": "homeassistant/switch/irrigation/state", "unique_id": "irr01ad", "device": {"identifiers": ["garden01ad"], "name": "Garden" }}'
``` ```
Set the state: Set the state: