Basically, I have an RGB sensor and I send back red data, green data, and blue data.
So now I can show the numerical value of each one separately. But can I combine them so that they are setting the red, green, and blue colors of a single icon? This would be much more useful and interesting.
Yeah, I’m kinda curious why they used YAML for all of this. I can see it for some of the basic setup, but it seems like the scripts should use a scripting language that is better able to handle variables and basic calculations. (For instance, I don’t want to imagine trying to take an average of two of these RGB sensors.) But it’s still a WIP and they are doing a good job.
I don’t think icons are refreshed often so changing the icon might not give the response you might want. I think the browsers cache needs to be refreshed to have icons change. I might be wrong but I think icon template need to use preset icons not icon files. If it could use icon files, that file could be updated.
I use python to manipulate security camera jpg and put that imagine file on the front end. You could do the same that on a state change of the colors of the light, HA executes a python script to create the color image and that image is picked up on on a camera component on the front end. Not a very elegant solution.
I’ve seen a couple cases where they might send RGB values to a virtual light and let the light profile change the icon color. I might try that and just customize it for a sun icon and call it “sunlight”.