So… before i create duplicated content, which is maybe not completely right i will point you to the Topic i was thinking about earlier today, when i wrote my last post.
Often one finds a number of rules that are very similar and that all work on similar Items.
This is exactly your usecase.
You want to do nearly the same things (only with different colors) for multiple items/sensors.
This is still not a valuable answer for the color magic, but will definitely increase the maintainability.