Templare canva question

Hello guys.

I have a template canva comoponente which shows squares that change between different colors depending of the status of a bit in a PLC.

I'm trying to get the state of very square into the template and put it into a list. This is the code that i'm trying to use. Any advice will be welcome,

template_list = system.gui.getWindow('Zones/Body Shop Overview').rootContainer.getComponent('Overview_BL1RSM010').getAllTemplates()
for template in template_list:
#Compare the name of each instance.
if template.getInstanceName() == "020":
#Print the Value property on the tagPath component inside the template
print template.getComponent("tagPath")

I'm only receiving a "none" in the script editor.

Thanks for your help.