mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Fix invalid JSONs (#37171)
Validated & fixes all invalid JSON code blocks
This commit is contained in:
parent
052c0ef649
commit
4979864292
@ -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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user