From a4ed39f9dca5daaa04a3313eaa56f63c6e16db5b Mon Sep 17 00:00:00 2001 From: ESPHome Device Builder Date: Sun, 18 Oct 2026 15:04:23 +0200 Subject: [PATCH] Edit the-saloon.yaml --- the-saloon.yaml | 87 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 68 insertions(+), 19 deletions(-) diff --git a/the-saloon.yaml b/the-saloon.yaml index 5363143..8d87554 100644 --- a/the-saloon.yaml +++ b/the-saloon.yaml @@ -5,13 +5,6 @@ esphome: name: the-saloon friendly_name: the-saloon -esp32: - variant: ESP32S3 - framework: - type: esp-idf - -logger: - api: encryption: key: "hOwepopyk9l0dnp8M+UBkLfhIIel75DOlYCtwJG8tvI=" @@ -26,6 +19,72 @@ wifi: ssid: the-saloon Fallback Hotspot password: "JrEe6jVLK36I" + +esp32: + board: esp32-s3-devkitc-1 + variant: esp32s3 + flash_size: 16MB + framework: + type: esp-idf + +psram: + mode: octal + speed: 80MHz + +logger: + +# Backlight +output: + - platform: ledc + pin: GPIO38 + frequency: 2000 + id: backlight_output + +light: + - platform: monochromatic + output: backlight_output + name: "LCD Backlight" + restore_mode: ALWAYS_ON + default_transition_length: 0s + +# Display bus (8-bit parallel, declared as an octal "spi") +spi: + type: octal + clk_pin: 8 + data_pins: + - 39 + - 40 + - 41 + - 42 + - number: 45 + ignore_strapping_warning: true + - number: 46 + ignore_strapping_warning: true + - 47 + - 48 + +display: + - platform: mipi_spi + model: t-display-s3 + rotation: 270 + update_interval: 5s + lambda: |- + it.printf(10, 10, id(roboto), "NAS RAM"); + if (id(nas_ram_free).has_state()) { + it.printf(10, 60, id(roboto_big), "%.0f MB", id(nas_ram_free).state); + } else { + it.printf(10, 60, id(roboto), "waiting..."); + } + +font: + - file: "gfonts://Roboto" + id: roboto + size: 24 + - file: "gfonts://Roboto" + id: roboto_big + size: 48 + +# Data from Glances (same as before) http_request: timeout: 5s @@ -33,30 +92,20 @@ sensor: - platform: template id: nas_ram_free name: "NAS RAM libre" - unit_of_measurement: "Mo" + unit_of_measurement: "MB" accuracy_decimals: 0 state_class: measurement - icon: mdi:memory - - - platform: template - id: nas_ram_percent - name: "NAS RAM utilisée" - unit_of_measurement: "%" - accuracy_decimals: 1 - state_class: measurement - icon: mdi:memory interval: - interval: 60s then: - http_request.get: - url: http://192.168.1.50:61208/api/4/mem # <- IP de ton NAS + url: http://192.168.1.50:61208/api/4/mem # your NAS IP capture_response: true on_response: then: - lambda: |- json::parse_json(body, [](JsonObject root) -> bool { id(nas_ram_free).publish_state(root["available"].as() / 1048576.0f); - id(nas_ram_percent).publish_state(root["percent"].as()); return true; }); \ No newline at end of file