Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95481

Change Icon Color Binary_Sensor

$
0
0

@Simone_Valmacco wrote:

HI All!
I’m moving my first steps into HA, I’m trying the Ping component to check if my network devices are online:


I can already use it, but it’s possible to change the icon color based on the status of the devices? for example RED if disconnected and GREEN if it’s connected…
I’ve tryed this code in the customize.yaml file but it doesn’t work…
Any help?

binary_sensor.pfsense:
   templates:
        rgb_color: "if (state === 'Connesso') return [255, 255, 0]; else return [255, 0, 0];"

Thank you very much!
Simone

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95481

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>