General suggestion:
post a SHORT version of the problematic card with MINIMAL number of entities and w/o unrelated things if you are looking for a help.
If by āfloor planā you mean a stock Picture elements card - then conditional elements (see Docs for this card) can be used to hide/show an element conditionally (i.e. this is unrelated to config-template-card).
If you placed a whole Picture elements card inside config-template-card (CTC) due to some reasons - this is a BAD practice; use CTC for a particular element (check Docs for CTC).
All CTC-related questions better to discuss in the main thread. Also, check if you really need CTC to achieve your goals.
This is not a short code - it still contains unrelated things like āimageā element & card-mod code (which is not working). Not critical, but suggest to not post unrelated things.
Already told you about using picture-elements (PE) inside CTC - wrong practice.
You placed PE inside CTC - but not using any CTC functionality, i.e. it is unclear why CTC is used.
Check for āconditional elementsā in Docs for PE: it will allow you to show the āstate-iconā element dependently on an entityās state.