Trying to change icon depending on (cover) position - but seems to stumble on unknowns...?

I recall trying this out under customize several years ago and couldn’t get it to work either.

If all else fails, here is a Community Forum thread

that uses a python script called set_state.py. There are actually several variants of this script in that thread. Most people use the script to change the state of an entity, but the one I specifically referenced allows you to change the icon.
So you would use an automation that depended on the level of the cover and would call the script to change the icon.