From c061b4c66b38c441b7c011eef81a81a7accef126 Mon Sep 17 00:00:00 2001 From: Neko Date: Thu, 31 Jul 2025 11:37:27 +0200 Subject: [PATCH] added network info screen --- livingroom.yaml | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/livingroom.yaml b/livingroom.yaml index 1f3e6d4..740d47d 100644 --- a/livingroom.yaml +++ b/livingroom.yaml @@ -27,10 +27,14 @@ sensor: pin: A5 id: plant_0_soil_moisture name: "plant_0_soil_moisture" - attenuation: 11db + attenuation: 12db unit_of_measurement: '%' + # the max voltage on the adc will be ~3V from the sensor, which would + # be a dead short on the prongs + # let's say 2V is a good amount of moist, so we compare against that + # x = the measured voltage filters: - - lambda: return x *75; + - lambda: return x/2*100; spi: clk_pin: GPIO36 @@ -58,6 +62,15 @@ display: it.image(160, 75, id(itlab25)); it.printf(3, 3, id(hurmit_regular), "Water level:"); it.printf(50, 35, id(hurmit_regular), "%.1f %%", id(plant_0_soil_moisture).state); + - id: page2 + lambda: |- + it.image(0, 0, id(flowerpot)); + it.image(160, 75, id(itlab25)); + it.printf(3, 3, id(hurmit_small), "Network Information"); + it.printf(3, 35, id(hurmit_small), "SSID: %s", id(info_ssid).state.c_str()); + it.printf(3, 55, id(hurmit_small), "IP: %s", id(info_ip).state.c_str()); + it.printf(3, 75, id(hurmit_small), "MAC:"); + it.printf(3, 95, id(hurmit_small), "%s", id(info_mac).state.c_str()); interval: - interval: 5s @@ -82,9 +95,9 @@ font: - file: "HurmitNerdFont-Regular.otf" id: hurmit_regular size: 28 - #glyphs: [ - # "\u2698", #flower pot - #] + - file: "HurmitNerdFont-Regular.otf" + id: hurmit_small + size: 20 output: - platform: ledc @@ -115,5 +128,18 @@ wifi: ssid: "Itlabs1 Fallback Hotspot" password: "qsri9vnu7Y9n" +# Example configuration entry +text_sensor: + - platform: wifi_info + ip_address: + name: ESP IP Address + id: info_ip + ssid: + name: ESP Connected SSID + id: info_ssid + mac_address: + name: ESP Mac Wifi Address + id: info_mac + captive_portal: \ No newline at end of file