Upgrade to core-2021.3.4, now one device is "unavailable"

I did an upgrade to core-2021.3.4, and now one device is “unavailable”.

The device still shows as green on the ESPHome dashboard. Logging opens, and an OTA upload completes OK. I even restarted the server, but the device sensors and switches are all “unavailable”.

Did I do something wrong??

esphome:
  name: wemosswitch
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "Kaywinnet"
  password: !secret wifi_password
  fast_connect: true

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


captive_portal:

# Enable logging
logger:
  level: DEBUG

# Enable Home Assistant API
api:

# Enable Over the Air updates
ota:
  safe_mode: True
  
# A switch is to operate something external, like a relay attached to a gpio.  
#
# Virtual switch D0, GPI16  
# This becomes an entity: 'switch.wemos_switch'
switch:
  - platform: gpio
    name: "WemosSwitch"
    pin:
      number: D0
      mode: output
    id: led


# A physical switch or button should be a binary sensor if you are detecting something like grounding the pin.    
# Physical Button on D1 (GPIO5)  
binary_sensor:
  - platform: gpio
    pin: 
      number: D1
      inverted: False
      mode: INPUT_PULLUP
    name: "WemosSwitch Button"
    id: wemos_button
    on_press:
      then:
      - switch.toggle: led
    on_release:
      then:
      - switch.toggle: led


# Get the WiFi details
text_sensor:
  - platform: wifi_info
    ip_address:
      name: WemosSwitch IP Address
    ssid:
      name: WemosSwitch SSID
    bssid:
      name: WemosSwitch BSSID
    mac_address:
      name: WemosSwitch Mac Address

sensor:
  # Uptime sensor.
  - platform: uptime
    name: WemosSwitch Uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: WemosSwitch WiFi Signal
    update_interval: 60s

Did you try removing it, and let the esphome integration find it again ?

Removing what? The device? The integration? The entities?

I’ve tried all three, and even restarted HA again.
All but one of the entities (sensor.wemosswitch_wifi_signal) are gone now.
I tried uploading to the device again. No difference.
And, sensor.wemosswitch_wifi_signal is still unavailable.

What should I try next? Maybe delete the device from the ESPHome panel and create it again with a new name?

Remove and re-add that device in the integrations page

Thanks. That worked.

1 Like