I have Athom smart plug v2 that was originally flashed with Tasmota. I managed to flash it with esphome. To do that, I simply created a new device based on the ESP8266 in the HA, then used the official ESPHome YAML file for the plug and compiled + downloaded the binary to the PC. Update via Tasmota browser’s interface was very smooth (I had to use gzipped update tho). I did this for all devices I have.
When firmware was updated to esphome and new WiFi access point was assigned, HA immediately detected new esphome device and proposed to Adopt it. Process was very smooth - for every device - after the adoption, I had to rebuild the newly added device (added in the esphome addon) to get API access with its own key. Device finally popped-up in the HA Devices window, with correct entity exposure.
A single device in the esphome interface now looks like this:
And if I check the YAML file belonging to this device, it looks like this:
substitutions:
name: athom-smart-plug-v2-d747e1
friendly_name: Athom Smart Plug V2 d747e1
packages:
Athom_Technology.Smart_Plug_V2: github://athom-tech/athom-configs/athom-smart-plug-v2.yaml
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
api:
encryption:
key: here-goes-base64-encryption-key
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
This YAML is very different from the original one, at least it is much smaller. Since I have more than 10
devices running, and I plan to get at least dozen more:
- Is there a way to modify main (original) YAML file and update all devices with this change in a systematic way? That means that all adopted devices from this original YAML would be updated
- An example, I’d like to increase reporting frequency of sensors from
10s
to5s
but would not want to update each device manually through its ownhttp://ip:port
browser interface.
What would be the best way to do that?