#pragma once #include namespace kvida { // Starts mDNS-based MQTT broker discovery (_mqtt._tcp) and, once found, // connects the MQTT client and publishes Home Assistant MQTT Discovery // for a diagnostic "connectivity" entity. Safe to call multiple times // (no-op if already connecting/connected). No public-facing semantic // publish(topic, value) API yet -- deferred until `profiles` has real // sensor data to publish (see components/transport/README.md). void start_mqtt(); bool mqtt_connected(); // Publishes (retained) Home Assistant MQTT Discovery for a diagnostic // "Chip temperature" sensor on first call, then the reading itself. // Quick end-to-end proof that a real Sensor implementation's data can // reach MQTT/HA -- not the eventual generic publish(topic, value) API. void publish_chip_temperature(float celsius); // Registered by main to receive "set LED color" commands from Home // Assistant (an RGB light entity) without transport depending on // `drivers` directly. using LedColorHandler = void (*)(uint8_t red, uint8_t green, uint8_t blue); void set_led_color_handler(LedColorHandler handler); } // namespace kvida