looking for assistance here.
Intention is:
I want spa to switch on when: solar production is above 4kw and HWS is off.
Conditions: switch off again if HWS is on or solar drops below 4kw.
Not sure what you mean by this - can’t see any switch off action (@francisp is right, it’s hard to follow unless the code is formatted properly).
In any event, switching off would not be a condition, it would be another action with its own trigger. If you’re just starting out, the easiest way to achieve this is to have two automations, one to switch on the spa and another to switch off. Once you get that working you can look at combining them if you still want to.