Problem with iCloud integration since upgrade to 2021.4.0

Since upgrading core to 2021.4.0 my iCloud integration has stopped working. I tried deleting the iCloud directory in .storage, but that doesn’t get it working again. It discovers all of the devices, but all their entities are unavailable and in the logs I see this (repeated many times):

2021-04-08 13:28:17 ERROR (MainThread) [homeassistant.util.logging] Exception in async_write_ha_state when dispatching '[email protected]': ()
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 310, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 337, in _async_write_ha_state
    extra_state_attributes = self.extra_state_attributes
  File "/usr/src/homeassistant/homeassistant/components/icloud/sensor.py", line 96, in extra_state_attributes
    return self._device.state_attributes
AttributeError: 'IcloudDevice' object has no attribute 'state_attributes'

Yeah I can confirm that same issue on my Prod and Test Systems.

I too can confirm this issue.

They already have it reported and a fix:

Just need to wait for it to get pushed out

if you don’t want to wait you need to fix these lines in these files: