philpo
(Phil)
December 8, 2025, 1:35pm
1
I cannot even start to enter a helper for template image: I get this error message:
[140518544229696] Error handling message: Unknown error (unknown_error) phil from 192.168.0.192 (Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 237, in async_handle
handler(self.hass, self, schema(msg))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/template/config_flow.py", line 810, in ws_start_preview
preview_entity = CREATE_PREVIEW_ENTITY[template_type](
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: <EntityPlatforms.IMAGE: 'image'>
And it shows in the helper as
I can enter a template image entry into configuration.yaml, no problem - is there something wrong with my config? How would I trace this issue?
tom_l
December 8, 2025, 9:55pm
2
Difficult to say when you have not shared what you are attempting to put into the UI.
philpo
(Phil)
December 8, 2025, 11:43pm
3
I haven’t put in anything yet, the message appears as soon as the template helper opens. I tried it on Android as well, same message, same error in the logs. I also up-versioned the core and the os, and restarted my server, with the same result.
tom_l
December 8, 2025, 11:49pm
4
It is not going to be able to preview anything until you specify a URL template.
Share what you are attempting to put there.
philpo
(Phil)
December 9, 2025, 12:08am
5
I copied a successful template from my configuration.yaml, gave it a different name, hit submit (success), but no image shows up. However,
the template:
“http://192.168.0.34:8123/local/MoonPhaseImages/Moon {{ states(‘number.age_of_moon’) | int(0) | string }}small.jpg”
and the error message is still there
But now, the error message is:
Logger: homeassistant.components.image
Source: components/image/init .py:252
integration: Image (documentation , issues )
First occurred: 6:58:35 PM (8 occurrences)
Last logged: 7:04:12 PM
image.moon_phase_local_image: Error getting new image from “http://192.168.0.34:8123/local/MoonPhaseImages/Moon19small.jpg ”: Request URL is missing an ‘http://’ or ‘https://’ protocol.
So, I removed the “” around the template. And now it works. Geez. What a waste of several hours…
tom_l
December 9, 2025, 12:10am
6
Remove the quotes from around your template. Not required for the UI.
philpo
(Phil)
December 9, 2025, 12:11am
7
Here is the working helper - thanks for walking me through it.
1 Like