Shelly Dimmer integration broken when using CoIoT after 2024.5 update

Hi everyone,

After using HA for years, the 2024.5 and later updates created an issue with all the Shelly Dimmers at home.

With the 2024.4 core (and older), the physical switch works as expected. It turns the light on and off. However, since the 2024.5 version it produces a “bounce” effect when trying to turn the light off (the light turns off for a brief moment, only to turn on again).

The lights work as expected if you use Home Assistant, but the physical switch becomes useless. All of this unexpected behaviour disappears if you revert the core to an older version. Interestingly, the standard Shelly relays don’t have this problem.

After a little investigation, I believe this is related to the CoIoT implementation. Years ago I had to configure all the shelly relays to use unicast pointing to the IP and port of the Home Assistant instance. Somehow, it seems the latest version of the home assistant core is not properly receiving or processing the messages.

I’ve also tried to update the shelly firmwares (even beta versions) with no luck.

Anyone has had the same issue? Any help? Thanks!

Hi. Update HA to version 2024.6.x, this version fixes a few issues. In addition, enable HA built-in debug mode and check if any(custom) integration does not block the event loop. If the event loop is blocked, the thread processing CoIoT packets cannot do its job.

Thank you very much for your answer. Tried again to update to 2024.6 with no luck. After enabling debug mode, all I see is this:

Detected blocking call to open inside the event loop by custom integration ‘xiaomi_miot’ at custom_components/xiaomi_miot/, line 208: with open(os.path.dirname(file) + ‘/core/miot_specs_extend.json’) as file: (offender: /config/custom_components/xiaomi_miot/, line 208: with open(os.path.dirname(file) + ‘/core/miot_specs_extend.json’) as file:), please create a bug report at Issues · al-one/hass-xiaomi-miot · GitHub Traceback (most recent call last): File “”, line 198, in _run_module_as_main File “”, line 88, in _run_code File “/usr/src/homeassistant/homeassistant/”, line 223, in sys.exit(main()) File “/usr/src/homeassistant/homeassistant/”, line 209, in main exit_code = File “/usr/src/homeassistant/homeassistant/”, line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File “/usr/local/lib/python3.12/asyncio/”, line 672, in run_until_complete self.run_forever() File “/usr/local/lib/python3.12/asyncio/”, line 639, in run_forever self._run_once() File “/usr/local/lib/python3.12/asyncio/”, line 1988, in _run_once handle._run() File “/usr/local/lib/python3.12/asyncio/”, line 88, in _run, *self._args) File “/usr/src/homeassistant/homeassistant/”, line 165, in async_setup_component result = await _async_setup_component(hass, domain, config) File “/usr/src/homeassistant/homeassistant/”, line 402, in _async_setup_component result = await task File “/config/custom_components/xiaomi_miot/”, line 208, in async_setup with open(os.path.dirname(file) + ‘/core/miot_specs_extend.json’) as file:

EDIT: disabled the integration, now the error message is gone, but same results. The light can not be turned off using the physical switch

Please open an issue here and attach a debug log file for the Shelly integration and diagnostics file.

Opened a Github issue: #119966