From 2ca8a0189df9dd558c00cfb50a5d476467fdbdef Mon Sep 17 00:00:00 2001 From: openshwprojects Date: Fri, 18 Nov 2022 13:44:00 +0100 Subject: [PATCH] OBK_DISABLE_ALL_DRIVERS fix --- src/mqtt/new_mqtt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mqtt/new_mqtt.c b/src/mqtt/new_mqtt.c index 0c0d1ceca..f1b6d7cb8 100644 --- a/src/mqtt/new_mqtt.c +++ b/src/mqtt/new_mqtt.c @@ -1213,11 +1213,13 @@ OBK_Publish_Result MQTT_DoItemPublish(int idx) if (role == IOR_Relay || role == IOR_Relay_n || role == IOR_LED || role == IOR_LED_n) { bWantsToPublish = true; } +#ifndef OBK_DISABLE_ALL_DRIVERS // publish if channel is used by TuyaMCU (no pin role set), for example door sensor state with power saving V0 protocol // Not enabled by default, you have to set OBK_FLAG_TUYAMCU_ALWAYSPUBLISHCHANNELS flag if (CFG_HasFlag(OBK_FLAG_TUYAMCU_ALWAYSPUBLISHCHANNELS) && TuyaMCU_IsChannelUsedByTuyaMCU(idx)) { bWantsToPublish = true; } +#endif // TODO //type = CHANNEL_GetType(idx); if (bWantsToPublish) {