New wemos min setup

HI,

I am trying to setup a wemos mini v3 with esphome and create a sensor. I have am able to install the firmware via python, but after it is installed and I try to connect to the device via an http the device is not connected. What can I be doing wrong, am I selecting the wrong device? Below is the config i used and what the logs show.

esphome:
  name: testdevice

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:


ota:


wifi:
  ssid: "devices"
  password: "8xxxxxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Testdevice Fallback Hotspot"
    password: "bxxxxxxx"

captive_portal:

#GPIO00 = D3
#GPIO01 = XX
#GPIO02 = D4
#GPIO04 = D2
#GPIO05 = D1
#GPIO12 = D6
#GPIO13 = D7
#GPIO14 = D5
#GPIO16 = D0
#-----------------------------

#binary_sensor:
#  - platform: gpio
#    name: "Test open-close sensor"
#    pin:
#      number: 04 #GPIO04 = D2
#      inverted: true
#      mode:
#        input: true
#        pullup: true

switch:
  - platform: gpio
    name: "test on-off switch"
    pin:
       number: 0 #GPIO00 = D3

This is the output from logging

Hard resetting via RTS pin...
←[32mINFO Successfully uploaded program.←[0m
←[32mINFO Starting log output from COM3 with baud rate 115200←[0m
[09:49:13];d l\x9c\x9f| \x8cl\xe0|♥♀♀♦\xc4♦l\xe4♦#<\xc7\xc3♥\xe4‼\xdb;\x9bc\x8c♦#\x84\xf3on\xdfdgo\x9c\xe2\xec♀c∟p\x84\x87d{lr$x\xfb'\xe0↑♥♦♦\x83♀$♦\x84\x9c♦♦♦c♀n\xe3|♥\xec♦\xc7\xc7♀c\xc4\xf3go\xe7 d\x8c\x87$ ♥\x90↕←''♀\x87d☼♥g{\xc7ۛ'♀♦{{\x93`♥x\xfbg\xe0↑♥♦♦rĜܜ∟\xc0\xc4♥♦c♦'\xe2|☻♦\x8e♦c\xc4\xfb'g\xe7 ♦\xc7l`♥\x98←‼go♦\xc7$♥';\xc7\xdb\xdb'♦♀;←d`♥;\x9b\x93g♦♦{‼l`♥\x9c♥♀♦\xc4\xc78←♥♦$ ♥\xfc\xc3n\xdc♫l[I][logger:258]: Log initialized
[09:49:13][C][ota:469]: There have been 1 suspected unsuccessful boot attempts.
[09:49:13][I][app:029]: Running through setup()...
[09:49:13][C][wifi:037]: Setting up WiFi...
[09:49:13][C][wifi:038]:   Local MAC: 84:F3:EB:25:74:95
[09:49:13][D][wifi:386]: Starting scan...
[09:49:19][D][wifi:401]: Found networks:
[09:49:19][I][wifi:444]: - 'devices' (76:AC:B9:A4:3D:ED) ▂▄▆█
[09:49:19][D][wifi:446]:     Channel: 11
[09:49:19][D][wifi:447]:     RSSI: -30 dB
[09:49:19][I][wifi:444]: - 'devices' (76:AC:B9:A4:3D:E5) ▂▄▆█
[09:49:19][D][wifi:446]:     Channel: 6
[09:49:19][D][wifi:447]:     RSSI: -70 dB
[09:49:19][D][wifi:449]: - 'AZ-Guest' (74:AC:B9:A4:3D:ED) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (76:AC:B9:B4:3D:ED) ▂▄▆█
[09:49:19][D][wifi:449]: - 'HomeUseOnly' (76:AC:B9:94:3D:ED) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (DC:EB:69:D3:1B:D0) ▂▄▆█
[09:49:19][D][wifi:449]: - 'myrtlek58' (DC:EB:69:D3:1B:CD) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (DC:EB:69:D3:1B:CE) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (DC:EB:69:D3:1B:D2) ▂▄▆█
[09:49:19][D][wifi:449]: - 'AZ-Guest' (74:AC:B9:A4:3D:E5) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (76:AC:B9:B4:3D:E5) ▂▄▆█
[09:49:19][D][wifi:449]: - 'HomeUseOnly' (76:AC:B9:94:3D:E5) ▂▄▆█
[09:49:19][D][wifi:449]: - 'Quang' (80:D0:4A:EC:DF:DF) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (80:D0:4A:EC:DF:E2) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (80:D0:4A:EC:DF:E0) ▂▄▆█
[09:49:19][D][wifi:449]: - '' (80:D0:4A:EC:DF:E4) ▂▄▆█
[09:49:19][D][wifi:449]: - 'TP-Link_4D2E' (40:3F:8C:CC:4D:2D) ▂▄▆█
[09:49:19][D][wifi:449]: - 'Tracking IP' (14:91:82:6B:76:2D) ▂▄▆█
[09:49:19][I][wifi:257]: WiFi Connecting to 'devices'...
[09:49:31][W][wifi_esp8266:482]: Event: Disconnected ssid='devices' bssid=76:AC:B9:A4:3D:ED reason='Handshake Failed'
[09:49:31][W][wifi:549]: Error while connecting to network.
[09:49:31][W][wifi:585]: Restarting WiFi adapter...
[09:49:31][I][wifi:257]: WiFi Connecting to 'devices'...
[09:49:32][I][wifi:518]: WiFi Connected!
[09:49:32][C][wifi:362]:   Local MAC: 84:F3:EB:25:74:95
[09:49:32][C][wifi:363]:   SSID: 'devices'
[09:49:32][C][wifi:364]:   IP Address: 10.29.129.24
[09:49:32][C][wifi:365]:   BSSID: 76:AC:B9:A4:3D:ED
[09:49:32][C][wifi:367]:   Hostname: 'testdevice'
[09:49:32][C][wifi:369]:   Signal strength: -43 dB ▂▄▆█
[09:49:32][C][wifi:373]:   Channel: 11
[09:49:32][C][wifi:374]:   Subnet: 255.255.255.0
[09:49:32][C][wifi:375]:   Gateway: 10.29.129.1
[09:49:32][C][wifi:376]:   DNS1: 10.29.10.8
[09:49:32][C][wifi:377]:   DNS2: 10.29.10.3
[09:49:32][D][wifi:527]: Disabling AP...
[09:49:32][C][ota:093]: Over-The-Air Updates:
[09:49:32][C][ota:094]:   Address: testdevice.local:8266
[09:49:32][C][api:025]: Setting up Home Assistant API server...
[09:49:32][I][app:062]: setup() finished successfully!
[09:49:32][I][app:102]: ESPHome version 2022.11.1 compiled on Nov 20 2022, 09:48:55
[09:49:32][C][wifi:504]: WiFi:
[09:49:32][C][wifi:362]:   Local MAC: 84:F3:EB:25:74:95
[09:49:32][C][wifi:363]:   SSID: 'devices'
[09:49:32][C][wifi:364]:   IP Address: 10.29.129.24
[09:49:32][C][wifi:365]:   BSSID: 76:AC:B9:A4:3D:ED
[09:49:32][C][wifi:367]:   Hostname: 'testdevice'
[09:49:32][C][wifi:369]:   Signal strength: -41 dB ▂▄▆█
[09:49:32][C][wifi:373]:   Channel: 11
[09:49:32][C][wifi:374]:   Subnet: 255.255.255.0
[09:49:32][C][wifi:375]:   Gateway: 10.29.129.1
[09:49:32][C][wifi:376]:   DNS1: 10.29.10.8
[09:49:32][C][wifi:377]:   DNS2: 10.29.10.3
[09:49:32][C][logger:293]: Logger:
[09:49:32][C][logger:294]:   Level: DEBUG
[09:49:32][C][logger:295]:   Log Baud Rate: 115200
[09:49:32][C][logger:296]:   Hardware UART: UART0
[09:49:32][C][captive_portal:088]: Captive Portal:
[09:49:32][C][mdns:103]: mDNS:
[09:49:32][C][mdns:104]:   Hostname: testdevice
[09:49:32][C][ota:093]: Over-The-Air Updates:
[09:49:32][C][ota:094]:   Address: testdevice.local:8266
[09:49:32][C][api:138]: API Server:
[09:49:32][C][api:139]:   Address: testdevice.local:6053
[09:49:32][C][api:143]:   Using noise encryption: NO
[09:54:13][I][ota:113]: Boot seems successful, resetting boot loop counter.

Via http youll need the webserver component to be installed

Thanks, that worked was what I was missing.