From 9957bff62ba77210730f2f4ba722b26c561cef3e Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sun, 21 Dec 2025 11:17:31 +0100 Subject: [PATCH] check Mqtt::enabled --- src/core/analogsensor.cpp | 2 +- src/core/device_library.h | 2 +- src/web/WebCustomEntityService.cpp | 2 +- src/web/WebSchedulerService.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/analogsensor.cpp b/src/core/analogsensor.cpp index e2e94fb81..7306f2f7d 100644 --- a/src/core/analogsensor.cpp +++ b/src/core/analogsensor.cpp @@ -664,7 +664,7 @@ void AnalogSensor::remove_ha_topic(const int8_t type, const uint8_t gpio) const void AnalogSensor::publish_values(const bool force) { uint8_t num_sensors = sensors_.size(); - if (!Mqtt::connected() || num_sensors == 0) { + if (!Mqtt::enabled() || num_sensors == 0) { return; } diff --git a/src/core/device_library.h b/src/core/device_library.h index d452b569e..343050585 100644 --- a/src/core/device_library.h +++ b/src/core/device_library.h @@ -129,7 +129,7 @@ // Thermostat remote - 0x38 { 3, DeviceType::THERMOSTAT, "RT800, RC220", DeviceFlags::EMS_DEVICE_FLAG_RC100H}, {200, DeviceType::THERMOSTAT, "RC100H, CR10H", DeviceFlags::EMS_DEVICE_FLAG_RC100H}, -{249, DeviceType::THERMOSTAT, "TR120RF, CR20RF", DeviceFlags::EMS_DEVICE_FLAG_RC100H}, +{249, DeviceType::THERMOSTAT, "RC120RF, TR120RF, CR20RF", DeviceFlags::EMS_DEVICE_FLAG_RC100H}, // Solar Modules - 0x30 (for solar), 0x2A, 0x41 (for ww) { 73, DeviceType::SOLAR, "SM10", DeviceFlags::EMS_DEVICE_FLAG_SM10}, diff --git a/src/web/WebCustomEntityService.cpp b/src/web/WebCustomEntityService.cpp index ae76ae18f..62d409c71 100644 --- a/src/web/WebCustomEntityService.cpp +++ b/src/web/WebCustomEntityService.cpp @@ -379,7 +379,7 @@ void WebCustomEntityService::publish_single(CustomEntityItem & entity) { // publish to Mqtt void WebCustomEntityService::publish(const bool force) { - if (!Mqtt::connected() || customEntityItems_->empty()) { + if (!Mqtt::enabled() || customEntityItems_->empty()) { return; } if (force) { diff --git a/src/web/WebSchedulerService.cpp b/src/web/WebSchedulerService.cpp index 777ed9aca..f88a1f8b1 100644 --- a/src/web/WebSchedulerService.cpp +++ b/src/web/WebSchedulerService.cpp @@ -213,7 +213,7 @@ void WebSchedulerService::publish_single(const char * name, const bool state) { // publish to Mqtt void WebSchedulerService::publish(const bool force) { - if (!Mqtt::connected() || scheduleItems_->empty()) { + if (!Mqtt::enabled() || scheduleItems_->empty()) { return; } if (force) {