This script just automates the fix described in gcobb321/icloud3#356 by @gcobb321 for fixing iCloud v3.0.5.2 compatability with Home Assistant 2024.7.x
I took some attempts to be safe but use at your own risk!
To run it just ssh into your HA server, then fetch the file below and evaluate it with bash.
$ wget "https://gist.githubusercontent.com/varenc/243eeed5622f0e749367b2f9e9d73a38/raw/icloud3_quick_fix.sh"
$ bash icloud3_quick_fix.sh