LucaTino
(Luca Tino)
1
Hello guys,
I’ve a sensor: sensor.deebot_last_clean_image that has per state a URL:
https://portal-eu.ecouser.net/api/lg/image/XXXXXXX
I tried to create an image card with the following syntax:
‘’’
entity: sensor.deebot_last_clean_image
image: ‘${states[’‘sensor.deebot_last_clean_image’’].state}’
type: ‘custom:hui-image-element’
‘’’
But it doesn’t load anything ![:confused: :confused:](https://community.home-assistant.io/images/emoji/twitter/confused.png?v=9)
Is there anyone that could help me out please?
Thanks a lot!
KTibow
(Kendell R)
2
Know how to use backticks? I think you meant this:
entity: sensor.deebot_last_clean_image
image: ‘${states[’‘sensor.deebot_last_clean_image’’].state}’
type: ‘custom:hui-image-element’
Not this:
‘’’
entity: sensor.deebot_last_clean_image
image: ‘${states[’‘sensor.deebot_last_clean_image’’].state}’
type: ‘custom:hui-image-element’
‘’’
Try this:
image: ‘{{ states('sensor.deebot_last_clean_image') }}’
type: picture
LucaTino
(Luca Tino)
3
Hi KTibow,
thanks for answering me ![:slight_smile: :slight_smile:](https://community.home-assistant.io/images/emoji/twitter/slight_smile.png?v=9)
I tried it but this is the result:
Any clues?
Thanks!
KTibow
(Kendell R)
4
Ooops, I messed up my quotes. Remove the weird quotes at the start and end and it should work.
LucaTino
(Luca Tino)
5
Hi KTibow,
and thanks again for replying me ![:slight_smile: :slight_smile:](https://community.home-assistant.io/images/emoji/twitter/slight_smile.png?v=9)
I tried :
image: ‘states('sensor.deebot_last_clean_image')’
type: picture
and
image: ‘{ states('sensor.deebot_last_clean_image') }’
type: picture
and
image: { states('sensor.deebot_last_clean_image') }
type: picture
But nothing, any suggestions?
Thanks!
pepe59
(Pepe59)
6
And what about this
image: {{ states('sensor.deebot_last_clean_image') }}
type: picture
LucaTino
(Luca Tino)
7
Hi pepe59,
still nothing, I got this:
Let me know and thanks!
pepe59
(Pepe59)
8
Try testing the template in the template editor
{{ states('sensor.deebot_last_clean_image') }}
1 Like
LucaTino
(Luca Tino)
9
Hi pepe59,
in the template editor it works:
How shall I do to let it work too in the picture’s card?
Thanks!
KTibow
(Kendell R)
10
What happens if you right-click on the image icon in the picture card and open it in a new tab?
LucaTino
(Luca Tino)
12
I cannot right-click on it, but when I open the URL direclty (https://portal-eu.ecouser.net/api/lg/image/XXXX) an image is downloaded.
Could this help?
Sorry for the noobie that I am ![:smiley: :smiley:](https://community.home-assistant.io/images/emoji/twitter/smiley.png?v=9)
Thanks
KTibow
(Kendell R)
13
Really? I was meaning right-clicking on this thing:
![image](https://community-assets.home-assistant.io/original/3X/3/f/3ffdf4e758da224f2da6cff91d9e584379984e94.png)
LucaTino
(Luca Tino)
14
Yes, it’s not possible to right click on it ![:confused: :confused:](https://community.home-assistant.io/images/emoji/twitter/confused.png?v=9)
LucaTino
(Luca Tino)
15
OK, I fixed it creating a downloader.download_file service to download the image in a local folder and then call it from a picture card in lovelace.
Thaks all for your help! Most likely is not possible directly from the picture card to use this kind of options.
rolandg
(Roland)
16
You can do a markdown card with:
![Image]({{states.deebot_last_clean_image.state }})
2 Likes