I have an interactive floor plan in a picture elements card. I am looking to input a state icon for motion that is only visible when the entity state is detected and not visible when the entity state is cleared.
this is the current code. the icon does change color based on its state but I haven’t been able to change its viability based on its state. Also is there a way to change the state colors. as of now blue is the clear state and yellow the detected state and I have been unable to change those as well. Any help would be appreciated dearly.
Hello Anryn Malcolm,
Welcome to the Home Assistant Forum!
Thanks for coming here and asking a question.
Would you be so kind as to adjusting the format of your code so that we can read it properly & check the YAML spacing, etc. Editing your original is the preferred way. It is very hard for us to tell what is what when the text formatter jumbles everything like that.
You can use the </> button like this… How to format your code in forum posts
OR… Here is an example of how to fix formatting from the site FAQ Page. How to help us help you - or How to ask a good question.
I don’t think you can do that with the icons.
It says in the docs “This element creates a static icon that is not linked to the state of an entity”
I think you’re best bet is to use a PNG image and use the state_image.
Download a PNG of a motion looking icon and use that for the on and then make that png blank or transparent and use that for the off.