continuing from Custom-ui Tiles template not working,
Been discussing with @vladosam, who helped me turn the paradigm in my templates.
I am trying to get my Tiles to follow the state of my device_tracker Life360 and have it show images depending on the zones it is in. The thing is these Life360 zones are capitalized combinations of words without _ as in ‘Multiple Words’ while my images cant be like that and need to be m_multiple_words.png.
So, ive tried this but it doesnt work:
background-image: url(\"/local/tiles/family/m_' + state|lower|replace(" ", "_") + '.png\")';
background-image: url(\"/local/tiles/family/m_' + state + '.png\")';
works beautifully for m_home and m_not_home, so I know its down to the filter to get it right.
I don’t mind if it had to be like m_multiplewords.png and not use the underscore, but even then the filter needs to be something like
state|lower|replace(" ", "").
What could I change and try, please have a look with me?