Hi all, my first post here, i’m struggling with this in the previous days and cant figure out an solution.
i want to have an “dynamic” image that changes based on the % of my blinds, they are controlled by an shelly 2.5:
the configuration :
type: picture-elements
elements:
- type: image
entity: cover.shelly_shsw_25_e8db84a1d28a
image: >
{%
if(state_attr('cover.shelly_shsw_25_e8db84a25a88','current_position')==100)%} local/MyAssets/HomeMap/estore_aberto.png
{%elif(state_attr('cover.shelly_shsw_25_e8db84a25a88','current_position') >=75)%} local/MyAssets/HomeMap/estore_aberto.png
{%elif(state_attr('cover.shelly_shsw_25_e8db84a25a88','current_position') >=50)%} local/MyAssets/HomeMap/estore_aberto.png
{%elif(state_attr('cover.shelly_shsw_25_e8db84a25a88','current_position') >=1)%} local/MyAssets/HomeMap/estore_aberto.png
{%elif(state_attr('cover.shelly_shsw_25_e8db84a25a88','current_position') ==0)%}local/MyAssets/HomeMap/estore_aberto.png
{%else%} local/MyAssets/HomeMap/estore_fechado.png {% endif %}
style:
top: 8%
left: 16%
width: 7%
padding: 10px
- type: image
entity: cover.shelly_shsw_25_e8db84a1d28a
image: local/MyAssets/HomeMap/estore_fechado.png
style:
top: 8%
left: 25%
width: 7%
padding: 10px
image: local/MyAssets/HomeMap/palacio_planta_black.png
i’m using only 2 images to for debugging, the images are in the correct place and “work” as if i set it “normally” it work as showed in the image bellow:
what i’m doing wrong? or this is not possible to be done in this way?
thanks in advance