2026-10-13 00:56:32 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "logic/display_controller.h"
|
2026-10-13 01:52:34 +02:00
|
|
|
#include "logic/settings.h"
|
2026-10-13 00:56:32 +02:00
|
|
|
|
2026-10-13 01:05:06 +02:00
|
|
|
// Home Assistant integration over MQTT (with discovery):
|
2026-10-15 01:29:01 +02:00
|
|
|
// FlipDot Display Power switch: off = draw the off image and switch the display off
|
|
|
|
|
// FlipDot Display Mode select: the page shown during the day ("Clock" or a bitmap)
|
|
|
|
|
// FlipDot Display Off image select: left on the dots when the display switches off
|
|
|
|
|
// ("Blank" or a bitmap)
|
|
|
|
|
// FlipDot Display IP sensor: the IP address
|
2026-10-13 01:21:04 +02:00
|
|
|
// FlipDot Display Firmware sensor: version and health, e.g. "2.1.0, ok, 0 crashes, ..."
|
|
|
|
|
// FlipDot Display Recovery button: restart into the recovery app (for 10 minutes)
|
2026-10-13 01:52:34 +02:00
|
|
|
//
|
|
|
|
|
// The broker comes from the settings (web UI); an empty host means BROKER_ADDR, MQTT_USER
|
|
|
|
|
// and MQTT_PASSWORD from secrets.h. Changes need a restart.
|
|
|
|
|
void homeAssistantBegin(DisplayController &controller, const HomeAssistantSettings &settings);
|
2026-10-13 00:56:32 +02:00
|
|
|
void homeAssistantLoop();
|
2026-10-13 01:52:34 +02:00
|
|
|
bool homeAssistantConnected();
|
2026-10-13 01:05:06 +02:00
|
|
|
|
|
|
|
|
// Publish the firmware status (only sent when it changes, and again after a reconnect)
|
|
|
|
|
void homeAssistantSetFirmwareStatus(const char *status);
|