From 49798642929715cf937131f0234a7d20a7342fed Mon Sep 17 00:00:00 2001 From: Xitee <59659167+Xitee1@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:43:09 +0100 Subject: [PATCH] Fix invalid JSONs (#37171) Validated & fixes all invalid JSON code blocks --- source/_integrations/mqtt.markdown | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/source/_integrations/mqtt.markdown b/source/_integrations/mqtt.markdown index c03222ba98f..602cb5dce73 100644 --- a/source/_integrations/mqtt.markdown +++ b/source/_integrations/mqtt.markdown @@ -360,12 +360,12 @@ The component specific options are placed as mappings under the `components` key "mdl": "xya", "sw": "1.0", "sn": "ea334450945afc", - "hw": "1.0rev2", + "hw": "1.0rev2" }, "o": { "name":"bla2mqtt", "sw": "2.1", - "url": "https://bla2mqtt.example.com/support", + "url": "https://bla2mqtt.example.com/support" }, "cmps": { "some_unique_component_id1": { @@ -373,18 +373,18 @@ The component specific options are placed as mappings under the `components` key "device_class":"temperature", "unit_of_measurement":"°C", "value_template":"{% raw %}{{ value_json.temperature}}{% endraw %}", - "unique_id":"temp01ae_t", + "unique_id":"temp01ae_t" }, "some_unique_id2": { "p": "sensor", "device_class":"humidity", "unit_of_measurement":"%", "value_template":"{% raw %}{{ value_json.humidity}}{% endraw %}", - "unique_id":"temp01ae_h", + "unique_id":"temp01ae_h" } }, "state_topic":"sensorBedroom/state", - "qos": 2, + "qos": 2 } ``` @@ -403,12 +403,12 @@ An empty config can be published as an update to remove a single component from "mdl": "xya", "sw": "1.0", "sn": "ea334450945afc", - "hw": "1.0rev2", + "hw": "1.0rev2" }, "o": { "name":"bla2mqtt", "sw": "2.1", - "url": "https://bla2mqtt.example.com/support", + "url": "https://bla2mqtt.example.com/support" }, "cmps": { "some_unique_component_id1": { @@ -416,14 +416,14 @@ An empty config can be published as an update to remove a single component from "device_class":"temperature", "unit_of_measurement":"°C", "value_template":"{% raw %}{{ value_json.temperature}}{% endraw %}", - "unique_id":"temp01ae_t", + "unique_id":"temp01ae_t" }, "some_unique_id2": { - "p": "sensor", + "p": "sensor" } }, "state_topic":"sensorBedroom/state", - "qos": 2, + "qos": 2 } ``` @@ -440,12 +440,12 @@ After removing a component, you should send another update with the removed comp "mdl": "xya", "sw": "1.0", "sn": "ea334450945afc", - "hw": "1.0rev2", + "hw": "1.0rev2" }, "o": { "name":"bla2mqtt", "sw": "2.1", - "url": "https://bla2mqtt.example.com/support", + "url": "https://bla2mqtt.example.com/support" }, "cmps": { "some_unique_component_id1": { @@ -453,11 +453,11 @@ After removing a component, you should send another update with the removed comp "device_class":"temperature", "unit_of_measurement":"°C", "value_template":"{% raw %}{{ value_json.temperature}}{% endraw %}", - "unique_id":"temp01ae_t", + "unique_id":"temp01ae_t" } }, "state_topic":"sensorBedroom/state", - "qos": 2, + "qos": 2 } ``` @@ -575,7 +575,7 @@ Discovery payload device: "state_topic": "foobar/sensor/sensor1", "unique_id": "bla_sensor001" } - }, + } } ``` @@ -618,19 +618,19 @@ Example discovery payload: "mdl": "xya", "sw": "1.0", "sn": "ea334450945afc", - "hw": "1.0rev2", + "hw": "1.0rev2" }, "o": { "name":"bla2mqtt", "sw": "2.1", - "url": "https://bla2mqtt.example.com/support", + "url": "https://bla2mqtt.example.com/support" }, "device_class":"temperature", "unit_of_measurement":"°C", "value_template":"{% raw %}{{ value_json.temperature}}{% endraw %}", "unique_id":"temp01ae_t", "state_topic":"sensorBedroom/state", - "qos": 2, + "qos": 2 } ``` @@ -1286,12 +1286,12 @@ Setting up a [light that takes JSON payloads](/integrations/light.mqtt/#json-sch "mdl_id": "ABC123", "sw": "1.0", "sn": "ea334450945afc", - "hw": "1.0rev2", + "hw": "1.0rev2" }, "o": { "name":"bla2mqtt", "sw": "2.1", - "url": "https://bla2mqtt.example.com/support", + "url": "https://bla2mqtt.example.com/support" } } ```