Control grid feed in via input

I have a system 3x multiplus 10k, 20kw peak and some batteries. Everything is working fine expect that only nice hot days (35 degrees celcius) the room in which eveything is mounted becomes very hot (+55 degrees) and my fans do not manage to cool the room down. when i limited the grid feed to 1kw, the system cools done and my fans can handle the load.
Is there a way that i can switch the grid feed in based on an input of the ekrano? I want to use a thermo meter contact to automatically limit the grid feed in when the room becomes hotter than lets say 40 degrees.

A couple of things, that is way too hot. Your batteries will be hating that and it will affect lifespan of the equipment.
Some battery manufacturers will void warranties at those temps, so I would get cooling in there.

As for the rest, you can use nodered to create a workflow that does that for you. See the dedicated nodered category for more information.

What @nickdb said get some cooling in there I only have one multi and live in the UK which I didn’t think I would have cooling issues but temps started to get too high for my liking and so I got a portable air con unit and core drilled a hole outside, it works pretty well and is all automated

Here is the simple way I done it but you’ve got a hell of a lot more cooling to do than me Simple UK Home System