I had Sen66-Sensor.yml in Esphome connected to HA server using USB. And it was added to HA. And HA was sending data to my LCD.yaml in Esphome over WiFi. Then I wanted to experiment with the same ESP32 with SEN66 to test WiFi instead of USB and added Sen66-air-Sensor.yml. Added to HA it was working OK, reporting data to dashboard (but not to LCD: sensor names were mismatch).
So i removed SE66_air_Sensor and Sen66-Sesor from HA. Modified Se66-Sensor.yml in esphome with WiFI components and uploaded. It works but sensor names are the same as they were with Sen66-air-Sensor.yml.
here is an example: running Se66_Sensor.yml but sensor name is sensor.sen66-air-sensor-sen66-temperature expected: sensor.sen66-sensor-sen66-temperature.
Here is my sen66-sensor.yaml
esphome:
name: sen66-sensor
friendly_name: SEN66 Sensor
esp32:
board: esp32dev
framework:
type: arduino
logger:
api:
encryption:
key: ""
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: SE66 Sensor Fallback Hotspot
password: ""
#######################################
i2c:
sda: GPIO21
scl: GPIO22
scan: true
sensor:
- platform: sen6x
id: my_sen66
type: SEN66
co2:
name: "sen66 co2 level"
id: local_co2
pm_2_5:
name: "sen66 pm25 fine dust"
id: local_pm25
voc:
name: "sen66 voc index"
id: local_voc
nox:
name: "sen66 nox index"
id: local_nox
temperature:
name: "sen66 temperature"
id: local_temp
humidity:
name: "sen66 humidity"
id: local_hum
# the warmup timer
- platform: uptime
id: sen6x_uptime
internal: true
update_interval: 10s
# status scale locally on the ESP32 chip
text_sensor:
- platform: template
name: "sen66 sensor health scale"
id: sen66_diagnostic_scale
lambda: |-
// 1. WARMUP
if (id(sen6x_uptime).state < 60.0) {
return {"Initializing"};
}
// 2. NOT CONNECTED / BUS FAILURE
if (std::isnan(id(local_temp).state)) {
return {"Not Connected"};
}
// 3.SENSOR SUBSYSTEM DIAGNOSTICS
if (std::isnan(id(local_pm25).state)) {
return {"Bad Laser/Fan"};
}
if (std::isnan(id(local_co2).state)) {
return {"Bad CO2 Sensor"};
}
if (std::isnan(id(local_voc).state) || std::isnan(id(local_nox).state)) {
return {"Bad MOX Gas Element"};
}
// 4. ALL ENGINES HEALTHY
return {"Good"};
update_interval: 10s
# USB console
interval:
- interval: 5s
then:
- lambda: |-
std::string current_status = id(sen66_diagnostic_scale).state;
if (current_status == "Good") {
ESP_LOGI("sen66", "Status: %s | CO2: %.0f ppm | PM2.5: %.1f", current_status.c_str(), id(local_co2).state, id(local_pm25).state);
} else {
ESP_LOGE("sen66", "Status Alert: %s", current_status.c_str());
}


