In order to optimize the use of self-generated electricity, I made an automation that turns on an electric heater (bathroom) when there is surplus power: It turns a socket on (which the heater is connected to), waits 15 minutes, and turns the socket off again. This is repeated as long as there is surplus power and the bathroom target temperature is not reached.
But I think my solution is not very elegant:
- it uses a long wait (15 minutes)
- it heats at least 15 minutes, even if after 1 minute there's no more surplus power
Can someone please help me improve this automation along the lines "turn on when conditions are met and keep watching conditions and turn off as soon as not met any more, (for a total maximum duration of x minutes)"?
What should be kept in mind: The socket/heating can also be switched on/off manually and that surplus-automation shouldn't interfere with manual operation.