Switch SVG icon based on msg

#1

Hi,

I am trying to switch svg icons depending on the status of the msg properties. I want to make use of UI template, but unsure of how to select the svg icons based on input.

Its mostly for home automation with icons showing door opened or door closed.

SVG door open

Door open

any examples to see how to proceed.

also if i need to keep the .svg files on the pi3, where exactly would be the location?

Thanks

0 Likes

#2

Have you seen this flow example?

https://flows.nodered.org/flow/90341d0d81f59762fe1cf8d753723636

0 Likes

#3

Hi Anderi,

Yes, but it is for fa icon, if i have a custom icons, any idea where i need to place it?

my system is a pi3.

Thanks

0 Likes

#4

You’d need to place them in a folder relative to wherever you have defined your httpstatic entry in your settings.js file https://nodered.org/docs/configuration

0 Likes

#5

Thanks for the info… still learning my way with node red

0 Likes