HA 2024.1.0 - Platform esphome does not generate unique IDs

Hi All,

After HA 2024.1.0 update I see those errors:

2024-01-04 08:56:43.624 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID 2C:F4:32:4B:36:F0-switch-bathroom___safe_mode already exists - ignoring switch.bathroom_safe_mode

2024-01-04 08:56:43.717 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID DC:4F:22:7C:2E:5D-switch-doorbell___safe_mode already exists - ignoring switch.doorbell_safe_mode

2024-01-04 08:56:43.776 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID DC:4F:22:7C:3C:55-switch-diningroom___safe_mode already exists - ignoring switch.diningroom_safe_mode

2024-01-04 08:56:43.826 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID 2C:F4:32:65:40:4D-switch-diningtable___safe_mode already exists - ignoring switch.diningtable_safe_mode

2024-01-04 08:56:43.839 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID 2C:F4:32:65:20:9D-switch-livingroom___safe_mode already exists - ignoring switch.livingroom_safe_mode

2024-01-04 08:56:43.951 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID BC:DD:C2:B3:9E:CE-switch-hallway___safe_mode already exists - ignoring switch.hallway_safe_mode

2024-01-04 08:56:45.412 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID DC:4F:22:7C:35:79-switch-toilet___safe_mode already exists - ignoring switch.toilet_safe_mode

2024-01-04 08:56:57.648 ERROR (MainThread) [homeassistant.components.switch] Platform esphome does not generate unique IDs. ID 48:3F:DA:92:63:19-switch-kitchen___safe_mode already exists - ignoring switch.kitchen_safe_mode

Every time I restart HA I get this error. IS there something I can do about this?

Example of YAML file ESPhome (BELOW this the package YAML content):

#########################################################
# Below all fixed settings for bedroom PCB
#########################################################
substitutions:
  devicename: meek-bedroom
  friendly: Bedroom
  ip: 192.168.100.203
  touch_power: GPIO16 # (D0)
  neopixel: GPIO02 #(D4)
  gpio_touch1: GPIO12 # (D6)
  gpio_relay1: GPIO05 # (D1)

#########################################################
# Everything below can be copy/paste without problem
#########################################################
packages:
  device_base: !include defaults/for_all_devices.yaml

esphome:
  name: ${devicename}
  on_boot:
    priority: 600
    then:
      - switch.turn_on: touch_power

esp8266:
  board: esp01_1m
  restore_from_flash: true

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  reboot_timeout: 0s
  fast_connect: true
  manual_ip:
    static_ip: ${ip}
    gateway: 192.168.100.1
    subnet: 255.255.255.0
    dns1: 192.168.100.1
  ap:
    ssid: ${devicename}
    password: !secret password
    channel: 4

light:
  - platform: neopixelbus
    default_transition_length: 0s
    type: GRB
    variant: 800KBPS
    pin: ${neopixel}
    num_leds: 1
    name: "${friendly} - Neopixel"
    restore_mode: RESTORE_DEFAULT_OFF
    id: neopixel
    effects:
      - strobe:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_scan:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_flicker:
      - pulse:
          name: "Slow Pulse"
          update_interval: 1s
      - addressable_lambda:
          name: "Green Pink"
          update_interval: 100ms
          lambda:
            static int state = 0;

            if (initial_run){
              state = 0;
              it.all() = ESPColor(0,255,0);
            } else {
              it.all() = ESPColor(255, 0, 127);
              if(state==0){
                int i = rand() % it.size();
                it[i] = ESPColor(0,255,0);
                state += 1;
              } else {
                state += 1;
                state = state % 10;
              }
            }
              
switch:
  - platform: gpio
    pin: ${touch_power}
    name: "${friendly} - Touch 1 power"
    icon: mdi:electric-switch
    id: touch_power

  - platform: template
    name: "${friendly} - Light Switch"
    restore_mode: RESTORE_DEFAULT_OFF
    id: switch1
    optimistic: true
    icon: mdi:nintendo-switch

  - platform: template
    name: "${friendly} - Switch longpress"
    restore_mode: RESTORE_DEFAULT_OFF
    id: switch_longpress1
    optimistic: true
    icon: mdi:nintendo-switch

  - platform: gpio
    pin: ${gpio_relay1}
    name: "${friendly} - Relay"
    icon: mdi:electric-switch

binary_sensor:
  - platform: gpio
    pin: ${gpio_touch1}
    name: "${friendly} - Touch"
    icon: mdi:gesture-tap-button
    on_click:
      - min_length: 10ms
        max_length: 500ms
        then:
          - switch.toggle: switch1
      - min_length: 1000ms
        max_length: 2000ms
        then:
          - switch.toggle: switch_longpress1

device_base: !include defaults/for_all_devices.yaml

api:
  encryption:
    key: !secret api_key
  reboot_timeout: 15min

time:
  - platform: homeassistant
    id: homeassistant_time

captive_portal:

web_server:
  port: 80
  
preferences:
  flash_write_interval: 1min
  
logger:
  level: INFO
  
ota:
  safe_mode: true
  password: !secret password

button:
  - platform: factory_reset
    name: "${friendly} - Reset"

switch:
  - platform: safe_mode
    name: "${friendly} - safe mode"
    id: "${friendly}_safe_mode"
    
sensor:
  - platform: wifi_signal
    name: "${friendly} - Wifi Signal"
    update_interval: 5min

  - platform: uptime
    name: "${friendly} - Uptime"
    update_interval: 5min

text_sensor:
  - platform: wifi_info
    ip_address:
      name: "${friendly} - IP"
      icon: mdi:lan
    ssid:
      name: "${friendly} - SSID"
      icon: mdi:lan
    bssid:
      name: "${friendly} - BSSID"
      icon: mdi:lan
    mac_address:
      name: "${friendly} - MAC"
      icon: mdi:lan

  - platform: version
    name: "${friendly} - Version"
    hide_timestamp: true

I also have similar issue. ESPHome and Zigbee both kaputz. I restored back to previous version.

that’s a idea. I stay with new version. Everything is working. Even the entities that listed in the log.

It seems that ESPhome 2023.12.6 is ok. The errors are gone