Smart Thermostat for Electric water heaters – Anti-Legionella function