From 4e44874149c926016c5d772db88c477d5257220d Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 18 Jan 2024 09:57:56 -0600 Subject: [PATCH] [BT] Timeout for MUE4094RT (#1871) --- main/ZgatewayBT.ino | 8 ++++++++ platformio.ini | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/main/ZgatewayBT.ino b/main/ZgatewayBT.ino index eb7d72d..98e922c 100644 --- a/main/ZgatewayBT.ino +++ b/main/ZgatewayBT.ino @@ -1052,6 +1052,14 @@ void launchBTDiscovery(bool overrideDiscovery) { 0, "", "", false, "", model.c_str(), brand.c_str(), model_id.c_str(), macWOdots.c_str(), false, stateClassNone); + } else if (p->sensorModel_id == TheengsDecoder::MUE4094RT && strcmp(prop.value()["unit"], "status") == 0) { // This device does not a broadcast when there is nothing detected so adding a timeout + createDiscovery("binary_sensor", + discovery_topic.c_str(), entity_name.c_str(), unique_id.c_str(), + will_Topic, prop.value()["name"], value_template.c_str(), + "True", "False", "", + BTConfig.presenceAwayTimer / 1000, "", "", false, "", + model.c_str(), brand.c_str(), model_id.c_str(), macWOdots.c_str(), false, + stateClassNone); } else if (strcmp(prop.value()["unit"], "status") == 0) { createDiscovery("binary_sensor", discovery_topic.c_str(), entity_name.c_str(), unique_id.c_str(), diff --git a/platformio.ini b/platformio.ini index f7bbaef..3c6e435 100644 --- a/platformio.ini +++ b/platformio.ini @@ -154,7 +154,7 @@ somfy_remote=Somfy_Remote_Lib@0.3.0 rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP.git#v0.3.2 emodbus = miq19/eModbus@1.0.0 gfSunInverter = https://github.com/BlackSmith/GFSunInverter.git#v1.0.1 -decoder = https://github.com/theengs/decoder.git#v1.6.7 +decoder = https://github.com/theengs/decoder.git#development ssd1306 = https://github.com/ThingPulse/esp8266-oled-ssd1306.git#f96fd6a lm75 = jeremycole/I2C Temperature Sensors derived from the LM75@^1.0.3 rn8209 = https://github.com/theengs/RN8209C-SDK.git#arduino