Shelly HT Pro error with update to 2024.1.0

After upgrading to 2024.1.0, my Shelly HT Pro devices stopped working. The error log shows:

Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 4:36:56 PM (2 occurrences)
Last logged: 4:36:56 PM

Error setting up entry HT Pro for shelly
Error setting up entry HT Pro Office for shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 129, in async_setup_entry
    return await _async_setup_rpc_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 296, in _async_setup_rpc_entry
    await _async_rpc_device_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 251, in _async_rpc_device_setup
    shelly_entry_data.rpc.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 615, in async_setup
    super().async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 138, in async_setup
    hw_version=f"gen{self.device.gen} ({self.model})",
                     ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aioshelly/rpc_device/device.py", line 378, in gen
    raise NotInitialized
aioshelly.exceptions.NotInitialized

I have two of these, and they have worked perfectly for months.

There were some changes to Shelly in 2024.1.0. I suggest a GitHub issue.

Same here. I have four Shelly Plus H&T that stopped working with 2024.1.0

And of vourse the minimum formware required has cahnged, but you will have read that already :slight_smile:

The minimum supported firmware version for generation 2 devices is 1.0.0 (2023-08-03).

Pretty sure I have that, but I will check again. I did a mass update of all my devices a month or two ago (well after 2023-08-03.

As I suspected.

“ You are using 1.0.3 version of the firmware.”

For giggles, I updated these two Shellies to 1.1 since it was available.

Getting the same error, so it’s not a minimum firmware issue.

Logs then :slight_smile:

Same here and the Smoke Plus with firmware 20231219-133933/1.1.0-g34b5d4f shows these errors too.

024-01-04 08:16:30.639 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Büro Shelly Plus Smoke for shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 129, in async_setup_entry
    return await _async_setup_rpc_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 296, in _async_setup_rpc_entry
    await _async_rpc_device_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 251, in _async_rpc_device_setup
    shelly_entry_data.rpc.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 615, in async_setup
    super().async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 138, in async_setup
    hw_version=f"gen{self.device.gen} ({self.model})",
                     ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aioshelly/rpc_device/device.py", line 378, in gen
    raise NotInitialized
aioshelly.exceptions.NotInitialized

same probleme here, 1.1.0 version

Same Problem here

Logger: homeassistant.config_entries
Source: config_entries.py:406
First occurred: 04:04:05 (2 occurrences)
Last logged: 04:04:05

Error setting up entry shelly_ht_livingroom for shelly
Error setting up entry shelly_ht_office for shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 129, in async_setup_entry
    return await _async_setup_rpc_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 296, in _async_setup_rpc_entry
    await _async_rpc_device_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 251, in _async_rpc_device_setup
    shelly_entry_data.rpc.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 615, in async_setup
    super().async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 138, in async_setup
    hw_version=f"gen{self.device.gen} ({self.model})",
                     ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aioshelly/rpc_device/device.py", line 378, in gen
    raise NotInitialized
aioshelly.exceptions.NotInitialized

Given this line from the log:

result = await component.async_setup_entry(hass, self)

My guess is the code is expecting a response, but this is a battery unit. It isn’t going to wake up unless the temp/humidity changes or you pry open the case and press the button.

Same problem with Shelly dimmer 2 and Shelly EM

Same for me only on my Shelly Plus H&T other battery evinces are fine

A fix is mentioned in the release thread

2024.1.1 just came out, it fixed the issue for me.

Thank you!

Just upgraded to 2024.1.1 and my old Shelly’s are not visible.
In GitHub I go from one issue to another as duplicates and the last one Shelly 1, 2.5 and Dimmer cant be loaded with 2024.1.1 · Issue #107275 · home-assistant/core · GitHub seems still open. So downgrading again to 2023.12.4

Same for me just updated an the old Shellie’s can’t connect Shelly 1, and 2.5
Thanks

My shellyem and shelly1pm both stopped working on 2024.1.1, was ok on 2024.1.0
both gen1 and FW is 1.14
Something about a key error?

2024-01-05 21:37:33.075 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shellyem-5E26F6 for shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 131, in async_setup_entry
    return await _async_setup_block_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 201, in _async_setup_block_entry
    await _async_block_device_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 168, in _async_block_device_setup
    shelly_entry_data.block.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 338, in async_setup
    super().async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 139, in async_setup
    hw_version=f"gen{self.entry.data[CONF_GEN]} ({self.model})",
                     ~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'gen'
2024-01-05 21:37:33.098 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry shelly1pm-E09806AA06BA for shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 406, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 131, in async_setup_entry
    return await _async_setup_block_entry(hass, entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 201, in _async_setup_block_entry
    await _async_block_device_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/__init__.py", line 168, in _async_block_device_setup
    shelly_entry_data.block.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 338, in async_setup
    super().async_setup()
  File "/usr/src/homeassistant/homeassistant/components/shelly/coordinator.py", line 139, in async_setup
    hw_version=f"gen{self.entry.data[CONF_GEN]} ({self.model})",
                     ~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'gen'

Please fix soon

Same for me, my Shelly 1 stopped to work after latest HA upgrade . PLEASE FIX ASAP