With the very elegant solution by @123here I have a sensor now that contains the path to the image I want to display, but how do I get it displayed? With the elegance in the sensor, I don’t want to spoil it all by using state images, as it already has the image name stored inside it.
I would first play in the dev template and see if i get the right value from it. You can also just do the full url instead of a local load (presuming that is what it does now)
Anyone know how to do this? I tried KEM_Hass’s solution in my lovelace raw config and it just moaned about a missing comma in the YAML validation and wouldn’t let me save.
Thanks
I would love to be able to show an image with a ‘templated’ path like
/local/images/fridge-samsung{{ states(‘sensor.koleskab_image’) }}.png
But it doesn’t work…
Thank you for this i made a sensor which took the baseurl+state(sensor.symbol)+.png
the string is the correct url but image can’t use it the cdn i’m getting images from has at least 80 weather icons probably more but your solution is the only one I have found that works it’s a real shame there seems to be no way to just change the url path for the image with a sensor state other than this method.
I have something similar to your request. Maybe you can aplly the same conf like me. But with my conf, the log of system shows me an error, but is working well at the end.
I have a sensor to show me the Moon phases with PNG images, and my sensor is this: