check Mqtt::enabled

This commit is contained in:
MichaelDvP
2025-12-21 11:17:31 +01:00
parent f1841347a7
commit 9957bff62b
4 changed files with 4 additions and 4 deletions

View File

@@ -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;
}