MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
The error seems to occur incidentally, for another 'battery' sensor the payload is ok:
{
"stat_t": "+/+/RTL_433toMQTT/Acurite-01185M/0/64",
"dev_cla": "battery",
"unit_of_meas": "%",
"name": "battery",
"uniq_id": "Acurite-01185M-0-64-battery_ok",
"val_tpl": "{{ float(value_json.battery_ok) * 99 + 1 | is_defined }}",
"state_class": "measurement",
"device": {
"identifiers": [
"Acurite-01185M-0-64"
],
"connections": [
[
"mac",
"Acurite-01185M-0-64"
]
],
"model": "Acurite-01185M",
"name": "Acurite-01185M-0-64",
"via_device": "OMG_lilygo_rtl_433_ESP"
}
}
Expected behavior
Valid JSON in config topic
Screenshots
Environment (please complete the following information):
version: v1.6.0 (I tried OTA to 1.7.0 but it failed)
env: lilygo-rtl_433
modules: 'LilyGo_SSD1306', 'WebUI', 'rtl_433'
OpenMQTTGateway seems to generate invalid JSON in some HA config topics. For instance:
-topic: homeassistant/sensor/GT-WT02-1-4-battery_ok/config -payload: {"stat_t":"+/+/RTL_433toMQTT/GT-WT02/1/4","dev_cla":"battery","unit_of_meas":"%","name":"battery","uniq_id":"GT-WT02-1-4-battery_ok","val_tpl":"{{ float(value_json.battery_ok) * 99 + 1 | is_defi1�2homeassistant/sensor/GT-WT02-1-4-battery_ok/config{"stat_t":"+/+/RTL_433toMQTT/GT-WT02/1/4","dev_cla":"battery","unit_of_meas":"%","name":"battery","uniq_id":"GT-WT02-1-4-battery_ok","val
I copied this payload from MQTT explorer.
The error seems to occur incidentally, for another 'battery' sensor the payload is ok: { "stat_t": "+/+/RTL_433toMQTT/Acurite-01185M/0/64", "dev_cla": "battery", "unit_of_meas": "%", "name": "battery", "uniq_id": "Acurite-01185M-0-64-battery_ok", "val_tpl": "{{ float(value_json.battery_ok) * 99 + 1 | is_defined }}", "state_class": "measurement", "device": { "identifiers": [ "Acurite-01185M-0-64" ], "connections": [ [ "mac", "Acurite-01185M-0-64" ] ], "model": "Acurite-01185M", "name": "Acurite-01185M-0-64", "via_device": "OMG_lilygo_rtl_433_ESP" } } Expected behavior Valid JSON in config topic
Screenshots
Environment (please complete the following information): version: v1.6.0 (I tried OTA to 1.7.0 but it failed) env: lilygo-rtl_433 modules: 'LilyGo_SSD1306', 'WebUI', 'rtl_433'
Additional context