ESP Home Switch in yaml but not in HA

Hey there, I have just gotten the M5 Stack and used the configuration.yaml from github for the M5 and there is a switch configured which is quiet important because it toggles the Wake Word Listening but its not in HA


esphome:
  name: atomecho
  friendly_name: M5Stack Atom Echo
  name_add_mac_suffix: true
  project:
    name: m5stack.atom-echo-voice-assistant
    version: "1.0"
  min_version: 2023.11.1

esp32:
  board: m5stack-atom
  framework:
    type: esp-idf

logger:
# Enable Home Assistant API
api:
  encryption:
    key: "UnbXxHhNeY/+WdZDb5EwP3GUTQDtXRT4oHVKSubESnY="

ota:
  password: "a661d17a7363f3d57683ea61b83fdba4"

dashboard_import:
  package_import_url: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main

wifi:
  on_connect:
    - delay: 5s # Gives time for improv results to be transmitted
    - ble.disable:
  on_disconnect:
    - ble.enable:
  ap:
    ssid: !secret wifi_ssid
    password: !secret wifi_password

improv_serial:

esp32_improv:
  authorizer: none

button:
  - platform: factory_reset
    id: factory_reset_btn
    name: Factory reset

i2s_audio:
  i2s_lrclk_pin: GPIO33
  i2s_bclk_pin: GPIO19

microphone:
  - platform: i2s_audio
    id: echo_microphone
    i2s_din_pin: GPIO23
    adc_type: external
    pdm: true

speaker:
  - platform: i2s_audio
    id: echo_speaker
    i2s_dout_pin: GPIO22
    dac_type: external
    mode: mono

voice_assistant:
  id: va
  microphone: echo_microphone
  speaker: echo_speaker
  noise_suppression_level: 2
  auto_gain: 31dBFS
  volume_multiplier: 2.0
  vad_threshold: 3
  on_listening:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        effect: "Slow Pulse"
  on_stt_vad_end:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        effect: "Fast Pulse"
  on_tts_start:
    - light.turn_on:
        id: led
        blue: 100%
        red: 0%
        green: 0%
        brightness: 100%
        effect: none
  on_end:
    - delay: 100ms
    - wait_until:
        not:
          speaker.is_playing:
    - script.execute: reset_led
  on_error:
    - light.turn_on:
        id: led
        red: 100%
        green: 0%
        blue: 0%
        brightness: 100%
        effect: none
    - delay: 1s
    - script.execute: reset_led
  on_client_connected:
    - if:
        condition:
          switch.is_on: use_wake_word
        then:
          - voice_assistant.start_continuous:
          - script.execute: reset_led
  on_client_disconnected:
    - if:
        condition:
          switch.is_on: use_wake_word
        then:
          - voice_assistant.stop:
          - light.turn_off: led

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO39
      inverted: true
    name: Button
    disabled_by_default: true
    entity_category: diagnostic
    id: echo_button
    on_multi_click:
      - timing:
          - ON for at least 250ms
          - OFF for at least 50ms
        then:
          - if:
              condition:
                switch.is_off: use_wake_word
              then:
                - if:
                    condition: voice_assistant.is_running
                    then:
                      - voice_assistant.stop:
                      - script.execute: reset_led
                    else:
                      - voice_assistant.start:
              else:
                - voice_assistant.stop
                - delay: 1s
                - script.execute: reset_led
                - script.wait: reset_led
                - voice_assistant.start_continuous:
      - timing:
          - ON for at least 10s
        then:
          - button.press: factory_reset_btn

light:
  - platform: esp32_rmt_led_strip
    id: led
    name: None
    disabled_by_default: true
    entity_category: config
    pin: GPIO27
    default_transition_length: 0s
    chipset: SK6812
    num_leds: 1
    rgb_order: grb
    rmt_channel: 0
    effects:
      - pulse:
          name: "Slow Pulse"
          transition_length: 250ms
          update_interval: 250ms
          min_brightness: 50%
          max_brightness: 100%
      - pulse:
          name: "Fast Pulse"
          transition_length: 100ms
          update_interval: 100ms
          min_brightness: 50%
          max_brightness: 100%

script:
  - id: reset_led
    then:
      - if:
          condition:
            - switch.is_on: use_wake_word
            - switch.is_on: use_listen_light
          then:
            - light.turn_on:
                id: led
                red: 100%
                green: 89%
                blue: 71%
                brightness: 60%
                effect: none
          else:
            - light.turn_off: led

switch:
  - platform: template
    name: Use wake word
    id: use_wake_word
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
    entity_category: config
    on_turn_on:
      - lambda: id(va).set_use_wake_word(true);
      - if:
          condition:
            not:
              - voice_assistant.is_running
          then:
            - voice_assistant.start_continuous
      - script.execute: reset_led
    on_turn_off:
      - voice_assistant.stop
      - lambda: id(va).set_use_wake_word(false);
      - script.execute: reset_led


      
  - platform: template
    name: Use Listen Light
    id: use_listen_light
    optimistic: true
    restore_mode: RESTORE_DEFAULT_ON
    entity_category: config
    on_turn_on:
      - script.execute: reset_led
    on_turn_off:
      - script.execute: reset_led

external_components:
  - source: github://pr#5230
    components:
      - esp_adf
    refresh: 0s

esp_adf:

and here is how it looks like in my HA


Why is that and how do i fix that ?

Has the switch always been in your config?

Try deleting the device from HA and re-adding it.

yes it has always been there.
I tried deleting it and added it again but still no switch sadly

May be time for some esphome logs then.

okay now I updated to the new ESPHome version 2023.12.0 and now its not even connecting to WIFI anymore here are the logs

I (29) boot: compile time 10:00:24
I (29) boot: chip revision: v1.1
I (31) boot.esp32: SPI Speed      : 40MHz
I (36) boot.esp32: SPI Mode       : DIO
I (41) boot.esp32: SPI Flash Size : 4MB
I (45) boot: Enabling RNG early entropy source...
I (51) boot: Partition Table:
I (54) boot: ## Label            Usage          Type ST Offset   Length
I (61) boot:  0 otadata          OTA data         01 00 00009000 00002000
I (69) boot:  1 phy_init         RF data          01 01 0000b000 00001000
I (76) boot:  2 app0             OTA app          00 10 00010000 001c0000
I (84) boot:  3 app1             OTA app          00 11 001d0000 001c0000
I (91) boot:  4 nvs              WiFi data        01 02 00390000 0006d000
I (99) boot: End of partition table
I (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=479e4h (293348) map
I (218) esp_image: segment 1: paddr=00057a0c vaddr=3ffbdb60 size=04d04h ( 19716) load
I (226) esp_image: segment 2: paddr=0005c718 vaddr=40080000 size=03900h ( 14592) load
I (232) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=113f5ch (1130332) map
I (641) esp_image: segment 4: paddr=00173f84 vaddr=40083900 size=1a35ch (107356) load
I (700) boot: Loaded app from partition at offset 0x10000
I (700) boot: Disabling RNG early entropy source...
I (712) cpu_start: Pro cpu up.
I (712) cpu_start: Starting app cpu, entry point is 0x40082a30
I (0) cpu_start: App cpu up.
I (728) cpu_start: Pro cpu start user code
I (728) cpu_start: cpu freq: 160000000
I (728) cpu_start: Application information:
I (733) cpu_start: Project name:     atomecho
I (738) cpu_start: App version:      2023.11.6
I (743) cpu_start: Compile time:     Dec 21 2023 09:59:21
I (749) cpu_start: ELF file SHA256:  1b917a97ac0e9ae5...
I (755) cpu_start: ESP-IDF:          4.4.5
I (760) cpu_start: Min chip rev:     v0.0
I (764) cpu_start: Max chip rev:     v3.99 
I (769) cpu_start: Chip rev:         v1.1
I (774) heap_init: Initializing. RAM available for dynamic allocation:
I (781) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (787) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (793) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (799) heap_init: At 3FFCB6B8 len 00014948 (82 KiB): DRAM
I (806) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (812) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (818) heap_init: At 4009DC5C len 000023A4 (8 KiB): IRAM
I (826) spi_flash: detected chip: gd
I (829) spi_flash: flash io: dio
I (834) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
Y��y���0�0S�
I (29) boot: ESP-IDF 4.4.5 2nd stage bootloader
I (29) boot: compile time 10:00:24
I (29) boot: chip revision: v1.1
I (32) boot.esp32: SPI Speed      : 40MHz
I (36) boot.esp32: SPI Mode       : DIO
I (41) boot.esp32: SPI Flash Size : 4MB
I (45) boot: Enabling RNG early entropy source...
I (51) boot: Partition Table:
I (54) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 otadata          OTA data         01 00 00009000 00002000
I (69) boot:  1 phy_init         RF data          01 01 0000b000 00001000
I (76) boot:  2 app0             OTA app          00 10 00010000 001c0000
I (84) boot:  3 app1             OTA app          00 11 001d0000 001c0000
I (91) boot:  4 nvs              WiFi data        01 02 00390000 0006d000
I (99) boot: End of partition table
I (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=479e4h (293348) map
I (218) esp_image: segment 1: paddr=00057a0c vaddr=3ffbdb60 size=04d04h ( 19716) load
I (226) esp_image: segment 2: paddr=0005c718 vaddr=40080000 size=03900h ( 14592) load
I (232) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=113f5ch (1130332) map
I (641) esp_image: segment 4: paddr=00173f84 vaddr=40083900 size=1a35ch (107356) load
I (700) boot: Loaded app from partition at offset 0x10000
I (700) boot: Disabling RNG early entropy source...
I (712) cpu_start: Pro cpu up.
I (712) cpu_start: Starting app cpu, entry point is 0x40082a30
I (0) cpu_start: App cpu up.
I (728) cpu_start: Pro cpu start user code
I (728) cpu_start: cpu freq: 160000000
I (728) cpu_start: Application information:
I (733) cpu_start: Project name:     atomecho
I (738) cpu_start: App version:      2023.11.6
I (743) cpu_start: Compile time:     Dec 21 2023 09:59:21
I (749) cpu_start: ELF file SHA256:  1b917a97ac0e9ae5...
I (755) cpu_start: ESP-IDF:          4.4.5
I (760) cpu_start: Min chip rev:     v0.0
I (764) cpu_start: Max chip rev:     v3.99 
I (769) cpu_start: Chip rev:         v1.1
I (774) heap_init: Initializing. RAM available for dynamic allocation:
I (781) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (787) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (793) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (800) heap_init: At 3FFCB6B8 len 00014948 (82 KiB): DRAM
I (806) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (812) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (818) heap_init: At 4009DC5C len 000023A4 (8 KiB): IRAM
I (826) spi_flash: detected chip: gd
I (829) spi_flash: flash io: dio
I (835) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
[I][logger:326]: Log initialized
[C][ota:473]: There have been 3 suspected unsuccessful boot attempts.
[D][esp32.preferences:114]: Saving 1 preferences to flash...
[V][esp32.preferences:126]: sync: key: 233825507, len: 4
[D][esp32.preferences:143]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[I][app:029]: Running through setup()...
[V][app:030]: Sorting components by setup priority...
[C][esp32_rmt_led_strip:019]: Setting up ESP32 LED Strip...
[V][esp-idf:000]: I (256) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 

[D][binary_sensor:034]: 'Button': Sending initial state OFF
[C][light:035]: Setting up light 'M5Stack Atom Echo 1012d8'...
[D][light:036]: 'M5Stack Atom Echo 1012d8' Setting:
[D][light:041]:   Color mode: RGB
[D][template.switch:046]:   Restored state ON
[D][switch:012]: 'Use wake word' Turning ON.
[D][switch:055]: 'Use wake word': Sending state ON
[E][voice_assistant:468]: No API client connected
[D][voice_assistant:422]: State changed from IDLE to IDLE
[D][voice_assistant:428]: Desired state set to IDLE
[D][light:036]: 'M5Stack Atom Echo 1012d8' Setting:
[D][template.switch:046]:   Restored state ON
[D][switch:012]: 'Use Listen Light' Turning ON.
[D][switch:055]: 'Use Listen Light': Sending state ON
[D][light:036]: 'M5Stack Atom Echo 1012d8' Setting:
[D][light:047]:   State: ON
[D][light:051]:   Brightness: 60%
[D][light:059]:   Red: 100%, Green: 89%, Blue: 71%
[C][i2s_audio:024]: Setting up I2S Audio...
[C][i2s_audio.microphone:018]: Setting up I2S Audio Microphone...
[C][esp32_ble:027]: Setting up BLE...
[C][wifi:038]: Setting up WiFi...
[V][esp-idf:000]: I (382) wifi:
[V][esp-idf:000]: wifi driver task: 3ffd64d4, prio:23, stack:6656, core=0
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1615) system_api: Base MAC address is not set

[V][esp-idf:000]: I (1625) system_api: read default base MAC address from EFUSE

[V][esp-idf:000]: I (1638) wifi:
[V][esp-idf:000]: wifi firmware version: 0f80fa0
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1645) wifi:
[V][esp-idf:000]: wifi certification version: v7.0
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1666) wifi:
[V][esp-idf:000]: config NVS flash: enabled
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1666) wifi:
[V][esp-idf:000]: config nano formating: disabled
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1677) wifi:
[V][esp-idf:000]: Init data frame dynamic rx buffer num: 32
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1696) wifi:
[V][esp-idf:000]: Init management frame dynamic rx buffer num: 32
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1707) wifi:
[V][esp-idf:000]: Init management short buffer num: 32
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1717) wifi:
[V][esp-idf:000]: Init dynamic tx buffer num: 32
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1738) wifi:
[V][esp-idf:000]: Init static rx buffer size: 1600
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1748) wifi:
[V][esp-idf:000]: Init static rx buffer num: 10
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1758) wifi:
[V][esp-idf:000]: Init dynamic rx buffer num: 32
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1769) wifi_init: rx ba win: 6

[V][esp-idf:000]: I (1770) wifi_init: tcpip mbox: 32

[V][esp-idf:000]: I (1779) wifi_init: udp mbox: 6

[V][esp-idf:000]: I (1779) wifi_init: tcp mbox: 6

[V][esp-idf:000]: I (1789) wifi_init: tcp tx win: 5744

[V][esp-idf:000]: I (1799) wifi_init: tcp rx win: 5744

[V][esp-idf:000]: I (1799) wifi_init: tcp mss: 1440

[V][esp-idf:000]: I (1809) wifi_init: WiFi IRAM OP enabled

[V][esp-idf:000]: I (1819) wifi_init: WiFi RX IRAM OP enabled

[C][wifi:051]: Starting WiFi...
[C][wifi:052]:   Local MAC: E8:6B:EA:10:12:D8
[V][esp32.preferences:059]: nvs_get_blob('88491487'): ESP_ERR_NVS_NOT_FOUND - the key might not be set yet
[V][wifi_esp32:213]: Enabling AP.
[V][esp-idf:000]: I (1841) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07

[V][esp-idf:000]: I (1948) wifi:
[V][esp-idf:000]: mode : softAP (e8:6b:ea:10:12:d9)
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1950) wifi:
[V][esp-idf:000]: Total power save buffer number: 16
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1952) wifi:
[V][esp-idf:000]: Init max length of beacon: 752/752
[V][esp-idf:000]: 

[V][esp-idf:000]: I (1963) wifi:
[V][esp-idf:000]: Init max length of beacon: 752/752
[V][esp-idf:000]: 

[C][wifi:239]: Setting up AP...
[C][wifi:241]:   AP SSID: 'i45a'
[C][wifi:242]:   AP Password: '100170416810'
[V][esp-idf:000]: I (2742) wifi:
[V][esp-idf:000]: Total power save buffer number: 16
[V][esp-idf:000]: 

[V][wifi_esp32:804]: DHCP server IP lease start: 192.168.4.100
[V][wifi_esp32:807]: DHCP server IP lease end: 192.168.4.200
[C][wifi:251]:   IP Address: 192.168.4.1
[V][wifi_esp32:208]: Enabling STA.
[V][esp-idf:000]: I (2748) wifi:
[V][esp-idf:000]: mode : sta (e8:6b:ea:10:12:d8) + softAP (e8:6b:ea:10:12:d9)
[V][esp-idf:000]: 

[V][esp-idf:000]: I (2767) wifi:
[V][esp-idf:000]: enable tsf
[V][esp-idf:000]: 

[D][esp32_improv.component:240]: Setting Improv to start
[C][ota:097]: Over-The-Air Updates:
[C][ota:098]:   Address: atomecho.local:3232
[C][ota:101]:   Using Password.
[W][ota:107]: Last Boot was an unhandled reset, will proceed to safe mode in 7 restarts
[C][api:025]: Setting up Home Assistant API server...
[D][wifi:441]: Starting scan...
[C][voice_assistant:028]: Setting up Voice Assistant...
[C][i2s_audio.speaker:019]: Setting up I2S Audio Speaker...
[I][app:062]: setup() finished successfully!
[D][esp32.preferences:114]: Saving 2 preferences to flash...
[V][esp32.preferences:137]: NVS data not changed skipping 4088855305  len=1
[V][esp32.preferences:137]: NVS data not changed skipping 347086140  len=1
[D][esp32.preferences:143]: Saving 2 preferences to flash: 2 cached, 0 written, 0 failed
[D][esp32_ble:270]: Enabling BLE...
[V][esp-idf:000]: I (2858) BTDM_INIT: BT controller compile version [97e0759]

[W][component:214]: Component esp32_ble took a long time for an operation (0.52 s).
[W][component:215]: Components should block for at most 20-30ms.
[V][wifi_esp32:702]: Event: WiFi AP start
[V][wifi_esp32:706]: Event: WiFi AP stop
[V][wifi_esp32:702]: Event: WiFi AP start
[V][wifi_esp32:596]: Event: WiFi STA start
[V][esp-idf:000]: I (3384) wifi:
[V][esp-idf:000]: Set ps type: 1

[V][esp-idf:000]: 

[I][app:102]: ESPHome version 2023.11.6 compiled on Dec 21 2023, 09:59:21
[I][app:104]: Project m5stack.atom-echo-voice-assistant version 1.0
[C][logger:416]: Logger:
[C][logger:417]:   Level: VERBOSE
[C][logger:418]:   Log Baud Rate: 115200
[C][logger:420]:   Hardware UART: UART0
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 0
[V][esp32_ble_server:119]: Creating BLE service - 0x180A
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 7
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 0x2A24
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 0x2A26
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 0x2A29
[C][esp32_rmt_led_strip:171]: ESP32 RMT LED Strip:
[C][esp32_rmt_led_strip:172]:   Pin: 27
[C][esp32_rmt_led_strip:173]:   Channel: 0
[C][esp32_rmt_led_strip:198]:   RGB Order: GRB
[C][esp32_rmt_led_strip:199]:   Max refresh rate: 0
[C][esp32_rmt_led_strip:200]:   Number of LEDs: 1
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 12
[D][esp32_ble_server:077]: BLE server setup successfully
[D][esp32_improv.component:077]: Creating Improv service
[V][esp32_ble_server:119]: Creating BLE service - 00467768-6228-2272-4663-277478268000
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 7
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 00467768-6228-2272-4663-277478268001
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble_server.descriptor:029]: Creating descriptor - 0x2902
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 10
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 00467768-6228-2272-4663-277478268002
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble_server.descriptor:029]: Creating descriptor - 0x2902
[C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Button'
[C][gpio.binary_sensor:016]:   Pin: GPIO39
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 10
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 00467768-6228-2272-4663-277478268003
[C][light:103]: Light 'M5Stack Atom Echo 1012d8'
[C][light:105]:   Default Transition Length: 0.0s
[C][light:106]:   Gamma Correct: 2.80
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble_server.descriptor:029]: Creating descriptor - 0x2902
[C][template.switch:068]: Template Switch 'Use wake word'
[C][template.switch:091]:   Restore Mode: restore defaults to ON
[C][template.switch:057]:   Optimistic: YES
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 10
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 00467768-6228-2272-4663-277478268004
[C][template.switch:068]: Template Switch 'Use Listen Light'
[C][template.switch:091]:   Restore Mode: restore defaults to ON
[C][template.switch:057]:   Optimistic: YES
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble_server.descriptor:029]: Creating descriptor - 0x2902
[C][factory_reset.button:011]: Factory Reset Button 'Factory reset'
[C][factory_reset.button:011]:   Icon: 'mdi:restart-alert'
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 10
[V][esp32_ble_server.characteristic:118]: Creating characteristic - 00467768-6228-2272-4663-277478268005
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 9
[V][esp32_ble_server.descriptor:029]: Creating descriptor - 0x2902
[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 10
[V][esp-idf:000]: W (3784) BT_BTM: BTM_BleWriteScanRsp, Partial data write into ADV

[V][esp32_ble:328]: (BLE) gatts_event [esp_gatt_if: 3] - 12
[V][esp32_improv.component:190]: Setting state: 1
[D][esp32_improv.component:097]: Service started!
[V][esp-idf:000]: W (3800) BT_BTM: BTM_BleWriteScanRsp, Partial data write into ADV

[V][esp32_improv.component:190]: Setting state: 2
[V][esp-idf:000]: W (3822) BT_BTM: BTM_BleWriteScanRsp, Partial data write into ADV

[C][esp32_ble:374]: ESP32 BLE:
[C][esp32_ble:376]:   MAC address: E8:6B:EA:10:12:DA
[C][esp32_ble:377]:   IO Capability: none
[V][esp-idf:000]: W (3835) BT_BTM: BTM_BleWriteScanRsp, Partial data write into ADV

[C][esp32_ble_server:200]: ESP32 BLE Server:
[C][esp32_improv.component:257]: ESP32 Improv:
[C][wifi:559]: WiFi:
[V][esp-idf:000]: W (3880) wifi:
[V][esp-idf:000]: Haven't to connect to a suitable AP now!
[V][esp-idf:000]: 

[W][wifi_esp32:873]: esp_wifi_sta_get_ap_info failed: ESP_ERR_WIFI_NOT_CONNECT
[C][wifi:391]:   Local MAC: E8:6B:EA:10:12:D8
[V][esp-idf:000]: W (3883) wifi:
[V][esp-idf:000]: Haven't to connect to a suitable AP now!
[V][esp-idf:000]: 

[W][wifi_esp32:883]: esp_wifi_sta_get_ap_info failed: ESP_ERR_WIFI_NOT_CONNECT
[C][wifi:396]:   SSID: ''[redacted]
[C][wifi:397]:   IP Address: 0.0.0.0
[C][wifi:399]:   BSSID: 00:00:00:00:00:00[redacted]
[C][wifi:400]:   Hostname: 'atomecho-1012d8'
[V][esp-idf:000]: W (3923) wifi:
[V][esp-idf:000]: Haven't to connect to a suitable AP now!
[V][esp-idf:000]: 

[W][wifi_esp32:894]: esp_wifi_sta_get_ap_info failed: ESP_ERR_WIFI_NOT_CONNECT
[C][wifi:402]:   Signal strength: 0 dB ▂▄▆█
[C][wifi:406]:   Channel: 7
[C][wifi:407]:   Subnet: 255.255.255.0
[C][wifi:408]:   Gateway: 192.168.4.1
[C][wifi:409]:   DNS1: 0.0.0.0
[C][wifi:410]:   DNS2: 0.0.0.0
[C][mdns:115]: mDNS:
[C][mdns:116]:   Hostname: atomecho-1012d8
[V][mdns:117]:   Services:
[V][mdns:119]:   - _esphomelib, _tcp, 6053
[V][mdns:121]:     TXT: friendly_name = M5Stack Atom Echo 1012d8
[V][mdns:121]:     TXT: version = 2023.11.6
[V][mdns:121]:     TXT: mac = e86bea1012d8
[V][mdns:121]:     TXT: platform = ESP32
[V][mdns:121]:     TXT: board = m5stack-atom
[V][mdns:121]:     TXT: network = wifi
[V][mdns:121]:     TXT: api_encryption = Noise_NNpsk0_25519_ChaChaPoly_SHA256
[V][mdns:121]:     TXT: project_name = m5stack.atom-echo-voice-assistant
[V][mdns:121]:     TXT: project_version = 1.0
[V][mdns:121]:     TXT: package_import_url = github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
[C][ota:097]: Over-The-Air Updates:
[C][ota:098]:   Address: atomecho.local:3232
[C][ota:101]:   Using Password.
[W][ota:107]: Last Boot was an unhandled reset, will proceed to safe mode in 7 restarts
[C][api:139]: API Server:
[C][api:140]:   Address: atomecho.local:6053
[C][api:142]:   Using noise encryption: YES
[C][improv_serial:032]: Improv Serial:
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:6608
load:0x40078000,len:15060
ho 0 tail 12 room 4
load:0x40080400,len:3816
entry 0x40080698
I (29) boot: ESP-IDF 4.4.5 2nd stage bootloader
I (29) boot: compile time 10:00:24
I (29) boot: chip revision: v1.1
I (32) boot.esp32: SPI Speed      : 40MHz
I (36) boot.esp32: SPI Mode       : DIO
I (41) boot.esp32: SPI Flash Size : 4MB
I (45) boot: Enabling RNG early entropy source...
I (51) boot: Partition Table:
I (54) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 otadata          OTA data         01 00 00009000 00002000
I (69) boot:  1 phy_init         RF data          01 01 0000b000 00001000
I (77) boot:  2 app0             OTA app          00 10 00010000 001c0000
I (84) boot:  3 app1             OTA app          00 11 001d0000 001c0000
I (92) boot:  4 nvs              WiFi data        01 02 00390000 0006d000
I (99) boot: End of partition table
I (103) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=479e4h (293348) map
I (218) esp_image: segment 1: paddr=00057a0c vaddr=3ffbdb60 size=04d04h ( 19716) load
I (226) esp_image: segment 2: paddr=0005c718 vaddr=40080000 size=03900h ( 14592) load
I (232) esp_image: segment 3: paddr=00060020 vaddr=400d0020 size=113f5ch (1130332) map
I (641) esp_image: segment 4: paddr=00173f84 vaddr=40083900 size=1a35ch (107356) load
I (700) boot: Loaded app from partition at offset 0x10000
I (700) boot: Disabling RNG early entropy source...
I (712) cpu_start: Pro cpu up.
I (712) cpu_start: Starting app cpu, entry point is 0x40082a30
I (0) cpu_start: App cpu up.
I (728) cpu_start: Pro cpu start user code
I (728) cpu_start: cpu freq: 160000000
I (728) cpu_start: Application information:
I (733) cpu_start: Project name:     atomecho
I (738) cpu_start: App version:      2023.11.6
I (743) cpu_start: Compile time:     Dec 21 2023 09:59:21
I (749) cpu_start: ELF file SHA256:  1b917a97ac0e9ae5...
I (755) cpu_start: ESP-IDF:          4.4.5
I (760) cpu_start: Min chip rev:     v0.0
I (765) cpu_start: Max chip rev:     v3.99 
I (769) cpu_start: Chip rev:         v1.1
I (774) heap_init: Initializing. RAM available for dynamic allocation:
I (781) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (787) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (793) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (800) heap_init: At 3FFCB6B8 len 00014948 (82 KiB): DRAM
I (806) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (812) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (819) heap_init: At 4009DC5C len 000023A4 (8 KiB): IRAM
I (826) spi_flash: detected chip: gd
I (829) spi_flash: flash io: dio
I (835) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.

how does that go with:

just curious :wink:

btw I just updated to see if the switch go dichted or borked but its still there:

the update did kill my existing free memory and wifi uptime sensors, and created new ones… hmm

Well I got it but the switch has been there from the start but never in HA, could you share your configuration yaml?

substitutions:
  name: m5stack-atom-echo-a82d10
  friendly_name: M5Stack Atom Echo a82d10
packages:
  m5stack.atom-echo-voice-assistant: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: <encryption key>

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

sensor:
  - platform: uptime
    name: ${name} wifi uptime
  - platform: template
    name: ${name} Free Memory
    lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
    unit_of_measurement: B
    state_class: measurement

now realizing there might be a need for unique_id on those sensor entities? never did that before, still rather newish to ESPHme myself.
lets find some other examples out there

With your configuration it finally works thanks allot, even though I dont have the buttons for controlling the volume anymore which doesnt really matter to me