Changing ESPHome name and installing update config wirelessly?

If I try to change the name of my device thats currently called “bed4” to “bed-pressure”, then when I try install and update wirelessly, it tries to connect (and fail) to bed-pressure.local

Is there anyway in the YAML file to specify the IP directly? I do not want to have to remove the device form where it is to update it. But I do want to change the name

image

Under wifi add use_address with the IP or possibly the old name with .local at the end. I believe that will help

Check the change name section here:

2 Likes

Do you have

web_server:
  port: 80

in your YAML file?

In my experience, and I am no expert, the name: parameter must be the same as the yaml filename.

I am not sure what you are saying here.

Can you put the name back to the original and do an OTA update then?

If you can reestablish connection with the device, then you won’t have to remove it to flash again.

In future devices, I recommend the web server lines above if you have the storage space in the device. Also add:

# Get the WiFi details
text_sensor:
  - platform: wifi_info
    ip_address:
      name: ${device_name} IP Address
      id: ${device_name}_ip
    ssid:
      name: ${device_name} SSID
    mac_address:
      name: ${device_name} Mac Address
      
sensor:
  - platform: wifi_signal
    name: ${device_name} WiFi Signal Sensor
    id: ${device_name}_WiFi_level
    update_interval: 60s

Oh, at the top of my yaml file:

substitutions:
  device_name: counterlight

This code creates these entities from my device:
text_sensor.counterlight_IP_Address
sensor.counterlight_WiFi_Signal_Sensor
sensor.counterlight_WiFi level

There is literally a rename option in esphome.

Oops. :man_facepalming: