From 0f9bece011e7c65238e7955f78e7193ad331f045 Mon Sep 17 00:00:00 2001 From: Barbudor Date: Sun, 5 Mar 2023 07:52:30 +0100 Subject: [PATCH] fix topic comparison (#18114) --- tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino b/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino index d8ad9eed2..8fe9f2d50 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_10_rules.ino @@ -1174,7 +1174,7 @@ bool RulesMqttData(void) { event_item = subscriptions.get(index); //AddLog(LOG_LEVEL_DEBUG, PSTR("RUL: Match MQTT message Topic %s with subscription topic %s"), sTopic.c_str(), event_item.Topic.c_str()); - if (sTopic.startsWith(event_item.Topic)) { + if ((sTopic == event_item.Topic) || sTopic.startsWith(event_item.Topic+"/")) { //This topic is subscribed by us, so serve it serviced = true; String value;