Local Bytes Smart Plug vs (not so) Smart User :-D

Hello again,

After some unpleasant experiences with the Local Bytes smart plugs, I failed in my attempt to steer clear of them for my subsequent home automation projects :smiley: The Shelly switches I switched to (no pun intended) work very well, and are very reliable. However, somehow I managed to end up with not one, but two new “Power Monitoring Smart Plug - Preflashed & Preconfigured” (ESPHome variant).

They were working fine after setting them up from new. Then I made a copy-paste mistake, given them the same IP address. After many unsuccessful tries to sort out one of the plugs (in the process I messed the mess if that’s even possible), I gave up and decided to start all over again.

Using the ESPHome tool (Home Assistant add-on) I managed to load the minimal configuration (minimal.yaml) so I could get back to connecting to the plugs using the built-in AP and Captive Portal features. Whilst there I re-imaged the plugs with the latest firmware release (v1.1 from December 2023) then configured to connect to my Wi-Fi.

I repeated the above steps multiple times.

The two plugs are randomly showing in the ESPHome Dashboard. After my last try I was able to adopt one of them, but this doesn’t want to show any entities in Home Assistant. The other one, didn’t even show in the ESPHome Dashboard, but did come up in the Hame Assistant and it shows 16 entities.

The two configuration are identical (less IP addresses, hostnames, API keys):

substitutions:
  name: localbytes-plug-pm-aabbcc
  friendly_name: FAV-FL0-PM1
  # Aka: `restore_mode` in documentation
  # Options: `RESTORE_DEFAULT_OFF`, `RESTORE_DEFAULT_ON`, `ALWAYS_ON` & `ALWAYS_OFF`
  default_state: "ALWAYS_ON"

packages:
  localbytes.plug-pm: github://LocalBytes/esphome-localbytes-plug/localbytes-plug-pm.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: SdOripH+C9Nl75W9jsJ0eNn/E6Ib/gjztr9NQFW44a8=

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 10.1.20.31
    gateway: 10.1.20.254
    subnet: 255.255.255.0
    dns1: 10.1.30.101
  domain: .my_domain.internal

sensor:
  - id: !extend power_monitor
    update_interval: 30s

Home Assistant and ESPHome details:

 Add-on version: 2024.2.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.0  (aarch64 / yellow)
 Home Assistant Core: 2024.3.0
 Home Assistant Supervisor: 2024.02.1

Is there any way I can force ESPHome Dashboard to discover the second plug, the one already discovered by HA, so I can adopt it? And then to make them both to show as HA entities?..

I posted the above on ESPHome Discourse channel as well, so if you’re a member of both communities, there is no need to give the same answer twice.