diff --git a/tasmota/xdrv_02_9_mqtt.ino b/tasmota/xdrv_02_9_mqtt.ino index 04834fe20..05432e965 100644 --- a/tasmota/xdrv_02_9_mqtt.ino +++ b/tasmota/xdrv_02_9_mqtt.ino @@ -791,6 +791,9 @@ void MqttPublishPrefixTopicRulesProcess_P(uint32_t prefix, const char* subtopic) void MqttPublishTeleSensor(void) { // Publish tele//SENSOR default ResponseData string with optional retained // then process rules +#ifdef USE_INFLUXDB + InfluxDbProcess(1); // Use a copy of ResponseData +#endif MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_RSLT_SENSOR), Settings->flag.mqtt_sensor_retain); // CMND_SENSORRETAIN } diff --git a/tasmota/xdrv_interface.ino b/tasmota/xdrv_interface.ino index cec38d34e..dcf763935 100644 --- a/tasmota/xdrv_interface.ino +++ b/tasmota/xdrv_interface.ino @@ -1093,14 +1093,8 @@ bool XdrvRulesProcess(bool teleperiod, const char* event) { } bool XdrvRulesProcess(bool teleperiod) { -#ifdef USE_INFLUXDB - if (!teleperiod) { // Only process ad-hoc data here - InfluxDbProcess(1); // Use a copy - } -#endif - bool result = XdrvRulesProcess(teleperiod, ResponseData()); - ResponseClear(); // Free heap space + ResponseClear(); // Free heap space return result; }