that documentation is not too clear yet tbhā¦
trying to follow that using:
template:
- image:
- unique_id: my_first_tmeplate_image
url: >
/local/images/bonen.jpg
# or use
url: >
{{'/local/images/bonen.jpg'}}
(note: I did make a typo thereā¦) I get something really odd in the states:
first of all, the naming: with regular templates, those names are taken from the unique_id, and, if one does not set a name: the prefix template_
is added to the unique_id, and set as entity_id, and name. Following that logic, I would have expected:
image.template_my_first_tmeplate_image
, and a friendly_name of template my first tmeplate image
also, the url seems to be incorrect (though the image file does exist):
so that url probably has the incorrect syntax.
all in all, this template image does not behave the same way the other templates do, even considering I made a few mistakes here
ive edited it a bit to:
- unique_id: my_first_tmeplate_image
name: My first template image
url: '/local/images/bonen.jpg'
picture: /local/images/bonen.jpg
and now get:
as proof the image is correct.
The url is not yet. Can anyone shed some light on the correct syntax/requirements for that please?
edit
forget all of the above, thereās an error in the log:
Request URL is missing an 'http://' or 'https://' protocol.
really odd the config checker does not error on that config error of mine
changing to:
- unique_id: my_first_tmeplate_image
name: My first template image
url: 'http://<my_server>.local:<port>/local/images/bonen.jpg'
picture: /local/images/bonen.jpg
cleared that up.
remaining is the odd naming convention, which is not consistent with other template behavior?