From 6a8a25a76b988771a7ad85dd820c33fdd68b174e Mon Sep 17 00:00:00 2001 From: oskar Date: Mon, 27 Oct 2025 21:40:42 +0100 Subject: [PATCH] all sensors work --- esp32-c3-oled/i2ctest.yaml | 46 ++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/esp32-c3-oled/i2ctest.yaml b/esp32-c3-oled/i2ctest.yaml index 115343d..049819c 100644 --- a/esp32-c3-oled/i2ctest.yaml +++ b/esp32-c3-oled/i2ctest.yaml @@ -79,15 +79,37 @@ sensor: update_interval: 60s - platform: hm3301 + i2c_id: bus_oled + update_interval: 30s pm_1_0: name: "PM1.0" + id: pm_1_0 pm_2_5: name: "PM2.5" + id: pm_2_5 pm_10_0: - name: "PM10.0" - aqi: - name: "AQI" - calculation_type: "CAQI" + name: "PM10" + id: pm_10_0 + + - platform: dht + pin: GPIO10 + model: DHT11 + temperature: + name: "Temperatura" + humidity: + name: "Wilgotność" + update_interval: 30s + + - platform: bmp3xx_i2c + i2c_id: bus_oled + address: 0x77 # jeśli skan pokaże 0x76, zmień tutaj + temperature: + name: "Temperatura BMP388" + oversampling: 16x + pressure: + name: "Ciśnienie BMP388" + oversampling: 16x + update_interval: 30s text_sensor: - platform: wifi_info @@ -144,17 +166,7 @@ display: } else { it.printf(0, 0, id(f12), "ip: (brak)"); } - if (id(wifi_rssi).has_state()) { - it.printf(0, 10, id(f12), "RSSI: %.0f dBm", id(wifi_rssi).state); - } - if (id(wifi_ssid).has_state()) { - it.printf(0, 20, id(f12), "SSID: %s", id(wifi_ssid).state.c_str()); - } - if (id(uptime_s).has_state()) { - int t = (int) id(uptime_s).state; - int h = t / 3600; - int m = (t % 3600) / 60; - int s = t % 60; - it.printf(0, 30, id(f12), "Uptime: %02d:%02d:%02d", h, m, s); - } + it.printf(0, 10, id(f12), "PM1: %.0f", id(pm_1_0).state); + it.printf(0, 20, id(f12), "PM2.5:%.0f", id(pm_2_5).state); + it.printf(0, 30, id(f12), "PM10: %.0f", id(pm_10_0).state); }