LVGL-Oberfläche mit Heizungs- und Licht-Tab, Steuerung über die Home-Assistant-REST-API, NTP-Uhr und Display-Timeout. Co-Authored-By: Claude Opus 5.5 <[email protected]>
45 lines
1.6 KiB
C
45 lines
1.6 KiB
C
// Copy this file to include/config.h and fill in your values.
|
|
// config.h is listed in .gitignore, so your token stays local.
|
|
#pragma once
|
|
|
|
// ---- WLAN ----
|
|
#define WIFI_SSID "MeinWLAN"
|
|
#define WIFI_PASS "geheim"
|
|
|
|
// ---- Home Assistant ----
|
|
// Without a trailing slash. https works too (the certificate is not checked).
|
|
#define HA_URL "http://homeassistant.local:8123"
|
|
// HA -> Profil -> Sicherheit -> "Langlebige Zugangs-Token" -> Token erstellen
|
|
#define HA_TOKEN "eyJ0eXAiOiJKV1Qi..."
|
|
|
|
// ---- Devices ----
|
|
// Use names without umlauts (ae/oe/ue); the built-in font has no umlauts.
|
|
// Each list needs at least one entry.
|
|
static const ClimateCfg CLIMATES[] = {
|
|
{"climate.wohnzimmer", "Wohnzimmer"},
|
|
{"climate.schlafzimmer", "Schlafzimmer"},
|
|
{"climate.bad", "Bad"},
|
|
};
|
|
|
|
static const LightCfg LIGHTS[] = {
|
|
{"light.wohnzimmer_decke", "Decke"},
|
|
{"light.stehlampe", "Stehlampe"},
|
|
{"switch.lichterkette", "Lichterkette"}, // switch.* works too (on/off only)
|
|
};
|
|
|
|
// ---- Behaviour ----
|
|
#define POLL_STEP_MS 500 // poll one entity every X ms (round robin)
|
|
#define SET_DELAY_MS 1200 // wait this long after the last +/- tap before sending
|
|
#define SCREEN_TIMEOUT_S 60 // backlight off after X s without touch (0 = never)
|
|
#define TIMEZONE "CET-1CEST,M3.5.0,M10.5.0/3"
|
|
|
|
// ---- Display / Touch (only change these if something is off) ----
|
|
#define TFT_INVERT 0 // 1 if the colours look inverted
|
|
#define TOUCH_X_MIN 200
|
|
#define TOUCH_X_MAX 3700
|
|
#define TOUCH_Y_MIN 240
|
|
#define TOUCH_Y_MAX 3800
|
|
#define TOUCH_SWAP_XY 0
|
|
#define TOUCH_INVERT_X 0
|
|
#define TOUCH_INVERT_Y 0
|