Open jruben4 opened 4 months ago
Has been resolved in issue 15 and new code has been merged into this repo
Trying the new code. Getting error "Couldn't find ID 'temp2'." in sniffer_common.
hey @jruben4 same "temp2" error here. any suggestions?
hey @jruben4 same "temp2" error here. any suggestions?
Yes, I edited sniffer_common.yaml to take out all the temp2 references. Here it is: `esphome: name: $devicename platform: ESP32 board: featheresp32
wifi: ssid: !secret wifi_ssid password: !secret wifi_password
ap: ssid: "${upper_devicename} Hotspot" password: "lost_sniffuh"
captive_portal:
logger:
api: encryption: key: !secret ha_api_key
ota: password: !secret ota_password
color:
font:
binary_sensor:
platform: status name: "${upper_devicename} Node Status" id: system_status
platform: gpio pin: number: GPIO0 inverted: true mode: INPUT_PULLUP name: "${upper_devicename} Button S1" id: button0 on_press: then:
platform: gpio pin: number: GPIO35 inverted: true name: "${upper_devicename} Button S2" id: button1 on_press: then:
switch:
time:
spi: clk_pin: GPIO18 mosi_pin: GPIO19
display:
platform: st7789v model: TTGO TDisplay 135x240 backlight_pin: number: GPIO4 allow_other_uses: true cs_pin: GPIO5 dc_pin: GPIO16 reset_pin: GPIO23 update_interval: 1s rotation: 270 lambda: |- it.rectangle(0, 0, it.get_width(), it.get_height(), id(my_blue)); it.rectangle(0, 19, it.get_width(), it.get_height(), id(my_blue)); // header bar
it.strftime(4, 3, id(sz_13), id(my_yellow), TextAlign::TOP_LEFT, "%Y-%m-%d %H:%M:%S", id(esptime).now());
if (id(system_status).state) { it.print(236, 3, id(sz_13), id(my_green), TextAlign::TOP_RIGHT, "${upper_devicename} Online"); } else { it.print(236, 3, id(sz_13), id(my_red), TextAlign::TOP_RIGHT, "${upper_devicename} Offline"); }
int r = 18;
it.print(4, r, id(sz_24), id(my_gray), TextAlign::TOP_LEFT, "PM2.5:");
auto color = id(my_red); if (id(pm_2_5_aqi).state < 50) color = id(my_green); else if (id(pm_2_5_aqi).state < 100) color = id(my_yellow); it.printf(236, r, id(sz_24), color, TextAlign::TOP_RIGHT, "%0.0f AQI", id(pm_2_5_aqi).state);
r += 21; it.print(4, r, id(sz_20), id(my_gray), TextAlign::TOP_LEFT, "PM:"); it.printf(236, r, id(sz_20), id(my_yellow), TextAlign::TOP_RIGHT, "%0.0f/%0.0f/%0.0f µg/m³", id(pm_1_0).state, id(pm_2_5).state, id(pm_10).state);
r += 25; it.print(120, r, id(sz_24), id(my_gray), TextAlign::TOP_CENTER, "Environment");
r += 23; float temp_f = id(temp).state (9.0/5.0) + 32.0; /float temp2_f = id(temp2).state (9.0/5.0) + 32.0;/ /it.printf(4, r, id(sz_20), id(my_yellow), TextAlign::TOP_LEFT, "%0.1f°F", id(temp).state); / it.printf(4, r, id(sz_20), id(my_yellow), TextAlign::TOP_LEFT, "%0.1f°F", temp_f); /it.printf(125, r, id(sz_24), id(my_yellow), TextAlign::TOP_CENTER, "%0.1f°F", temp2_f);/ it.printf(236, r, id(sz_20), id(my_yellow), TextAlign::TOP_RIGHT, "%0.1f%%", id(humidity).state);
r += 21; it.printf(4, r, id(sz_20), id(my_yellow), TextAlign::TOP_LEFT, "%0.1f hPa", id(pressure).state); it.printf(236, r, id(sz_20), id(my_yellow), TextAlign::TOP_RIGHT, "%0.1f kΩ", id(gas_resistance).state/1000.0);
uart: rx_pin: GPIO27 baud_rate: 9600
i2c: sda: 21 scl: 22 scan: True id: bus_a
sensor:
platform: pmsx003 id: pmsa003 type: PMSX003
pm_1_0: id: pm_1_0 name: "${upper_devicename} PM <1.0 µm" filters:
pm_2_5: id: pm_2_5 name: "${upper_devicename} PM <2.5 µm" filters:
pm_10_0: id: pm_10 name: "${upper_devicename} PM <10.0 µm" filters:
platform: template name: "${upper_devicename} PM <2.5 AQI" unit_of_measurement: "AQI" icon: "mdi:air-filter" accuracy_decimals: 0 id: pm_2_5_aqi
platform: wifi_signal name: "${upper_devicename} WiFi Signal"`
sniffer_common has errors now with the new version of ESPhome due to the new way ESPhome wants you to program shared pins (pins defined in more than one place).