Public Access
Add scrolling, countdown, stopwatch, images, seconds, multiplier and degree sign
- Text elements can scroll in a window at a set speed; clock, countdown and stopwatch can show seconds. Moving pages are sent as instant frames (new Nano command D1) and paced by the estimated flip time. - Countdown to a date and time (smart, days, days + time, with seconds), stopwatch (web UI, HA switch and reset button), image element (fixed or by Home Assistant state), multiplier for HA values, degree sign (char 127) in all fonts and the font converter. - Page format version 2; version 1 pages are converted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca8d78ea8a
commit
fc6fa1a180
38 files changed
+1370
-277
No files matched your search
@@ -12,6 +12,7 @@
|
||||
#include "config.h"
|
||||
#include "credentials.h"
|
||||
#include "display/bitmap_store.h"
|
||||
#include "display/page_resources.h"
|
||||
#include "display/page_store.h"
|
||||
#include "net/ha_page_select.h"
|
||||
#include "system/boot_target.h"
|
||||
@@ -27,6 +28,8 @@ static HAPageSelect offSelect("FlipDotDisplayOffImage");
|
||||
static HASensor firmwareSensor("FlipDotDisplayFirmware");
|
||||
static HASensor ipSensor("FlipDotDisplayIP");
|
||||
static HAButton recoveryButton("FlipDotDisplayRecovery");
|
||||
static HASwitch stopwatchSwitch("FlipDotDisplayStopwatch");
|
||||
static HAButton stopwatchReset("FlipDotDisplayStopwatchReset");
|
||||
|
||||
// Removed entities: their retained discovery config is cleared, so Home Assistant
|
||||
// deletes them instead of showing them as unavailable
|
||||
@@ -215,6 +218,17 @@ void homeAssistantBegin(DisplayController &controller, const HomeAssistantSettin
|
||||
offSelect.onCommand([](const char *option) { offImage.command(option); });
|
||||
offImage.update();
|
||||
|
||||
stopwatchSwitch.setName("FlipDot Display Stopwatch");
|
||||
stopwatchSwitch.setIcon("mdi:timer-outline");
|
||||
stopwatchSwitch.setCurrentState(stopwatch.running());
|
||||
stopwatchSwitch.onCommand([](bool state, HASwitch *sender) {
|
||||
appStopwatch(state ? StopwatchAction::Start : StopwatchAction::Stop);
|
||||
sender->setState(stopwatch.running());
|
||||
});
|
||||
stopwatchReset.setName("FlipDot Display Stopwatch reset");
|
||||
stopwatchReset.setIcon("mdi:timer-refresh-outline");
|
||||
stopwatchReset.onCommand([](HAButton *) { appStopwatch(StopwatchAction::Reset); });
|
||||
|
||||
recoveryButton.setName("FlipDot Display Recovery");
|
||||
recoveryButton.setIcon("mdi:lifebuoy");
|
||||
recoveryButton.onCommand([](HAButton *) { rebootToRecovery(RecoveryReason::Manual); });
|
||||
@@ -260,6 +274,9 @@ void homeAssistantLoop()
|
||||
firmware.loop();
|
||||
mode.update();
|
||||
offImage.update();
|
||||
// Started or stopped in the web UI
|
||||
if (stopwatchSwitch.getCurrentState() != stopwatch.running())
|
||||
stopwatchSwitch.setState(stopwatch.running());
|
||||
}
|
||||
|
||||
void homeAssistantSetFirmwareStatus(const char *status)
|
||||
|
||||
Reference in new issue
Block a user