If all you are doing is changing the icon for a sensor, use customize in the configuration menu not an icon_template. You’re using a hammer on something that requires a scalpel.
As for the sensor not updating, you need to tie it to an entity refer to the docs: