Update czytnik-brama.yaml

This commit is contained in:
2026-02-20 05:01:31 +01:00
parent dacfa8fe11
commit 15400e6ae9

View File

@@ -1,7 +1,8 @@
esphome:
name: terminal-brama
# Punkt 1: Obniżenie taktowania procesora dla oszczędności energii i niższej temperatury
platformio_options:
board_build.f_cpu: 80000000L # Oszczędność energii i niższa temperatura
board_build.f_cpu: 80000000L
esp32:
board: esp32dev
@@ -11,7 +12,7 @@ esphome:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: LIGHT
power_save_mode: LIGHT # Punkt 3: Energooszczędny tryb WiFi
fast_connect: true
api:
@@ -29,8 +30,10 @@ esphome:
globals:
- id: g_imie
type: std::string
restore_value: no
- id: g_nazwisko
type: std::string
restore_value: no
- id: status_karty
type: std::string
initial_value: '"Przyłóż kartę"'
@@ -65,7 +68,7 @@ esphome:
update_interval: 500ms
on_tag:
then:
- display.page.show: strona_glowna
- display.page.show: strona_glowna # Wybudź ekran przy skanowaniu
- homeassistant.tag_scanned: !lambda 'return x;'
switch:
@@ -86,7 +89,7 @@ esphome:
- globals.set: { id: pokazuj_pracownika, value: 'false' }
- lambda: 'id(status_karty) = "Przyłóż kartę";'
- component.update: moj_ekran
- delay: 60s
- delay: 60s # Punkt 2: Czekaj minutę i wygaś ekran
- display.page.show: strona_pusta
display:
@@ -105,7 +108,7 @@ esphome:
it.print(64, 28, id(font_duza), TextAlign::TOP_CENTER, id(g_imie).c_str());
it.print(64, 48, id(font_duza), TextAlign::TOP_CENTER, id(g_nazwisko).c_str());
}
- id: strona_pusta
- id: strona_pusta # Punkt 2: Pusta strona dla oszczędności OLED
lambda: |-
;
@@ -136,7 +139,9 @@ esphome:
- lambda: |-
std::string s = x;
if (s.empty() || s == "Przyłóż kartę") return;
id(moj_ekran)->show_page(id(strona_glowna));
id(moj_ekran)->show_page(id(strona_glowna)); // Wybudź ekran przy nowej wiadomości
if (s == "Brak Uprawnień") {
id(pokazuj_pracownika) = false;
id(status_karty) = "Brak Uprawnień";
@@ -154,4 +159,3 @@ esphome:
}
id(timer_ekranu)->execute();
- component.update: moj_ekran