mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-01-29 01:59:08 +03:00
check Mqtt::enabled
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user