So far, so good. I see the logo, but the image is too large, and not square. So I edit the image in Photoshop into a 20x20 pixel image, and copy it to /config/www, then put the new image name into customization.yaml:
But, when I restart Home Assistant, the original image is still showing. I refresh the browser just in case it’s cached, and no change. I delete the original image from /config/local, restart Home Assistant, and still, the old image.
Now it gets weird.
I change to an mdi icon:
switch.tasmota_test:
icon: mdi:light-switch
I restart Home Assistant and there is the new icon. Maybe the cache got flushed. So I go back to the 20-pixel logo with entity_picture, and I get he original (too large) image. Remember, I deleted the old image file from /config/www.
Welcom to web development and the horrors of browser cache. Basically, your browser is holding on to your old image. Use CTRL+F5 to clear the cache and reload the page.
not sure if this helps you, since you didn’t mention whether you;re browsing from a desktop or mobile phone, but the iOS App won’t load new images until you’ve deleted it and reinstalled/loaded it again. No hitting the reload button helps. No killing the app and restarting, only deleting and reinstalling helps.
Clearing the cache fixed another problem with a side panel, but not this one.
It can’t be the browser cache because even using a different browser (one that has never seen this page) shows the same original image, and I have deleted that file from the www folder.
I’m an old fart. I only use my phone, and old Android, when absolutely necessary.
And, yes, even on the Android the only way to clear an app history is to delete it.
I also tried another PC that had never seen Home Assistant, and still the image that had been deleted from the www folder is showing. It can’t be the browser cache if a browser that has never seen Home Assistant is displaying the deleted image.
Even a cold-reboot of the Pi with Home Assistant didn’t clear the cache.
somehow this is very strange… since you’ve edited the yaml to point to the new 20x20 file, could it be this file is not cropped correctly ? The caching issue should only happen if you changed the file, but not the file name, and the system would load the original file. Since you now load another file, it should really be doing so, so the only lead would be an incorrectly cropped file (that still is of the original size…)? You could test that, by loading a completely different image-file, and see what happens.
Thanks Mariusthvdb.
Yes, the new file is a completely different file.
This was my original file (64x20 pixels):
but only the top left 20x20 pixels were showing.
The new file is (20x14pixels): :
The new file is a different name and the old file was deleted.
SOLVED:
I still don’t know why the old image was showing, but Mariusthvdb got me to thinking…
Apparently the image has to be EXACTLY 20x20px. Smaller won’t load.
And this did replace the old image as expected. What is frustrating is that Home Assistant originally loaded and displayed the oversize image, then doggedly refused to load an image smaller than 20x20. The new image had to be exactly 20x20. (Overflow?)
Note to developers:
It would be nice to have gotten an error in the logfile or for ‘Check Config’ to make sure the entity_picture file could be found and is the correct size.