Change LED colour based on sensor value

Wow Tom thanks for doing that!

For reference if you are willing to help I have listed the entity names below. Turns out it’s actually 2 different sensors, one export/one import. If you aren’t too busy I would greatly appreciate if you could help me out with entity names? Otherwise I will have a try myself.

light.lounge_ambilight
sensor.active_import_from_grid
sensor.active_export_to_grid

If inverter is not exporting then value goes to 0w and stays in that position until exporting begins again and visa versa for import.

Max import would be 10kw each way.

Thanks again.