ok, so I guess it’s a recurring problem, I saw similar struggles on the forum. read those, tried to implement, failed. I’m feeling, that the lack of possibility to change default state names for some entities, lack of possibility to change default icon colors for active/inactive - is just STRANGE, and I’d love to see it change soon.
EDIT: I know that I can make template sensors, but it’s unnecessary duplication IMHO. having device trackers and using them for another sensors isn’t “in my style” and I’m leaving it as the last resort. the last last last resort
anyway, let’s get to the point.
I have device_tracker
ping
platform set up for almost every network device in my LAN. because I like to know if everything’s good with my stuff. as you probably guessed, the home/not_home states are ridiculous in that case, because those devices are always home, just sometimes they go offline.
after some digging I’ve installed latest CustomUI with the local option, and Customizer to have it all working with my Hassio 0.98.2 on Rpi3. all necessary stuff in configuration.yaml is added, mostly by copy-pasteing it from projects’ github pages.
because I use my “clever” naming conventions, all my ping device_tracker entities start with “png_”, so I added this to customize_glob:
"device_tracker.png_*":
show_last_changed: True
templates:
icon_color: >
# default blue color when inactive, yellow when active
if (state === 'home') return rgb(255, 212, 85);
return 'rgb(60, 118, 155)';
state: >
if (state === 'home') return 'online';
return 'offline';
configuration seems to be ok [config validation isn’t showing any problems, and also the template part is added to entity’s attributes, what can be checked/seen in the developer tools/states tab] but that’s all I’m getting. color isn’t changing while active, state name isn’t changing to my definitions.
did I missed something?