Possible to disable auto discovery for Shelly?

Hello,
I have an issue with auto-discovery of a Shelly device that is on the extreme range of WiFi coverage. I don’t have an issue about that because the device controls the load locally but I want the energy consumption to be recorded in HA. But, as the device is auto detected as new when HA finds it again, Energy recording doesn’t work reliably.
Can I disable this auto-detection feature somehow? For Shelly or for all devices?

Have you set a fixed IP to that shelly? It should not be discovered as a new device every time it connects, even if there are long breaks between connecting.

Yes, the plug gets the same IP from DHCP and is showing the same IP address in HA when I add it.
This message is logged repeatedly in HA regarding the device. Running latest Shelly FW 1.3.2:

Logger: aioshelly.rpc_device.device
Källa: components/shelly/coordinator.py:711
Inträffade först: 22 maj 2024 kl. 19:30:16 (3 händelser)
Senast loggade: 09:19:37

host 192.168.18.82: error during shutdown: KeyError('FCB4670DEFF0')

Each time that message is logged, the device re-appear as newly discovered.
I will reboot HA and see if that changes anything.

I have never seen this in my setup.

It might be a bug in the integration. I would report it in github. You will need to enable debug logging and add logs to the issue you create.

There are in general quite some issues reported with the integration recently, since 2024.4 update:

1 Like

Reboot of HA (2024.5.4 / Supervisor 2024.05.1) seems to have solved this :crossed_fingers:t2: No message for two hours at least…