Created this blueprint to have an RGB color capable led light give me visual feedback on my energy usage. Could be expanded to use with other type of HA sensors or even make the limits adjustable for capacity tarrifs here in Belgium.
Selectable in the blueprint: sensor with current power usage, sensor with current solar yield, min and max valuen RGB light entity. The resulting automation will only work when the light was on to begin with (as we use the “light turn on” action to change the color).
The calculated value is grid = power usage - solar yield. If this is min value show green etc with max value showing purple.
Colors for the gradient are selectable in the blueprint but default is green - yellow - orange - red - pruple.
The result in action:
The blueprint ui: