mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
cleanup publishing
This commit is contained in:
@@ -482,8 +482,6 @@ void EMSESP::publish_all(bool force) {
|
|||||||
publish_device_values(EMSdevice::DeviceType::MIXER);
|
publish_device_values(EMSdevice::DeviceType::MIXER);
|
||||||
publish_device_values(EMSdevice::DeviceType::WATER);
|
publish_device_values(EMSdevice::DeviceType::WATER);
|
||||||
publish_other_values(); // switch and heat pump, ...
|
publish_other_values(); // switch and heat pump, ...
|
||||||
webSchedulerService.publish();
|
|
||||||
webCustomEntityService.publish();
|
|
||||||
publish_sensor_values(true); // includes temperature and analog sensors
|
publish_sensor_values(true); // includes temperature and analog sensors
|
||||||
system_.send_heartbeat();
|
system_.send_heartbeat();
|
||||||
}
|
}
|
||||||
@@ -518,8 +516,6 @@ void EMSESP::publish_all_loop() {
|
|||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
publish_other_values(); // switch and heat pump
|
publish_other_values(); // switch and heat pump
|
||||||
webSchedulerService.publish(true);
|
|
||||||
webCustomEntityService.publish(true);
|
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
publish_sensor_values(true, true);
|
publish_sensor_values(true, true);
|
||||||
@@ -611,6 +607,7 @@ void EMSESP::publish_other_values() {
|
|||||||
// publish_device_values(EMSdevice::DeviceType::GATEWAY);
|
// publish_device_values(EMSdevice::DeviceType::GATEWAY);
|
||||||
// publish_device_values(EMSdevice::DeviceType::CONNECT);
|
// publish_device_values(EMSdevice::DeviceType::CONNECT);
|
||||||
// publish_device_values(EMSdevice::DeviceType::GENERIC);
|
// publish_device_values(EMSdevice::DeviceType::GENERIC);
|
||||||
|
webSchedulerService.publish();
|
||||||
webCustomEntityService.publish();
|
webCustomEntityService.publish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -179,8 +179,6 @@ void Mqtt::loop() {
|
|||||||
if (publish_time_other_ && (currentMillis - last_publish_other_ > publish_time_other_)) {
|
if (publish_time_other_ && (currentMillis - last_publish_other_ > publish_time_other_)) {
|
||||||
last_publish_other_ = (currentMillis / publish_time_other_) * publish_time_other_;
|
last_publish_other_ = (currentMillis / publish_time_other_) * publish_time_other_;
|
||||||
EMSESP::publish_other_values(); // switch and heatpump
|
EMSESP::publish_other_values(); // switch and heatpump
|
||||||
EMSESP::webSchedulerService.publish();
|
|
||||||
EMSESP::webCustomEntityService.publish();
|
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if (publish_time_sensor_ && (currentMillis - last_publish_sensor_ > publish_time_sensor_)) {
|
if (publish_time_sensor_ && (currentMillis - last_publish_sensor_ > publish_time_sensor_)) {
|
||||||
|
|||||||
@@ -153,6 +153,9 @@ bool System::command_publish(const char * value, const int8_t id) {
|
|||||||
} else if (value_s == (F_(mixer))) {
|
} else if (value_s == (F_(mixer))) {
|
||||||
EMSESP::publish_device_values(EMSdevice::DeviceType::MIXER);
|
EMSESP::publish_device_values(EMSdevice::DeviceType::MIXER);
|
||||||
return true;
|
return true;
|
||||||
|
} else if (value_s == (F_(water))) {
|
||||||
|
EMSESP::publish_device_values(EMSdevice::DeviceType::WATER);
|
||||||
|
return true;
|
||||||
} else if (value_s == "other") {
|
} else if (value_s == "other") {
|
||||||
EMSESP::publish_other_values(); // switch and heat pump
|
EMSESP::publish_other_values(); // switch and heat pump
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user