Change Switch light bulb icon based on item state

I know this thread is a few months old, but I just stumbled across this entry describing another way of changing icons dynamically if anyone should be interested: