all sensors work
This commit is contained in:
parent
58e7278835
commit
6a8a25a76b
|
|
@ -79,15 +79,37 @@ sensor:
|
||||||
update_interval: 60s
|
update_interval: 60s
|
||||||
|
|
||||||
- platform: hm3301
|
- platform: hm3301
|
||||||
|
i2c_id: bus_oled
|
||||||
|
update_interval: 30s
|
||||||
pm_1_0:
|
pm_1_0:
|
||||||
name: "PM1.0"
|
name: "PM1.0"
|
||||||
|
id: pm_1_0
|
||||||
pm_2_5:
|
pm_2_5:
|
||||||
name: "PM2.5"
|
name: "PM2.5"
|
||||||
|
id: pm_2_5
|
||||||
pm_10_0:
|
pm_10_0:
|
||||||
name: "PM10.0"
|
name: "PM10"
|
||||||
aqi:
|
id: pm_10_0
|
||||||
name: "AQI"
|
|
||||||
calculation_type: "CAQI"
|
- 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:
|
text_sensor:
|
||||||
- platform: wifi_info
|
- platform: wifi_info
|
||||||
|
|
@ -144,17 +166,7 @@ display:
|
||||||
} else {
|
} else {
|
||||||
it.printf(0, 0, id(f12), "ip: (brak)");
|
it.printf(0, 0, id(f12), "ip: (brak)");
|
||||||
}
|
}
|
||||||
if (id(wifi_rssi).has_state()) {
|
it.printf(0, 10, id(f12), "PM1: %.0f", id(pm_1_0).state);
|
||||||
it.printf(0, 10, id(f12), "RSSI: %.0f dBm", id(wifi_rssi).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);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue