added network info screen

This commit is contained in:
Neko 2025-07-31 11:37:27 +02:00
parent ab3128aeb0
commit c061b4c66b

View File

@ -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: