The 300-litre hot water cylinder is an ideal flexible load: it does not matter whether it heats up at 13:00 or 15:00, as long as it happens. That is why I let EMHASS choose the moment, as an EMHASS deferrable load. On the first day, though, it did not happen: the planned block kept pushing itself further ahead all day.
The setup
| Power | 2800 W |
| Run time | 1 hour per day |
| Shape | semi-continuous, blocks of at least 30 minutes, at most 3 starts |
| Position in the horizon | within the first 24 hours |
EMHASS values solar surplus at the feed-in tariff and grid power at the purchase price, and so picks the sunniest or cheapest moment by itself.
What went wrong with the deferrable load
EMHASS runs again every quarter of an hour, and does not know what it planned a quarter of an hour earlier. Every run got the same instruction: “plan one hour of hot water today”. If the block was planned for 14:00 and it had become 14:00, the new run again needed a full hour, and that could just as well be at 14:30. The block shifted along, and the cylinder did not get hot.
The fix: the remaining hours
In operating_hours_of_each_deferrable_load, the payload no longer sends a fixed hour, but what is left for today:
- 1 hour minus today’s hot water time, measured with a
history_statssensor since midnight; - rounded to quarter-hours;
- 0 if the cylinder is already warm enough (normal target minus 1 °C), or if less than half an hour is left.
For this, Home Assistant must reliably know when the heat pump is making hot water. On my LG, the status bit for this could not be trusted; see which status bits you should not trust.
From plan to heat pump
EMHASS does not switch anything itself. An automation checks every quarter of an hour, and with every new plan, whether a hot water block is planned right now. If so, it sets the cylinder target to 52 °C; if not, to 45 °C. It only writes on a change, and ignores a plan that is older than 45 minutes.
The first real run, on 3 October at 14:15, heated the cylinder from 48 to 53 °C in about 25 minutes.
The whole setup: EMHASS and the battery and Heat pump via Modbus.
These values apply to one installation. Check them against your own documentation; leave work on 230/400 V to a qualified electrician.






Leave a Reply