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'
I have two Shelly h&t (gen1, not the pro Version) which also stopped working. However, two other units work fine.
And I see nothing in the log… Is there another bug?
I’m already at 2024.1.1 and the Shellies have Firmware 20220209-093309/v1.11.8-g8c7bb8d - which I believe is the latest for these? Or isn’t?
One thing I noticed: cloud was enabled on the devices. But it wasn’t me who enabled it…
edit: d’oh stupid me. The two devices were running an old version, not sure why, I thought all of them were upgraded. There was actually an error message:
The minimum supported firmware version for generation 1 devices is 1.11.0 (2021-07-15).
I guess that the check is not on the firmware version (which is 1.11.0!) but on the date, where I was 5 days short. Anyways, I updated the two H&T and operation is back to normal.
My Shelly 2PM went offline when I went from 2023.12.x to 2024.1.2 but fortunately I had listened to the Home Assisant Podcast last week so knew about the breaking change with the firmware version. Mine had never been updated, so was on 0.1.x. Once I enabled Cloud services on the Shelly device, modified my firewall rules to give it internet access, and updated the firmware to 1.1.0, it started working in HA again.
I am a bit surprised that Home Assistant did not raise a repair about the issue - if I had not listened to the podcast, I would have spend hours in a cold office troubleshooting. The 2PM controls the heater and it was 4C in there!