ESPHome 2026.5.0
Loading...
Searching...
No Matches
util.cpp
Go to the documentation of this file.
1#include "esphome/core/util.h"
4#include "esphome/core/log.h"
5
6#ifdef USE_MQTT
8#endif
9
10namespace esphome {
11
13#ifdef USE_MQTT
14 if (mqtt::global_mqtt_client != nullptr) {
16 }
17#endif
18 return false;
19}
20
22
23} // namespace esphome
MQTTClientComponent * global_mqtt_client
bool remote_is_connected()
Return whether the node has any form of "remote" connection via the API or to an MQTT broker.
Definition util.cpp:21
ESPHOME_ALWAYS_INLINE bool api_is_connected()
Return whether the node has at least one client connected to the native API.
Definition util.h:20
bool mqtt_is_connected()
Return whether the node has an active connection to an MQTT broker.
Definition util.cpp:12