Common macros and definitions used across the HAMQTT library.
Base struct representing a generic Home Assistant MQTT component.
Definition hamqtt_component_internal.h:68
esp_err_t hamqtt_component_get_discovery_config(HAMQTT_Component *component, cJSON *root, const char *device_uid)
Populates the Home Assistant discovery configuration for the component.
void hamqtt_component_handle_mqtt_message(HAMQTT_Component *component, const char *topic, const char *data)
Dispatches an incoming MQTT message to the specified component.
const char * hamqtt_component_get_unique_id(HAMQTT_Component *component)
Returns the unique ID of the component.
const char *const * hamqtt_component_get_subscribed_topics(HAMQTT_Component *component, size_t *count)
Returns the list of topics the component wants to subscribe to.
void hamqtt_component_update(HAMQTT_Component *component, esp_mqtt_client_handle_t client)
Performs a periodic update for the component.