Hi All,
I am building a weather page and need a bit of help constructing the icon image url. All images are stored locally. My issue is the sky condition “value” is an int AND all the associated images (150 in all) begin with that specific value (eg. 11010_partly_cloudy_large.png). I have tried to concatenate with something like this:
entity_picture_template: "{{ '/local/images/tw/' + state_attr('sensor.bastrop_forecast_wx', 'intervals')[0]['values']['weatherCodeDay'] + '.png' }}"
but it obviously throws an error as the value is an int and not a string.
My other issue is that the images are named with a “code_desc.png” format. While no two images have the same code, adding a wildcard to the url I don’t think will work.
I can 1) rename all my images to just codes; OR 2) perform some lookup and build the image name and ultimately the url to that image.
Thoughts?