ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
util.cpp
Go to the documentation of this file.
1#include "esphome/core/util.h"
2
3// Compiled only on MQTT builds (core FILTER_SOURCE_FILES); without USE_MQTT
4// the header provides inline stubs and this file must stay empty, so the
5// guard protects builds that compile every source, such as clang-tidy.
6#ifdef USE_MQTT
8
9namespace esphome {
10
12
14
15} // namespace esphome
16#endif
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:13
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:11